CN112328290A - Remote updating method and system for agricultural machinery data acquisition terminal program - Google Patents

Remote updating method and system for agricultural machinery data acquisition terminal program Download PDF

Info

Publication number
CN112328290A
CN112328290A CN202011400870.XA CN202011400870A CN112328290A CN 112328290 A CN112328290 A CN 112328290A CN 202011400870 A CN202011400870 A CN 202011400870A CN 112328290 A CN112328290 A CN 112328290A
Authority
CN
China
Prior art keywords
data
program
acquisition terminal
module
frame
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011400870.XA
Other languages
Chinese (zh)
Other versions
CN112328290B (en
Inventor
陈洪涛
张明明
郭延超
张钏钏
李金广
吉俊蓉
陈松
王岗
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
First Tractor Co Ltd
Original Assignee
First Tractor Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by First Tractor Co Ltd filed Critical First Tractor Co Ltd
Priority to CN202011400870.XA priority Critical patent/CN112328290B/en
Publication of CN112328290A publication Critical patent/CN112328290A/en
Application granted granted Critical
Publication of CN112328290B publication Critical patent/CN112328290B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

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

Abstract

The invention relates to a remote program updating method and a remote program updating system for an agricultural machine data acquisition terminal, wherein in the process of electrifying and operating the data acquisition terminal, when a program updating requirement exists, a file is uploaded through a program updating operation interface and relevant information is input to start updating, the program file is sent to the data acquisition terminal through a data platform and is stored in a NorFlash memory of the data acquisition terminal, the operation of the current program is not influenced, when the program is electrified and operated again, the program is started to detect updating through a Bootloader, program data stored in the NorFlash memory is written into a Flash memory in a microprocessor chip frame by frame to complete the updating of the program, and then the updated program is operated to realize interaction with the data platform; by adopting an off-chip Flash redundant storage technology and carrying out summation inspection or one-by-one comparison on data in each link of the updating process, the data acquisition terminal of the tractor can be updated remotely, in real time, in batches and reliably.

Description

Remote updating method and system for agricultural machinery data acquisition terminal program
Technical Field
The invention relates to the technical field of vehicle remote monitoring, in particular to a remote updating method and system for a program of an agricultural machinery data acquisition terminal.
Background
Along with the continuous promotion of the informatization degree and the intellectualization degree of the agricultural machinery, a data acquisition terminal capable of carrying out remote real-time monitoring on the working condition and the fault data of the agricultural machinery becomes a standard matching device of the agricultural machinery. In actual loading application, due to the new requirement of control, the program preinstalled in the data acquisition terminal is necessarily updated. In the past, technicians are required to carry computers and downloaders to travel to the field for service when programs in agricultural machine data acquisition terminals are updated. When a batch updating accident occurs, for thousands of agricultural machines distributed all over the country, the following obvious defects exist by adopting the program updating mode: (1) the cost of manpower and material resources consumed by the updating service is high, and the agricultural machinery manufacturer cannot accept the cost; (2) the updating service efficiency is low, the response speed is slow, and the agricultural machinery user can not accept the method. In the face of the contradiction, how to perform remote, real-time, batch and stable updating on the agricultural machinery data acquisition terminal becomes a common concern for agricultural machinery manufacturers and users.
In the prior art, many studies on remote program updating have been made, but the main application places of the devices and methods for remote program updating are industrial fields or power distribution networks, and the main factors causing poor reliability of program updating are that data accuracy verification is not performed on all links of program updating, an adopted data verification mode is weak in error detection capability, and emergency situations such as power failure and signal interruption are not protected.
In addition, in the process of remotely updating programs of agricultural machine data acquisition terminals, besides the problems, the problems of sudden power failure of the whole vehicle, unexpected interruption of wireless signals, simultaneous program updating of a plurality of data acquisition terminals and the like exist.
Disclosure of Invention
Aiming at the defects of the prior art, the invention aims to provide a remote updating method and a remote updating system for programs of an agricultural machine data acquisition terminal, which can remotely, real-timely, massively and reliably update the agricultural machine data acquisition terminal and can effectively solve the problems.
In order to achieve the purpose, the invention adopts the technical scheme that:
a remote program updating method for an agricultural machinery data acquisition terminal is characterized in that the data acquisition terminal is connected to a data platform through a wireless transmission network, the data platform is provided with a program updating operation interface, the data acquisition terminal comprises a wireless transmission data module, a microprocessor module, a Norflash storage module and a CAN bus module, the data platform sends a corresponding instruction frame or data frame to the data acquisition terminal in real time and receives a response frame or data frame from the data acquisition terminal, and the data acquisition terminal sends the response frame or data frame containing agricultural machinery working conditions, faults and the like to the data platform in real time and receives the instruction frame or data frame from the data platform; the program remote updating method comprises the following steps:
(1) an operator uploads a program file to be updated through a program updating operation interface of the data platform and stores the program file to a designated position of the data platform, inputs an IMEI number of a data acquisition terminal needing to update a program, selects a corresponding button and starts updating operation;
(2) the data platform judges whether the corresponding data acquisition terminal has a program updating requirement or not according to the input information of the program updating operation interface and the received standard data frame sent by the data acquisition terminal, and sends a program updating instruction frame to the data acquisition terminal with the program updating requirement; when the data acquisition terminal receives a program updating instruction frame sent by the data platform, sending a ready state frame to the data platform;
(3) the data platform starts a program updating thread when receiving a ready state frame sent by a data acquisition terminal, in the program updating thread, program data are extracted from a program file to be updated successively and summed and verified to generate a check code, and then the extracted program data and the generated check code are packaged into a program updating data packet to be sent to the data acquisition terminal;
(4) when the data acquisition terminal receives a program updating data packet, extracting program data in the program updating data packet, generating a check code in a summing mode according to the extracted program data, and comparing whether the generated check code is consistent with the check code in the program updating data packet: if the program data are consistent with the program data, writing the extracted program data into the NorFlash storage module; if the program data are inconsistent, completely clearing the program data which are written into the Norflash memory module before, and sending a data frame of failed update to the data platform;
for the case that the check codes are consistent and the program data have already been written into the NorFlash memory module, the program data that has just been written into the NorFlash memory module are further extracted and compared with the program data before being written: if the data frames are consistent, sending a data frame with successful update to the data platform; if the program data are inconsistent, completely clearing the program data which are written into the NorFlash memory module before, and sending a data frame of failed update to the data platform;
(5) the data platform receives a data frame sent by the data acquisition terminal: if the data frame is a successful update data frame, continuing to extract program data from the program file to be updated and sending a next program update data packet until the transmission is finished, and finally sending a program update finishing instruction frame to the data acquisition terminal; if the data frame is a failed update data frame, extracting program data from the program file to be updated from the beginning again to form a program update data packet and sending the program update data packet;
(6) when an application program of the data acquisition terminal receives an update ending instruction frame sent by the data platform, setting a program update flag to be 1 and writing the program update flag into the NorFlash memory module; and when the data acquisition terminal is powered on again for the next time, the Bootloader starts the program to run the updated program.
Further, in step (6), when the data acquisition terminal is powered on again next time, the Bootloader starts the program to run the updated program, and the method specifically includes:
(6.1) after the data acquisition terminal is powered on, operating a Bootloader starting program located at the address of a Flash memory 0 in the microprocessor module;
(6.2) reading a program updating mark from the NorFlash memory module in the Bootloader starting program, if the program updating mark is 0, indicating that no program data needing to be updated exists in the NorFlash memory module, and controlling a PC pointer to jump to the position of an application program in a Flash memory in a microprocessor module chip by the Bootloader starting program to operate; if the program updating mark is 1, indicating that the NorFlash memory module has program data to be updated, and updating the application program in the Flash memory in the microprocessor module chip;
(6.3) when the NorFlash memory module has program data to be updated, firstly, erasing the position of an application program in the Flash memory in the microprocessor module in the Bootloader starting program; then reading a data frame from the NorFlash memory module, unlocking the Flash memory in the microprocessor module, writing the read data frame into the position of an application program in the Flash memory in the microprocessor module, and locking the Flash memory in the microprocessor module; and then reading the data frame just written from the Flash memory in the microprocessor module chip and comparing the data frame with the data frame content before writing one by taking characters as units:
if all the character values are consistent, the data writing is successful, and the writing of the next frame data is continued;
if the data frames are inconsistent, the writing is failed, all data which are written into the position of the application program in the Flash memory in the microprocessor module chip before are required to be cleared, and the writing operation is started from the data frame 1 again until all the data frames are successfully written; after all data frames are successfully written, setting the program updating mark to be 0 and writing the program updating mark into the NorFlash memory module;
and (6.4) finally, controlling a PC pointer to jump to the position of the application program in the Flash memory in the microprocessor module chip by the Bootloader starting program to run the updated program.
Further, the specific operation of reading the data frame from the NorFlash memory module in the step (6.3) is to read 8 pages of data and 256 bytes per page from the 2 nd data block of the NorFlash memory module at each time to form a data frame of 2048 bytes.
Further, the data acquisition terminal writes the program data extracted from the data updating data packet into the No. 2 data block of the NorFlash memory module, and writes the program updating mark into the No. 1 data block of the NorFlash memory.
Further, the step (3) of successively extracting the program data is to extract the program data by 1024 bytes at a time.
Furthermore, during the operation of the application program of the data acquisition terminal, the microprocessor module acquires the working condition and position data of the agricultural machine from the CAN bus module in real time, packages the working condition and position data with the IMEI number and software version number information of the data acquisition terminal into a standard data frame, and then sends the standard data frame to the data platform through the wireless data transmission module at a specified frequency.
A remote program updating system for an agricultural machinery data acquisition terminal comprises a data platform, a wireless data transmission network and a data acquisition terminal; wherein the data platform is bidirectionally interconnected with the wireless data transmission network, the wireless data transmission network is bidirectionally interconnected with the data acquisition terminal,
the data acquisition terminal specifically includes: the device comprises a DC/DC voltage conversion module, an LDO voltage conversion module, a wireless data transmission module, a microprocessor module, a NorFlash memory module and a CAN bus module; the system comprises a DC/DC voltage conversion module, an LDO voltage conversion module, a wireless data transmission module, a microprocessor module, a NorFlash memory module and a CAN communication module, wherein the DC/DC voltage conversion module is unidirectionally connected with the LDO voltage conversion module, the LDO voltage conversion module is unidirectionally connected with the wireless data transmission module, the microprocessor module, the NorFlash memory module and the CAN communication module respectively, the wireless data transmission module is bidirectionally interconnected with the microprocessor module, the microprocessor module is bidirectionally interconnected with the NorFlash memory module, and the; the NorFlash storage module is used for storing program updating data;
the data platform sends a corresponding instruction frame or a data frame to the data acquisition terminal in real time by using a socket, connection establishment, monitoring, data sending and data receiving network interface functions and receives a response frame or a data frame from the data acquisition terminal through the network equipment via a wireless data transmission network; the data acquisition terminal transmits a response frame or a data frame containing agricultural working conditions and faults to the data platform in real time through a GPRS antenna via a wireless data transmission network and receives an instruction frame or a data frame from the data platform; the data platform comprises a program updating operation interface which is used for inputting and starting program remote updating operation in a manual operation mode.
Furthermore, a wireless data transmission module of the data acquisition terminal establishes a data link with the data platform through a GPRS antenna on one hand, and is connected with the microprocessor module through a serial port bus and a high-speed signal voltage conversion circuit on the other hand;
the microprocessor module receives the instruction frame or the data frame sent by the wireless data transmission module in real time, processes and converts the instruction frame or the data frame and returns the instruction frame or the data frame to the wireless data module or stores the instruction frame or the data frame into the NorFlash memory module, and extracts related data from the NorFlash memory module or collects vehicle working condition and fault information sent by the CAN bus module in real time, processes and converts the vehicle working condition and the fault information and sends the vehicle working condition and the fault information to the wireless;
the NorFlash memory module is responsible for writing data frames sent by the microprocessor module into a corresponding address space on one hand, and is responsible for extracting data from a specified address space and providing the data to the microprocessor module on the other hand;
the CAN bus module acquires vehicle working condition and fault information from the CAN bus network of the whole agricultural machinery vehicle and sends the vehicle working condition and fault information to the microprocessor module, and receives CAN messages sent by the microprocessor module in real time and sends the CAN messages to the CAN bus network of the whole agricultural machinery vehicle.
Furthermore, a program updating operation interface of the data platform is provided with a data acquisition terminal selection button, a data acquisition terminal IMEI number input frame, a data acquisition terminal updating progress display bar, a batch import button, an update log query button, a to-be-updated program file upload button, a to-be-updated program file information display frame and a to-be-updated program file icon display frame, wherein the batch import button is used for sequentially importing the IMEI numbers of the data acquisition terminals in the excel file into the IMEI number input frame of each data acquisition terminal in sequence, the update button is used for starting the program remote updating batch operation, the update log query button is used for querying the IMEI number, the software version number and the updating time information of the data acquisition terminal which finishes the remote updating operation, and the to-be-updated program file upload button is used for storing the to-be-updated program file to a designated position, the program file to be updated information display frame is used for displaying information such as a software version number and a program size of a current program file to be updated, and the program file to be updated icon display frame is used for displaying an icon indicating the current program file to be updated.
Has the advantages that:
in the process of remotely updating the program, the off-chip Flash redundant storage technology is adopted, the NorFlash memory is arranged on the data acquisition terminal and used for storing the remotely updated program data, the application program of the data acquisition terminal is stored in the on-chip Flash memory of the microprocessor, the storage spaces of the on-chip Flash memory and the on-chip Flash memory are mutually independent, the reliability of remotely updating the program can still be ensured under the conditions that the power supply of a tractor is unstable and the signal is weak, and the off-chip Flash redundant storage technology can be used on tractors with unreliable power supply (such as sudden power failure of the whole tractor) and low signal coverage rate (such as remote mountainous.
In the process of remote updating of the program, the invention adopts summation check or one-by-one comparison to verify the data accuracy of all links of the program updating, when a data platform sends a program updating data packet to a data acquisition terminal, a check code is generated by summation, the data acquisition terminal needs to perform summation check every time the program data is extracted, the program data is written into a Norflash memory after being verified to be consistent, and the program data is compared with the data before being written after being written to ensure the accuracy of the written data, when the Flash memory in a microprocessor module reads and writes the program data from the Norflash memory, a mode of reading one frame and writing one frame is adopted, the Flash memory is locked for one-by-one comparison check every time the program data is written to ensure the accuracy of the written data, namely, the full and strict data verification is performed on all links of the program updating, and the accuracy of data transmission and the reliability of the remote updating of the
The remote updating method and the remote updating system for the agricultural machine data acquisition terminal program can realize remote, real-time, batch and reliable updating of the agricultural machine data acquisition terminal, reduce the cost of manpower and material resources required by the agricultural machine data acquisition terminal in the batch updating process to the maximum extent, improve the efficiency and response speed of the program updating service of the data acquisition terminal, and meet the urgent requirements of agricultural machine manufacturers and users.
Drawings
FIG. 1 is a schematic diagram of a main structure of a remote program update system according to the present invention;
FIG. 2 is a schematic structural diagram of a data acquisition terminal according to the present invention;
FIG. 3 is a schematic diagram of a program update operation interface of the data platform according to the present invention.
Detailed Description
The invention is described in further detail below with reference to the figures and specific examples.
As shown in fig. 1, an agricultural machinery data acquisition terminal program remote updating system includes: the system comprises a data platform 1, a wireless data transmission network 2 and a data acquisition terminal 3; the data platform 1 is connected with the wireless data transmission network 2 in a bidirectional mode, and the wireless data transmission network 2 is connected with the data acquisition terminal 3 in a bidirectional mode.
As shown in fig. 2, the data acquisition terminal 3 includes: the device comprises a DC/DC voltage conversion module 4, an LDO voltage conversion module 5, a wireless data transmission module 6, a microprocessor module 7, a NorFlash memory module 8 and a CAN bus module 9; the DC/DC voltage conversion module 4 is unidirectionally connected with the LDO voltage conversion module 5, the LDO voltage conversion module 5 is unidirectionally connected with the wireless data transmission module 6, the microprocessor module 7, the NorFlash memory module 8 and the CAN communication module 9 respectively, the wireless data transmission module 6 is bidirectionally interconnected with the microprocessor module 7, the microprocessor module 7 is bidirectionally interconnected with the NorFlash memory module 8, and the microprocessor module 7 is bidirectionally interconnected with the CAN bus module 9.
In the data acquisition terminal 3, devices such as a TVS bleeder diode and a 220uF/50V filter capacitor are applied to filter a 12V power supply from a vehicle-mounted storage battery, and the processed 12V power supply is sent to a DC/DC voltage conversion module 4 with the conversion efficiency of more than 90% to be converted to generate a 5V power supply; the 5V power supply is further converted by an LDO voltage conversion module 5 which has small electromagnetic interference and stable output to generate 3.3V and 4.2V power supplies, wherein the 3.3V power supply is applied to a microprocessor module 7, a NorFlash memory module 8 and a CAN bus module 9, and the 4.2V power supply is applied to a wireless data transmission module 6; the wireless data transmission module 6 establishes a data link with the data platform 1 through a GPRS antenna on the one hand, and is connected with the microprocessor module 7 through a serial port bus and a high-speed signal voltage conversion circuit on the other hand, the high-speed signal voltage conversion circuit mainly converts a 4.2V voltage signal from the wireless data transmission module 6 into a 3.3V voltage signal and sends the signal to the microprocessor module 7 or converts a 3.3V voltage signal from the wireless microprocessor module 7 into a 4.2V voltage signal and sends the signal to the wireless data transmission module 6; on one hand, the microprocessor module 7 receives the instruction frame or the data frame sent by the wireless data transmission module 6 in real time, processes and converts the instruction frame or the data frame, and sends the instruction frame or the data frame back to the wireless data module 6 or stores the instruction frame or the data frame into the NorFlash memory module 8, on the other hand, the microprocessor module extracts relevant data from the NorFlash memory module 8 or collects vehicle working condition and fault information sent by the CAN bus module 9 in real time, processes and converts the vehicle working condition and the fault information and; the NorFlash memory module 8 is responsible for writing the data frame sent by the microprocessor module 7 into the corresponding address space on one hand, and is responsible for extracting data from the specified address space and providing the data to the microprocessor module 7 on the other hand; the CAN bus module 9 acquires information such as vehicle working conditions, faults and the like from the CAN bus network of the whole agricultural vehicle and sends the information to the microprocessor module 7, and receives CAN messages sent by the microprocessor module 7 in real time and sends the information to the CAN bus network of the whole agricultural vehicle.
The data platform 1 sends a corresponding instruction frame or data frame to the data acquisition terminal 3 in real time by using network interface functions such as socket, connection establishment, monitoring, data transmission, data reception and the like through a wireless data transmission network 2 by network equipment such as a router and the like, and receives a response frame or data frame from the data acquisition terminal; the data acquisition terminal 3 sends response frames or data frames containing agricultural machinery working conditions, faults and the like to the data platform in real time through the GPRS antenna via the wireless data transmission network 2 and by developing functions of network connection, data receiving, data sending and the like, and receives instruction frames or data frames from the data platform 1.
As shown in fig. 3, the data platform 1 is provided with a program remote update interface, which includes: button A is selected at data acquisition terminal No. 0, data acquisition terminal IMEI number input box B No. 0, data acquisition terminal update progress display strip C No. 0, button D is selected at data acquisition terminal No. 1, data acquisition terminal IMEI number input box E No. 1, data acquisition terminal update progress display strip F No. 1 button G is selected at data acquisition terminal No. 255, data acquisition terminal IMEI number input box H No. 255, data acquisition terminal update progress display strip I No. 255, and import button J in batches, update button K and update log inquiry button L.
Wherein the button A is selected by the No. 0 data acquisition terminal, the button D … … is selected by the No. 1 data acquisition terminal, the button G is selected by the No. 255 data acquisition terminal, the corresponding terminal is selected to participate in the program updating operation, the IMEI number input box B of the No. 0 data acquisition terminal, the IMEI number input box H of the No. 1 data acquisition terminal E … …, the IMEI number input box H of the No. 255 data acquisition terminal is used for receiving the IMEI number of the data terminal which is input or imported in batch by an operator, the updating progress display bar C of the No. 0 data acquisition terminal, the updating progress display bar I of the No. 1 data acquisition terminal F … …, the updating progress display bar I of the No. 255 data acquisition terminal is used for displaying the real-time updating progress of the corresponding terminal, the batch import button J is used for importing the IMEI numbers of the data acquisition terminals in the excel file into the IMEI number input boxes of the No., the updating button K is used for starting the program remote updating batch operation, the updating log query button L is used for querying information such as an IMEI number, a software version number and updating time of a data acquisition terminal which finishes the remote updating operation, the program file to be updated upload button M is used for storing the program file to be updated to a specified position of the data platform 1, the program file information display frame N to be updated is used for displaying information such as the software version number and the program size of the current file to be updated, and the program file icon display frame O to be updated is used for displaying an icon indicating the current program file to be updated.
A remote program updating method for an agricultural machinery data acquisition terminal mainly comprises the following steps:
(1) when the data acquisition terminal is powered on and operated, in an application program, the microprocessor module acquires data such as working conditions and positions of agricultural machinery from the CAN bus module in real time, packages the data with information such as an IMEI (international mobile equipment identity) number and a software version number of the data acquisition terminal into a standard data frame, and then sends the standard data frame to the data platform through the wireless data transmission module at a specified frequency.
(2) When a data acquisition terminal needs to perform program remote updating: firstly, an operator stores a program file to be updated to a designated position of a data platform through a program file uploading button M on a program updating operation interface of the data platform 1; then sequentially inputting the IMEI number of the corresponding data acquisition terminal into an IMEI number input box B of the No. 0 data acquisition terminal, an IMEI number input box E … … of the No. 1 data acquisition terminal and an IMEI number input box H of the No. 255 data acquisition terminal in a manual input mode or through a batch import button J; after the IMEI number is input, further confirming which terminals participate in the updating operation through a button A selected by the No. 0 data acquisition terminal and a button G selected by the No. 1 data acquisition terminal and a button D … … selected by the No. 255 data acquisition terminal; and finally, clicking an update button K to start the remote update batch operation of the program.
(3) The data platform judges whether the corresponding data acquisition terminal has the requirement of updating the program according to the input information of the program updating operation interface and the IMEI number and the software version number in the received standard data frame: and if not, sending a standard response data frame to the data acquisition terminal, and if so, sending a program updating instruction frame to the data acquisition terminal.
(4) The application program of the data acquisition terminal receives the data frames sent by the data platform in real time: if the data frame is the standard response data frame, continuing to transmit the next standard data frame; and if the program updating instruction frame is the program updating instruction frame, sending a ready state frame to the data platform.
(5) The data platform starts a program updating thread when receiving a ready state frame sent by a data acquisition terminal, extracts program data from a program file to be updated according to 1024 bytes each time in the program updating thread, sums the extracted program data to generate a check code, and packages the extracted program data and the generated check code into a program updating data packet to be sent to the data acquisition terminal.
(6) When an application program of the data acquisition terminal receives a program updating data packet, extracting program data in the program updating data packet, generating a check code in a summing mode according to the extracted program data, and comparing whether the generated check code is consistent with the check code in the program updating data packet or not;
if the program data are consistent, the extracted program data are written into the No. 2 data block of the Nor-Flash memory module 8; if the data blocks are inconsistent, the program data which are written into the No. 2 data block of the NorFlash memory module 8 are completely emptied, and a data frame which fails to update is sent to the data platform.
For the case in which the check codes are identical and the program data have already been written into the 2 nd data block of the NorFlash memory module 8, the program data that has just been written into the 2 nd data block of the NorFlash memory module 8 are further extracted and compared with the program data before being written: if the data frames are consistent, sending a data frame with successful update to the data platform; if the data blocks are inconsistent, the program data which are written into the No. 2 data block of the NorFlash memory module 8 are completely emptied, and a data frame which fails to update is sent to the data platform.
(7) The data platform receives a data frame sent by the data acquisition terminal: if the data frame is a successful update data frame, continuing to extract program data from the program file to be updated and sending a next program update data packet until the transmission is finished, and finally sending a program update finishing instruction frame to the data acquisition terminal; and if the data frame is the data frame which fails to be updated, extracting the program data from the program file to be updated from the beginning again to form a program update data packet and transmitting the program update data packet.
(8) When an application program of the data acquisition terminal receives an update ending instruction frame sent by the data platform, setting a program update flag to be 1 and writing the program update flag into the 1 st data block of the NorFlash memory module; when the data acquisition terminal is powered on again for the next time, the Bootloader starts the program to run the updated program, and the specific process is as follows:
(a) and after the data acquisition terminal is electrified again, operating a Bootloader starting program positioned at the address of the Flash memory 0 in the microprocessor module.
(b) Reading a program updating mark from a 1 st data block of the NorFlash memory module in a Bootloader starting program:
if the program update flag is 0, the fact that program data which need to be updated do not exist in the No. 2 data block of the NorFlash memory module is indicated, and the Bootloader starts a program to control a PC pointer to jump to the position of an application program in a Flash memory in a microprocessor module chip for operation;
if the program update flag is 1, it indicates that the NorFlash memory module 8 has program data to be updated in the 2 nd data block.
(c) When program data needing to be updated exist, in a Bootloader starting program: firstly, erasing the position of an application program in a Flash memory in a microprocessor module chip; then, forming a 2048-byte data frame from the 2 nd data block of the NorFlash memory module according to the fact that 8 pages of data (256 bytes in each page) are read each time, unlocking the Flash memory in the microprocessor module, writing the data frame into the position where an application program is located in the Flash memory in the microprocessor module 7, and locking the Flash memory in the microprocessor module 7; reading the data frame just written from the Flash memory in the microprocessor module chip and comparing the data frame with the content of the data frame before writing one by taking characters as a unit;
if all the character values are consistent, the data frame read out from the 2 nd data block of the NorFlash memory module is successfully written into the position of the application program in the Flash memory in the microprocessor module; if not, indicating that the writing fails;
if the writing is successful, continuing to write in the next frame data, if the writing is failed, clearing all data which are written into the position of the application program in the Flash memory in the microprocessor module chip before, and starting the writing operation from the 1 st frame data again until all data frames are successfully written in;
(d) after the writing is successful, setting the program updating mark to be 0 and writing the program updating mark into the 1 st data block of the NorFlash memory module; and finally, controlling a PC pointer to jump to the position of the application program in the Flash memory in the microprocessor module chip by the Bootloader starting program to operate.
The invention discloses a remote updating system and a remote updating method for agricultural machinery data acquisition terminal programs, wherein in the process of electrifying and operating a data acquisition terminal, when a program updating requirement exists, a program remote updating operation interface is used for manually uploading a file and inputting related information to start updating, the uploaded program file is sent to a data acquisition terminal through a data platform and stored in a Norflash memory of the data acquisition terminal, the operation of the current program is not influenced, when the program is electrified and operated again, a Bootloader is used for starting program detection and updating, program data stored in the Norflash memory are written into a Flash memory in a microprocessor chip frame by frame, the program updating is completed, then the updated program is operated again to acquire and send data such as working conditions and positions of agricultural machinery to the data platform, and the data platform realizes interaction.
The invention adopts the off-chip Flash redundant storage technology, and can still ensure the reliability of remote updating of the program under the conditions of unstable power supply and weak signal of the tractor; the data is strictly checked or is compared and verified one by one in each link of the updating process, so that the accuracy of data transmission is ensured, and the reliability of remote updating of the program is ensured; the program updating operation interface of the data platform is provided with buttons corresponding to batch operation, and batch operation and updating can be completed by the largest program under the condition that the server allows the program updating operation interface.
In general, the invention can realize remote, real-time, batch and reliable updating of the tractor data acquisition terminal, furthest reduces the manpower and material resource cost required by the tractor data acquisition terminal in the batch updating process, improves the efficiency and response speed of the program updating service of the data acquisition terminal, and meets the urgent requirements of tractor manufacturers and users.
Although the present invention has been described with reference to a preferred embodiment, it should be understood that various changes, substitutions and alterations can be made herein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (9)

1. A remote program updating method for an agricultural machinery data acquisition terminal is characterized in that the data acquisition terminal is connected to a data platform through a wireless transmission network, the data platform is provided with a program updating operation interface, the data acquisition terminal comprises a wireless transmission data module, a microprocessor module, a Norflash storage module and a CAN bus module, the data platform sends a corresponding instruction frame or data frame to the data acquisition terminal in real time and receives a response frame or data frame from the data acquisition terminal, and the data acquisition terminal sends the response frame or data frame containing agricultural machinery working conditions, faults and the like to the data platform in real time and receives the instruction frame or data frame from the data platform; the program remote updating method is characterized by comprising the following steps:
(1) an operator uploads a program file to be updated through a program updating operation interface of the data platform and stores the program file to a designated position of the data platform, inputs an IMEI number of a data acquisition terminal needing to update a program, selects a corresponding button and starts updating operation;
(2) the data platform judges whether the corresponding data acquisition terminal has a program updating requirement or not according to the input information of the program updating operation interface and the received standard data frame sent by the data acquisition terminal, and sends a program updating instruction frame to the data acquisition terminal with the program updating requirement; when the data acquisition terminal receives a program updating instruction frame sent by the data platform, sending a ready state frame to the data platform;
(3) the data platform starts a program updating thread when receiving a ready state frame sent by a data acquisition terminal, in the program updating thread, program data are extracted from a program file to be updated successively and summed and verified to generate a check code, and then the extracted program data and the generated check code are packaged into a program updating data packet to be sent to the data acquisition terminal;
(4) when the data acquisition terminal receives a program updating data packet, extracting program data in the program updating data packet, generating a check code in a summing mode according to the extracted program data, and comparing whether the generated check code is consistent with the check code in the program updating data packet: if the program data are consistent with the program data, writing the extracted program data into the NorFlash storage module; if the program data are inconsistent, completely clearing the program data which are written into the Norflash memory module before, and sending a data frame of failed update to the data platform;
for the case that the check codes are consistent and the program data have already been written into the NorFlash memory module, the program data that has just been written into the NorFlash memory module are further extracted and compared with the program data before being written: if the data frames are consistent, sending a data frame with successful update to the data platform; if the program data are inconsistent, completely clearing the program data which are written into the NorFlash memory module before, and sending a data frame of failed update to the data platform;
(5) the data platform receives a data frame sent by the data acquisition terminal: if the data frame is a successful update data frame, continuing to extract program data from the program file to be updated and sending a next program update data packet until the transmission is finished, and finally sending a program update finishing instruction frame to the data acquisition terminal; if the data frame is a failed update data frame, extracting program data from the program file to be updated from the beginning again to form a program update data packet and sending the program update data packet;
(6) when an application program of the data acquisition terminal receives an update ending instruction frame sent by the data platform, setting a program update flag to be 1 and writing the program update flag into the NorFlash memory module; and when the data acquisition terminal is powered on again for the next time, the Bootloader starts the program to run the updated program.
2. The remote updating method for the agricultural machinery data acquisition terminal program according to claim 1, wherein in the step (6), when the data acquisition terminal is powered on again next time, the Bootloader starts the program to run the updated program, and specifically comprises:
(6.1) after the data acquisition terminal is powered on, operating a Bootloader starting program located at the address of a Flash memory 0 in the microprocessor module;
(6.2) reading a program updating mark from the NorFlash memory module in the Bootloader starting program, if the program updating mark is 0, indicating that no program data needing to be updated exists in the NorFlash memory module, and controlling a PC pointer to jump to the position of an application program in a Flash memory in a microprocessor module chip by the Bootloader starting program to operate; if the program updating mark is 1, indicating that the NorFlash memory module has program data to be updated, and updating the application program in the Flash memory in the microprocessor module chip;
(6.3) when the NorFlash memory module has program data to be updated, firstly, erasing the position of an application program in the Flash memory in the microprocessor module in the Bootloader starting program; then reading a data frame from the NorFlash memory module, unlocking the Flash memory in the microprocessor module, writing the read data frame into the position of an application program in the Flash memory in the microprocessor module, and locking the Flash memory in the microprocessor module; and then reading the data frame just written from the Flash memory in the microprocessor module chip and comparing the data frame with the data frame content before writing one by taking characters as units:
if all the character values are consistent, the data writing is successful, and the writing of the next frame data is continued;
if the data frames are inconsistent, the writing is failed, all data which are written into the position of the application program in the Flash memory in the microprocessor module chip before are required to be cleared, and the writing operation is started from the data frame 1 again until all the data frames are successfully written; after all data frames are successfully written, setting the program updating mark to be 0 and writing the program updating mark into the NorFlash memory module;
and (6.4) finally, controlling a PC pointer to jump to the position of the application program in the Flash memory in the microprocessor module chip by the Bootloader starting program to run the updated program.
3. The agricultural machinery data acquisition terminal program remote updating method according to claim 2, characterized in that the specific operation of reading the data frame from the NorFlash memory module in the step (6.3) is to read 8 pages of data and 256 bytes per page from the No. 2 data block of the NorFlash memory module each time to form a data frame of 2048 bytes.
4. The agricultural machinery data acquisition terminal program remote updating method of claim 1, wherein the data acquisition terminal writes the program data extracted from the data update data packet into the No. 2 data block of the NorFlash memory module, and writes the program update flag into the No. 1 data block of the NorFlash memory.
5. The remote program updating method for the agricultural machinery data acquisition terminal according to claim 1, wherein the step of extracting the program data successively in the step (3) is to extract the program data 1024 bytes at a time.
6. The remote updating method for the agricultural machinery data acquisition terminal program according to claim 1, wherein in the operation of the application program of the data acquisition terminal, the microprocessor module acquires the agricultural machinery working condition and position data from the CAN bus module in real time, packages the agricultural machinery working condition and position data with the IMEI number and software version number information of the data acquisition terminal into a standard data frame, and then sends the standard data frame to the data platform through the wireless data transmission module at a specified frequency.
7. A remote program updating system for an agricultural machinery data acquisition terminal comprises a data platform, a wireless data transmission network and a data acquisition terminal; wherein data platform and wireless data transmission network two-way interconnect, wireless data transmission network and the two-way interconnect of data acquisition terminal, its characterized in that:
the data acquisition terminal specifically includes: the device comprises a DC/DC voltage conversion module, an LDO voltage conversion module, a wireless data transmission module, a microprocessor module, a NorFlash memory module and a CAN bus module; the system comprises a DC/DC voltage conversion module, an LDO voltage conversion module, a wireless data transmission module, a microprocessor module, a NorFlash memory module and a CAN communication module, wherein the DC/DC voltage conversion module is unidirectionally connected with the LDO voltage conversion module, the LDO voltage conversion module is unidirectionally connected with the wireless data transmission module, the microprocessor module, the NorFlash memory module and the CAN communication module respectively, the wireless data transmission module is bidirectionally interconnected with the microprocessor module, the microprocessor module is bidirectionally interconnected with the NorFlash memory module, and the; the NorFlash storage module is used for storing program updating data;
the data platform sends a corresponding instruction frame or a data frame to the data acquisition terminal in real time by using a socket, connection establishment, monitoring, data sending and data receiving network interface functions and receives a response frame or a data frame from the data acquisition terminal through the network equipment via a wireless data transmission network; the data acquisition terminal transmits a response frame or a data frame containing agricultural working conditions and faults to the data platform in real time through a GPRS antenna via a wireless data transmission network and receives an instruction frame or a data frame from the data platform; the data platform comprises a program updating operation interface which is used for inputting and starting program remote updating operation in a manual operation mode.
8. The agricultural machine data acquisition terminal program remote updating system of claim 7, wherein: the wireless data transmission module of the data acquisition terminal establishes a data link with the data platform through a GPRS antenna on one hand, and is connected with the microprocessor module through a serial port bus and a high-speed signal voltage conversion circuit on the other hand;
the microprocessor module receives the instruction frame or the data frame sent by the wireless data transmission module in real time, processes and converts the instruction frame or the data frame and returns the instruction frame or the data frame to the wireless data module or stores the instruction frame or the data frame into the NorFlash memory module, and extracts related data from the NorFlash memory module or collects vehicle working condition and fault information sent by the CAN bus module in real time, processes and converts the vehicle working condition and the fault information and sends the vehicle working condition and the fault information to the wireless;
the NorFlash memory module is responsible for writing data frames sent by the microprocessor module into a corresponding address space on one hand, and is responsible for extracting data from a specified address space and providing the data to the microprocessor module on the other hand;
the CAN bus module acquires vehicle working condition and fault information from the CAN bus network of the whole agricultural machinery vehicle and sends the vehicle working condition and fault information to the microprocessor module, and receives CAN messages sent by the microprocessor module in real time and sends the CAN messages to the CAN bus network of the whole agricultural machinery vehicle.
9. The agricultural machine data acquisition terminal program remote updating system of claim 7, wherein: the program updating operation interface of the data platform is provided with a data acquisition terminal selection button, a data acquisition terminal IMEI number input box, a data acquisition terminal updating progress display bar, a batch import button, an update log query button, a program file uploading button to be updated, a program file information display box to be updated and a program file icon display box to be updated, wherein the batch import button is used for sequentially importing the IMEI numbers of the data acquisition terminals in the excel file into the IMEI number input box of each data acquisition terminal in sequence, the update button is used for starting the remote updating batch operation of the program, the update log query button is used for querying the IMEI number, the software version number and the updating time information of the data acquisition terminal which finishes the remote updating operation, and the program file uploading button to be updated is used for storing the program file to be updated to the designated position of the data platform, the program file to be updated information display frame is used for displaying information such as a software version number and a program size of a current program file to be updated, and the program file to be updated icon display frame is used for displaying an icon indicating the current program file to be updated.
CN202011400870.XA 2020-12-04 2020-12-04 Remote updating method and system for agricultural machinery data acquisition terminal program Active CN112328290B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011400870.XA CN112328290B (en) 2020-12-04 2020-12-04 Remote updating method and system for agricultural machinery data acquisition terminal program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011400870.XA CN112328290B (en) 2020-12-04 2020-12-04 Remote updating method and system for agricultural machinery data acquisition terminal program

Publications (2)

Publication Number Publication Date
CN112328290A true CN112328290A (en) 2021-02-05
CN112328290B CN112328290B (en) 2023-08-22

Family

ID=74302072

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011400870.XA Active CN112328290B (en) 2020-12-04 2020-12-04 Remote updating method and system for agricultural machinery data acquisition terminal program

Country Status (1)

Country Link
CN (1) CN112328290B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030093782A1 (en) * 2001-11-13 2003-05-15 Gunawan Ali-Santosa Method and apparatus for remote software code update
CN101923110A (en) * 2009-06-09 2010-12-22 比亚迪股份有限公司 Method and device for detecting abnormal current of circuit
CN101957764A (en) * 2010-08-02 2011-01-26 珠海许继电气有限公司 Method for remotely updating remote terminal program
CN102314369A (en) * 2011-10-09 2012-01-11 杭州先锋电子技术股份有限公司 Self-upgrade method for equipment in remote online monitoring system
CN103530146A (en) * 2013-09-16 2014-01-22 成都交大光芒科技股份有限公司 Low-power-consumption embedded device remote wireless updating method
CN103838587A (en) * 2012-11-20 2014-06-04 贵阳铝镁设计研究院有限公司 Control system remote upgrading method and device based on GPRS
CN205017347U (en) * 2015-10-22 2016-02-03 安徽阿瑞特汽车电子科技有限公司 Many CAN network data collection of [electric] motor coach and wireless transmission device
CN106155596A (en) * 2016-08-03 2016-11-23 深圳市文鼎创数据科技有限公司 Method for writing data and device
CN106569847A (en) * 2016-10-14 2017-04-19 数源科技股份有限公司 Method for realizing IAP remote upgrade through vehicle-mounted system based on mobile network
CN108132040A (en) * 2018-03-14 2018-06-08 洛阳拖拉机研究所有限公司 A kind of tractor cultivated area self-operated measuring unit and measuring method
CN109101261A (en) * 2018-08-06 2018-12-28 沈阳维尔环保工程有限公司 A kind of the remote online upgrade method and system of data acquisition transmission instrument terminal
CN109901866A (en) * 2017-12-07 2019-06-18 航天科工惯性技术有限公司 Online upgrading method and rotary steering system for multi-module system

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030093782A1 (en) * 2001-11-13 2003-05-15 Gunawan Ali-Santosa Method and apparatus for remote software code update
CN101923110A (en) * 2009-06-09 2010-12-22 比亚迪股份有限公司 Method and device for detecting abnormal current of circuit
CN101957764A (en) * 2010-08-02 2011-01-26 珠海许继电气有限公司 Method for remotely updating remote terminal program
CN102314369A (en) * 2011-10-09 2012-01-11 杭州先锋电子技术股份有限公司 Self-upgrade method for equipment in remote online monitoring system
CN103838587A (en) * 2012-11-20 2014-06-04 贵阳铝镁设计研究院有限公司 Control system remote upgrading method and device based on GPRS
CN103530146A (en) * 2013-09-16 2014-01-22 成都交大光芒科技股份有限公司 Low-power-consumption embedded device remote wireless updating method
CN205017347U (en) * 2015-10-22 2016-02-03 安徽阿瑞特汽车电子科技有限公司 Many CAN network data collection of [electric] motor coach and wireless transmission device
CN106155596A (en) * 2016-08-03 2016-11-23 深圳市文鼎创数据科技有限公司 Method for writing data and device
CN106569847A (en) * 2016-10-14 2017-04-19 数源科技股份有限公司 Method for realizing IAP remote upgrade through vehicle-mounted system based on mobile network
CN109901866A (en) * 2017-12-07 2019-06-18 航天科工惯性技术有限公司 Online upgrading method and rotary steering system for multi-module system
CN108132040A (en) * 2018-03-14 2018-06-08 洛阳拖拉机研究所有限公司 A kind of tractor cultivated area self-operated measuring unit and measuring method
CN109101261A (en) * 2018-08-06 2018-12-28 沈阳维尔环保工程有限公司 A kind of the remote online upgrade method and system of data acquisition transmission instrument terminal

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
E. CLAYIRCI ET AL.: "User mobility pattern scheme for location update and paging in wireless systems", 《IEEE TRANSACTIONS ON MOBILE COMPUTING》, vol. 1, no. 3, 30 September 2002 (2002-09-30) *
徐洋;郑继敏;: "面向电动车车载监控终端的嵌入式软件远程升级系统研究与设计", 汽车零部件, no. 02 *
黄飞龙 等: "基于无线分包传输的气象站固件无感升级方法", 《计算机测量与控制》, vol. 28, no. 01, 31 January 2020 (2020-01-31) *

Also Published As

Publication number Publication date
CN112328290B (en) 2023-08-22

Similar Documents

Publication Publication Date Title
CN107453925A (en) Remote firmware updating method and cloud platform based on multistage communication platform
CN106899437B (en) Method and device for upgrading POS machine module firmware
CN109768970B (en) Configurable universal protocol generation method
CN105224362A (en) Host computer carries out the method and system of program upgrade to slave computer
CN108337120A (en) A kind of remote upgrade method of internet-of-things terminal equipment
CN111258900A (en) Interface test script generation method, system, equipment and storage medium
US20080133067A1 (en) Vehicle monitoring system
CN105302708A (en) Mobile terminal and detection method thereof
CN108959678B (en) Method and apparatus for testing the design of satellite wiring harnesses and signal processing units
CN112653738A (en) Internet of things network debugging system and method
CN103440142A (en) GPRS (General Packet Radio Service)-based remote upgrade and dynamic loading method
CN109614131A (en) A kind of broadcasting equipment upgrading control system
CN111506047A (en) Vehicle diagnosis method, device and storage medium
CN110865826B (en) Robot software upgrading method, device, equipment and storage medium
CN108768995B (en) Substation self-adaptive master station access method
CN109188471B (en) Satellite fault diagnosis method based on software implementation
CN105589718A (en) System updating method and updating apparatus for intelligent device
CN112328290A (en) Remote updating method and system for agricultural machinery data acquisition terminal program
CN112667272A (en) Ammeter upgrading method and system, intelligent ammeter and storage medium
CN111984287A (en) Equipment upgrading method and system
CN116483660A (en) Method, device and equipment for acquiring vehicle-end log and readable storage medium
CN106882162B (en) Vehicle maintenance device and system
CN115202388A (en) Control identification method, device, equipment and storage medium for unmanned aerial vehicle
CN110854687B (en) Uninterrupted power transmission reconstruction method for reconstruction and expansion of intelligent substation 3/2 wiring
CN112256304A (en) DSP chip software online updating method and system

Legal Events

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