Component module upgrade method, component module and financial robot

Send upgrade requests through remote hosts and transmit upgrade packages using Ymodem protocol, solving the problems of inefficient and error-prone application upgrades of financial robot component modules, achieving a more efficient and reliable upgrade process.

CN114579166BActive Publication Date: 2025-05-02YGSOFT INC
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202011375761.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-30
Publication Date
2025-05-02
Estimated Expiration
2040-11-30

AI Technical Summary

Technical Problem

The application upgrade of existing financial robot component modules is inefficient and error-prone, requiring special sockets and manual intervention.

Method used

Send upgrade requests through the remote host, use the Ymodem protocol to transmit the upgrade package, and perform integrity verification on the target component module, and only update the application after the upgrade is successful to ensure the security and reliability of the upgrade.

Benefits of technology

It improves the application upgrade efficiency of the financial robot component module, reduces the need for manual intervention, and enhances the safety and reliability of the upgrade process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114579166B_ABST
    Figure CN114579166B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a component module upgrade method, component module and financial robot of a financial robot, wherein the upgrade method comprises: receiving an upgrade request from a remote host; wherein the upgrade request carries the identification of the target component module to be upgraded; sending a download request to the remote host in response to the upgrade request; receiving an upgrade package of the target component module sent from the remote host in response to the download request; wherein the transmission protocol of the upgrade package is the Ymodem protocol; after detecting that the upgrade package of the target component module has been transmitted, performing an integrity check on the upgrade package of the target component module; if the integrity check succeeds, updating the pre-stored old application program according to the upgrade package of the target component module to obtain a new application program, and running the new application program on the target component module. The implementation of the present application can improve the upgrade efficiency and success rate of each component module of the financial robot.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computers, and in particular to a method, device, component module and financial robot for upgrading a financial robot component module. Background Art

[0002] Financial robots can replace financial personnel to complete some simple and repetitive financial work, thereby improving the efficiency of financial work. With the enrichment of financial robot functions, financial robots have a large number of component modules. According to the built-in applications, the component modules cooperate with each other to complete financial work. In the current usage scenario, there is a need to upgrade the applications of each component module. Since the application of the component module is burned into the new product and then soldered to the printed circuit board, a special socket is required when upgrading the application of the component module. The maintenance personnel need to insert the upgrade device into the interface for upgrading. The upgrade efficiency is not high and errors may be encountered during the upgrade process. Summary of the invention

[0003] The embodiment of the present application provides a financial robot component module upgrade method, component module, storage medium and financial robot, which can solve the problem of low efficiency and easy error in the application upgrade of component modules in the related art. The technical solution is as follows:

[0004] In a first aspect, an embodiment of the present application provides a method for upgrading a component module of a financial robot, the method comprising:

[0005] The target component module receives an upgrade request from a remote host; wherein the upgrade request carries an identifier of the target component module to be upgraded;

[0006] The target component module sends a download request to the remote host in response to the upgrade request; the download request is used to request to download the latest upgrade package on the remote host, and the format of the upgrade package is the Ymodem protocol;

[0007] After detecting that the upgrade package of the target component module has been transmitted, performing integrity check on the upgrade package of the target component module;

[0008] If the integrity check succeeds, the pre-stored old application is updated according to the upgrade package of the module of the target component to obtain a new application, and the new application is run on the module of the target component.

[0009] The financial robot includes multiple component modules, and the remote host can communicate with each component module in the financial robot based on the network communication protocol. For example, the remote host is upgraded with each component module based on the modbus RTU protocol. Each component module is provided with an independent processor. Each component module can be provided with a memory separately, or multiple component modules can share a common memory. This application is not limited. The various component modules included in the financial robot communicate with each other through the Modbus bus. The Ymodem protocol is an error correction protocol. If the data is successfully received, no confirmation message will be sent. If the data is not successfully received, a non-confirmation (NAK) message will be sent, and a retransmission process will be executed. Only after the upgrade is successful, the pre-stored old application is updated according to the upgrade package of the module of the target component to obtain a new application, thereby ensuring the security and reliability of the application on the component module of the upgraded financial robot.

[0010] In one possible design, the receiving, from the remote host in response to the download request, an upgrade package for the target component module, includes:

[0011] Receiving a plurality of data packets sequentially sent from the remote host;

[0012] The multiple data packets are reassembled to obtain the upgrade package. The upgrade package can be an incremental upgrade package or a full upgrade package. The remote host processes the upgrade package in segments to obtain multiple data packets according to the requirements of the load network transmission protocol modbus RTU protocol. The multiple data packets are numbered, and then the data packets are sent to the financial robot in sequence from small to large according to the number size of the data packets, and all the data packets are directed to be sent to the financial robot. The target component module in the financial robot receives the multiple data packets, and the multiple data packets are reassembled to obtain the upgrade package.

[0013] In a possible design, after detecting that the upgrade package of the target component module has been transmitted, before performing integrity check on the upgrade package of the target component module, the method further includes:

[0014] Parsing the value of the stop transmission indicator carried in each data packet;

[0015] When the value of the transmission stop indicator is a preset value, it is determined that the transmission of the upgrade package is completed.

[0016] In a possible design, the updating of the pre-stored old application program to obtain the new application program according to the upgrade package of the target component module further includes:

[0017] A stop-work instruction is sent to other component modules in the financial robot except the target component module; wherein the stop-work instruction is used to instruct the other component modules to stop working.

[0018] After the new application program is successfully executed, a work resumption instruction is sent to the other component modules; wherein the work resumption instruction is used to instruct the other component modules to resume work.

[0019] In a possible design, the storage space of the component module is divided into a first storage space and a second storage space.

[0020] In a possible design, updating the pre-stored old application program according to the upgrade package of the target component module to obtain the new application program includes:

[0021] Acquire the old application currently stored in the target component module in the second storage space;

[0022] The upgrade package and the old application stored in the first storage space are incrementally updated to obtain a new application.

[0023] In one possible design, it also includes:

[0024] When the integrity check fails, sending a check failure message to the remote host, obtaining the old application from the second storage space and running it on the target component module; or

[0025] When the integrity check succeeds, the new application is overwritten into the second storage space.

[0026] In a second aspect, an embodiment of the present application provides a component module of a financial robot, where the component module is a target component module to be upgraded in the financial robot, and the target component module includes:

[0027] A transceiver unit, configured to receive an upgrade request from a remote host; wherein the upgrade request carries an identifier of a target component module to be upgraded;

[0028] sending a download request to the remote host in response to the upgrade request;

[0029] Receiving an upgrade package of the target component module sent from the remote host in response to the download request; wherein the transmission protocol of the upgrade package is Ymodem protocol;

[0030] A verification unit, configured to perform integrity verification on the upgrade package of the target component module after detecting that the upgrade package of the target component module has been transmitted;

[0031] The updating unit is used for updating the pre-stored old application program to obtain a new application program according to the upgrade package of the target component module if the integrity check succeeds, and running the new application program on the target component module.

[0032] In a third aspect, an embodiment of the present application provides a computer storage medium, wherein the computer storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the above-mentioned method steps.

[0033] In a fourth aspect, an embodiment of the present application provides a component module, which may include: a processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the above-mentioned method steps.

[0034] In a fifth aspect, an embodiment of the present application provides a financial robot, comprising the above-mentioned component modules.

[0035] The beneficial effects brought about by the technical solutions provided by some embodiments of the present application include at least:

[0036] By using Ymodem as the transmission protocol to transmit the upgrade package, the Modbus RTU networking method is used to realize the communication between the component module of the financial robot and the remote host, and only after the upgrade is successful, the pre-stored old application is updated according to the upgrade package of the module of the target component to obtain the new application, thereby ensuring the security and reliability of the application on the component module of the upgraded financial robot. In addition, if an abnormal situation occurs during the upgrade of the application of the component module (including when the integrity check fails or the new application fails to run on the target component), the application of the component module is restored to its original state, thereby further ensuring the security and reliability of the application on the component module of the upgraded financial robot. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0038] Figure 1 This is a network architecture diagram provided by an embodiment of the present application;

[0039] Figure 2 It is a flowchart of a component module upgrade method of a financial robot provided in an embodiment of the present application;

[0040] Figure 3It is a structural diagram of a component module of a financial robot provided in an embodiment of the present application;

[0041] Figure 4 It is a structural diagram of a component module of a financial robot provided in an embodiment of the present application. DETAILED DESCRIPTION

[0042] In order to make the objectives, technical solutions and advantages of the present application more clear, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.

[0043] When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are only examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims.

[0044] In the description of the present application, it should be understood that the terms "first", "second", etc. are used for descriptive purposes only and should not be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to the specific circumstances. In addition, in the description of the present application, unless otherwise specified, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated before and after are in an "or" relationship.

[0045] See also Figure 1 , is a network architecture diagram provided in an embodiment of the present application. The network architecture of the present application includes: a remote host 10 and a financial robot 11. The financial robot 11 includes multiple component modules. The number of terminal devices is not limited in the present application. For example: Figure 1The multiple component modules in are: component module 1, component module 2, ..., component module N, where N is an integer greater than 1. The component modules implement different functions in the financial robot, such as: scanning function, printing function, image processing function, authentication function, etc. Each component module is provided with a processor, so it has the ability to communicate with the remote host 10 independently, and at the same time, each component module can communicate with each other based on the modbus bus. The component module and the remote host 10 can communicate with each other using a serial-based network communication protocol, such as the modbus protocol. Each component module can be provided with a separate memory, that is, each component module has a separate storage space, or each component module can share a memory, in which storage space is allocated to each component module. Optionally, the storage space of each component module can be divided into a first storage space and a second storage space.

[0046] based on Figure 1 For network architecture, see Figure 2 , is a flow chart of a method for upgrading a financial robot component module provided in an embodiment of the present application. Figure 2 As shown, the method of the embodiment of the present application may include the following steps:

[0047] S201, receiving an upgrade request from a remote host.

[0048] Among them, the remote host will query the version number of the application on each component module in the financial robot. When the version number of the component module is inconsistent with the version number of the component module on the remote host, an upgrade request will be sent to the component module, and the upgrade request will carry the identification of the target component module to be upgraded. For example: the target component module is component module 1, the version number of the current application on component module 1 is V1.0, and the version number of the application of component module 1 stored on the remote host is V1.1. Then, when the two are different, the remote host will send an upgrade request to component module 1, and the upgrade request will carry the identification of component module 1 to be upgraded. The identification is used to uniquely represent the identity of component module 1, including but not limited to one or more of MAC address, IP address or port number. The remote host can communicate with the target component module to be upgraded based on a network communication protocol, such as the modbus RTU protocol.

[0049] S202: Send a download request to the remote host in response to the upgrade request.

[0050] The download request is used to request the remote host to transmit the upgrade package to the target component module. The download request carries the identifier of the target component module so that the remote host can determine the upgrade package to be sent according to the identifier of the target component module.

[0051] S203: Receive an upgrade package of the target component module sent by the remote host in response to the download request.

[0052] The transmission protocol of the upgrade package is the Ymodem protocol, which is an error correction protocol. The modem using larger data blocks adopts this protocol to obtain higher work efficiency. The modem using the Ymodem protocol sends data in blocks of 1024 bytes. If the data is successfully received, no confirmation message will be sent. If the data is not successfully received, a non-confirmation (NAK) message will be sent and a retransmission process will be executed. The upgrade package can be an incremental upgrade package or a full upgrade package. The incremental upgrade package is the incremental data of the application stored on the remote host and the application stored on the target component module. The full upgrade package is the upgrade package of the complete new application.

[0053] S204: After detecting that the upgrade package of the target component module has been completely transmitted, perform integrity check on the upgrade package of the target component module.

[0054] The integrity check is used to check whether the upgrade package received by the target component is identical to the upgrade package stored on the remote host. The integrity check may adopt any existing integrity check algorithm, such as the CRC32 check algorithm.

[0055] S205: If the integrity check succeeds, update the pre-stored old application program according to the upgrade package of the target component module to obtain a new application program, and run the new application program on the target application program.

[0056] Among them, the pre-stored old application is the application currently stored in the target component module (the application existing at the time of update and upgrade). If the integrity check of the upgrade package of the target component module is successful, the new application is used to update the application currently stored in the target component module according to the upgrade package from the remote host. If the upgrade package is an incremental upgrade package, it is necessary to merge the incremental upgrade package and the old application currently stored in the target component module to obtain the new application; if the upgrade package is a full upgrade package, the full upgrade package is decompressed to obtain the new application, and then the new application is run on the target component module to complete the program upgrade of the target component module.

[0057] In one or more embodiments, the receiving the upgrade package of the target component module sent by the remote host in response to the download request includes:

[0058] Receiving a plurality of data packets sequentially sent from the remote host;

[0059] The multiple data packets are reassembled to obtain the upgrade package.

[0060] For example, the network communication protocol between the remote host and the target component only allows a 128K data packet to be transmitted at a time, and the size of the upgrade package is much larger than 128K. In this case, the remote host will segment the upgrade package to obtain multiple 128K data packets. The size of the last data packet may be less than 128K, and the insufficient part can be filled with a specified padding character. Then the multiple data packets are numbered in sequence, for example: numbered from 1, 2, 3, ..., and then multiple data packets are transmitted to the target component module in order from small to large. The target component module receives the multiple data packets sent by the remote host in sequence, and reassembles the multiple data packets in order from small to large to obtain an upgrade package. If the specified padding character is stored in the last data packet, the padding character needs to be removed.

[0061] Among them, each data packet will carry a stop transmission indicator. When the value of the stop transmission indicator is a preset value, it indicates that the data packet is the last data packet, that is, the transmission process of the upgrade package is completed. For example: the target component module will detect the stop transmission indicator every time it receives a data packet. When the value of the transmission indicator is 1, it means that the data packet is the last data packet, and then all previously received data packets will be reassembled to obtain a complete upgrade package.

[0062] In one or more embodiments, the updating of the pre-stored old application program to obtain the new application program according to the upgrade package of the target component module further includes:

[0063] A stop-work instruction is sent to other component modules in the financial robot except the target component module; wherein the stop-work instruction is used to instruct the other component modules to stop working.

[0064] After the new application program is successfully executed, a work resumption instruction is sent to the other component modules; wherein the work resumption instruction is used to instruct the other component modules to resume work.

[0065] Among them, each component module can only work properly with the cooperation of each other. During the upgrade process of the target component module of the financial robot, other component modules of the financial robot cannot work normally. During the upgrade process, the target component module sends a stop work instruction to other components after receiving the upgrade request. Then, after completing the upgrade process, the target component module sends a resume work instruction to other component modules through the modbus bus. Specifically, the target component module sends a resume work instruction to other component modules through the modbus bus after successfully running the new application. In this embodiment, each component upgrade module can be upgraded in parallel to improve the upgrade efficiency of each component module in the financial robot.

[0066] In one or more embodiments, the storage space of the component module is divided into a first storage space and a second storage space.

[0067] The first storage space and the second storage space are two independent storage spaces, which can be located in two different memories or in the same memory. The first storage space is used to store the upgrade package downloaded from the remote host, and the second storage space is used to store the current application in the target component module.

[0068] In one or more embodiments, the updating of the pre-stored old application program according to the upgrade package of the target component module to obtain the new application program includes:

[0069] Acquire the old application currently stored in the target component module in the second storage space;

[0070] The upgrade package and the old application stored in the first storage space are incrementally updated to obtain a new application.

[0071] The incremental upgrade package is the differential data between the application stored on the remote host and the application stored on the target component module. The remote host can reduce the amount of transmitted data by sending the incremental upgrade package to the target component module.

[0072] In one or more embodiments, further comprising:

[0073] When the integrity check fails, sending a check failure message to the remote host, obtaining the old application from the second storage space and running it on the target component module; or

[0074] When the integrity check succeeds, the new application is overwritten into the second storage space.

[0075] When the integrity check fails or the new application fails to run on the target component, a check failure message is sent to the remote host. After receiving the check failure message, the remote host resends the upgrade package to the target component module, and then uses Figure 2 The upgrade process is performed again in the same manner as in the example. At the same time, the target upgrade module obtains the previous old application from the second storage space and uses the old application to run. If the integrity check succeeds, the old application is overwritten and written to the second storage space.

[0076] The beneficial effects of the present application include: by using Ymodem as the transmission protocol to transmit the upgrade package, the communication between the component module of the financial robot and the remote host is realized through the ModbusRTU networking method, and only after the upgrade is successful, the pre-stored old application is updated according to the upgrade package of the module of the target component to obtain the new application, thereby ensuring the security and reliability of the application on the component module of the upgraded financial robot. In addition, if an abnormal situation occurs during the upgrade of the application of the component module (including when the integrity check fails or the new application fails to run on the target component), the application of the component module is restored to its original state, thereby further ensuring the security and reliability of the application on the component module of the upgraded financial robot.

[0077] The following are device embodiments of the present application, which can be used to execute the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.

[0078] See also Figure 3 , which shows a schematic diagram of the structure of the component modules of the financial robot provided by an exemplary embodiment of the present application. The component modules of the financial robot can be implemented as all or part of the financial robot through software, hardware or a combination of both. Component module 3 is the target component module to be upgraded, and the component module 3 includes: a transceiver unit 30, a verification unit 31 and an update unit 32.

[0079] The transceiver unit 30 is used to receive an upgrade request from a remote host; wherein the upgrade request carries an identifier of a target component module to be upgraded;

[0080] sending a download request to the remote host in response to the upgrade request;

[0081] Receiving an upgrade package of the target component module sent from the remote host in response to the download request; wherein the transmission protocol of the upgrade package is Ymodem protocol;

[0082] The verification unit 31 is used to perform integrity verification on the upgrade package of the target component module after detecting that the upgrade package of the target component module has been transmitted;

[0083] The updating unit 32 is configured to update the pre-stored old application program to obtain a new application program according to the upgrade package of the target component module if the integrity check succeeds, and run the new application program on the target component module.

[0084] In one or more embodiments, the receiving the upgrade package of the target component module sent by the remote host in response to the download request includes:

[0085] Receiving a plurality of data packets sequentially sent from the remote host;

[0086] The multiple data packets are reassembled to obtain the upgrade package.

[0087] In one or more embodiments, further comprising:

[0088] a determination unit, configured to parse a value of a stop transmission indicator carried in each data packet;

[0089] When the value of the transmission stop indicator is a preset value, it is determined that the transmission of the upgrade package is completed.

[0090] In one or more embodiments, the transceiver unit 30 is further configured to:

[0091] A stop-work instruction is sent to other component modules in the financial robot except the target component module; wherein the stop-work instruction is used to instruct the other component modules to stop working.

[0092] After the new application program is successfully executed, a work resumption instruction is sent to the other component modules; wherein the work resumption instruction is used to instruct the other component modules to resume work.

[0093] In one or more embodiments, the storage space of the target component module is divided into a first storage space and a second storage space.

[0094] In one or more embodiments, the updating of the pre-stored old application program according to the upgrade package of the target component module to obtain the new application program includes:

[0095] Acquire the old application currently stored in the target component module in the second storage space;

[0096] The upgrade package and the old application stored in the first storage space are incrementally updated to obtain a new application.

[0097] In one or more embodiments, a writing unit is further included, which is used to send a check failure message to the remote host when the integrity check fails, and obtain the old application from the second storage space to run on the target component module; or

[0098] When the integrity check succeeds, the new application is overwritten into the second storage space.

[0099] It should be noted that the component modules of the financial robot provided in the above embodiments only use the division of the above functional modules as an example when executing the financial robot component module upgrade method. In actual applications, the above functional allocation can be completed by different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the component modules of the financial robot provided in the above embodiments and the financial robot component module upgrade method embodiment belong to the same concept, and the implementation process thereof is detailed in the method embodiment, which will not be repeated here.

[0100] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0101] The present application also provides a computer storage medium, which can store multiple instructions, and the instructions are suitable for being loaded and executed by a processor as described above. Figure 2 The method steps of the embodiment shown in the figure can be found in the specific execution process. Figure 2 The specific description of the illustrated embodiment will not be repeated here.

[0102] See also Figure 4 , which is a schematic diagram of the component module structure of a financial robot according to an embodiment of the present application. Figure 4 As shown, the component module 1000 is Figure 1 The target component module to be upgraded in the business robot, the component module 1000 may include: at least one processor 1001, at least one network interface 1004, a user interface 1003, a memory 1005, and at least one communication bus 1002.

[0103] The communication bus 1002 is used to realize the connection and communication between these components.

[0104] The user interface 1003 may include a display screen (Display) and a camera (Camera), and the optional user interface 1003 may also include a standard wired interface and a wireless interface.

[0105] The network interface 1004 may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface), and a modbus bus.

[0106] Among them, the processor 1001 may include one or more processing cores. The processor 1001 uses various interfaces and lines to connect the various parts of the entire financial robot 1000, and executes various functions and processes data of the financial robot 1000 by running or executing instructions, programs, code sets or instruction sets stored in the memory 1005, and calling data stored in the memory 1005. Optionally, the processor 1001 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 1001 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; and the modem is used to process wireless communication. It can be understood that the above-mentioned modem may not be integrated into the processor 1001, and it can be implemented separately through a chip.

[0107] Among them, the memory 1005 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory 1005 includes a non-transitory computer-readable storage medium. The memory 1005 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 1005 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 1005 may optionally be at least one storage device located away from the aforementioned processor 1001. As Figure 4 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module and an application program.

[0108] exist Figure 4In the component module 1000 shown, the user interface 1003 is mainly used to provide an input interface for the user and obtain the data input by the user; and the processor 1001 can be used to call the application program interface configuration stored in the memory 1005, and specifically perform the following operations:

[0109] Receiving an upgrade request from a remote host; wherein the upgrade request carries an identifier of a target component module to be upgraded;

[0110] Sending a download request to the remote host in response to the upgrade request via the network interface 1004;

[0111] Receiving, through the network interface 1004, an upgrade package of the target component module sent by the remote host in response to the download request; wherein the transmission protocol of the upgrade package is the Ymodem protocol;

[0112] After detecting that the upgrade package of the target component module has been transmitted, performing integrity check on the upgrade package of the target component module;

[0113] If the integrity check succeeds, the pre-stored old application is updated according to the upgrade package of the target component module to obtain a new application, and the new application is run on the target component module.

[0114] In one or more embodiments, the processor 1001 executes the receiving of the upgrade package of the target component module sent by the remote host in response to the download request, including:

[0115] Receiving a plurality of data packets sequentially sent from the remote host;

[0116] The multiple data packets are reassembled to obtain the upgrade package.

[0117] In one or more embodiments, the processor 1001 is further configured to:

[0118] Parsing the value of the stop transmission indicator carried in each data packet;

[0119] When the value of the transmission stop indicator is a preset value, it is determined that the transmission of the upgrade package is completed.

[0120] In one or more embodiments, the processor 1001 is further configured to:

[0121] A stop-work instruction is sent to other component modules in the financial robot except the target component module through the network interface 1004; wherein the stop-work instruction is used to instruct the other component modules to stop working.

[0122] After the new application program is successfully executed, a resume operation instruction is sent to the other component modules through the network interface 1004; wherein the resume operation instruction is used to instruct the other component modules to resume operation.

[0123] In one or more embodiments, the storage space of the target component module is divided into a first storage space and a second storage space.

[0124] In one or more embodiments, the processor 1001 executes the updating of the pre-stored old application program according to the upgrade package of the target component module to obtain the new application program, including:

[0125] Acquire the old application currently stored in the target component module in the second storage space;

[0126] The upgrade package and the old application stored in the first storage space are incrementally updated to obtain a new application.

[0127] In one or more embodiments, the processor 1001 is further configured to execute:

[0128] When the integrity check fails, sending a check failure message to the remote host, obtaining the old application from the second storage space and running it on the target component module; or

[0129] When the integrity check succeeds, the new application is overwritten into the second storage space.

[0130] Among them, this application uses Ymodem as the file transfer protocol and modbus RTU as the transmission method to upgrade the application programs of each component module in the driven financial robot. To ensure that when an abnormality occurs during the upgrade process (the abnormality includes incomplete files or power failure during the upgrade process, etc.), the processor of the component module can return to the initial operating state, the application method described in this application has the characteristics of occupying small resources, can be completed in the embedded system chip of the component module, and can also be run on a bare metal, and has relatively high portability.

[0131] The concept and Figure 2 The method embodiment is the same as that of the embodiment, and the technical effect it brings is also the same. The specific process can be referred to Figure 2 The description of the embodiments will not be repeated here.

[0132] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only storage memory, or a random access memory, etc.

[0133] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.

Claims

1. A method for upgrading a component module of a financial robot, characterized in that: include: The financial robot receives an upgrade request from a remote host; wherein the upgrade request carries an identifier of a target component module to be upgraded, the financial robot includes a plurality of component templates, each component module is provided with a separate processor and memory, each component module has the ability to communicate with the remote host separately, and each component module communicates with each other based on a modbus bus; sending a download request to the remote host in response to the upgrade request; Receiving an upgrade package of the target component module sent from the remote host in response to the download request; wherein the transmission protocol of the upgrade package is Ymodem protocol; After detecting that the upgrade package of the target component module has been transmitted, performing integrity check on the upgrade package of the target component module; If the integrity check succeeds, updating the pre-stored old application program according to the upgrade package of the target component module to obtain a new application program, and running the new application program on the target component module; Sending a stop work instruction to other component modules in the financial robot except the target component module; wherein the stop work instruction is used to instruct the other component modules to stop working; after the new application successfully runs, sending a resume work instruction to the other component modules; wherein the resume work instruction is used to instruct the other component modules to resume working.

2. The method according to claim 1, characterized in that The receiving an upgrade package of the target component module sent by the remote host in response to the download request comprises: Receiving a plurality of data packets sequentially sent from the remote host; The multiple data packets are reassembled to obtain the upgrade package.

3. The method according to claim 2, characterized in that After detecting that the upgrade package of the target component module has been transmitted, before performing integrity check on the upgrade package of the target component module, the method further includes: Parsing the value of the stop transmission indicator carried in each data packet; When the value of the transmission stop indicator is a preset value, it is determined that the transmission of the upgrade package is completed.

4. The method according to claim 1, characterized in that: The storage space of the target component module is divided into a first storage space and a second storage space.

5. The method according to claim 4, characterized in that The updating of the pre-stored old application program according to the upgrade package of the target component module to obtain the new application program comprises: Acquire the old application currently stored in the target component module in the second storage space; The upgrade package and the old application stored in the first storage space are incrementally updated to obtain a new application.

6. The method according to claim 5, characterized in that Also includes: When the integrity check fails, sending a check failure message to the remote host, obtaining the old application from the second storage space and running it on the target component module; or When the integrity check succeeds, the new application is overwritten into the second storage space.

7. A component module of a financial robot, characterized in that: The component module is a target component module, and the target component module includes: A transceiver unit, used for receiving an upgrade request from a remote host; wherein the upgrade request carries an identifier of a target component module to be upgraded, the financial robot comprises a plurality of component templates, each component module is provided with a separate processor and memory, each component module has the ability to communicate with the remote host separately, and each component module communicates with each other based on a modbus bus; sending a download request to the remote host in response to the upgrade request; Receiving an upgrade package of the target component module sent from the remote host in response to the download request; wherein the transmission protocol of the upgrade package is Ymodem protocol; A verification unit, configured to perform integrity verification on the upgrade package of the target component module after detecting that the upgrade package of the target component module has been transmitted; an updating unit, configured to update the pre-stored old application program to obtain a new application program according to the upgrade package of the target component module if the integrity check succeeds, and to run the new application program on the target component module; The transceiver unit is also used to send a stop work instruction to other component modules in the financial robot except the target component module; wherein the stop work instruction is used to instruct the other component modules to stop working; after the new application runs successfully, send a resume work instruction to the other component modules; wherein the resume work instruction is used to instruct the other component modules to resume working.

8. A component module of a financial robot, characterized in that: include: A processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the method steps as claimed in any one of claims 1 to 6.

9. A financial robot, characterized in that: Comprising the component module as claimed in claim 8.

Citation Information

Patent Citations

  • Method and system for upgrading software program of intelligent robot

    CN105893091A