CN111176700B - Method and system for downloading and updating smart card COS (class of service) after operation - Google Patents

Method and system for downloading and updating smart card COS (class of service) after operation Download PDF

Info

Publication number
CN111176700B
CN111176700B CN201911224778.XA CN201911224778A CN111176700B CN 111176700 B CN111176700 B CN 111176700B CN 201911224778 A CN201911224778 A CN 201911224778A CN 111176700 B CN111176700 B CN 111176700B
Authority
CN
China
Prior art keywords
updating
data
update
data packet
post
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.)
Active
Application number
CN201911224778.XA
Other languages
Chinese (zh)
Other versions
CN111176700A (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.)
Eastcompeace Technology Co Ltd
Original Assignee
Eastcompeace Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Eastcompeace Technology Co Ltd filed Critical Eastcompeace Technology Co Ltd
Priority to CN201911224778.XA priority Critical patent/CN111176700B/en
Publication of CN111176700A publication Critical patent/CN111176700A/en
Application granted granted Critical
Publication of CN111176700B publication Critical patent/CN111176700B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/654Updates using techniques specially adapted for alterable solid state memories, e.g. for EEPROM or flash memories
    • 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
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

The invention discloses a method and a system for updating COS post-download of a smart card, wherein the method comprises the following steps: s100, powering on reset of the intelligent card COS, checking state configuration, and entering a post-download mode; s200, remotely downloading a corresponding update data packet to update, wherein the data source of the update data packet is an engineering hex file; s300, after updating is completed, switching to a normal working mode. The embodiment of the invention has at least the following beneficial effects: the intelligent card is not required to be recycled, the realization is simple, the whole coverage of the module function can be completed, the risk of updating failure is reduced, and the maintenance cost and the time cost of the product are saved.

Description

Method and system for downloading and updating smart card COS (class of service) after operation
Technical Field
The invention relates to the field of smart cards, in particular to a method for downloading and updating a smart card COS.
Background
The existing commercial smart card products, when the smart card products have functional problems, are usually solved in the following two ways: 1. the corresponding functions are repaired by patches in an air mode in a patching mode, and if a plurality of functional problems occur, the corresponding functions are required to be repaired one by one; 2. and carrying out market recovery on the smart card products and then repairing the smart card products in local batches.
The existing patch upgrading mode needs to know the realization address of a function interface, the whole function of a certain module cannot be updated and covered, the realization complexity is increased, and the risk of failure in downloading and upgrading after the COS of the smart card is increased; in the local upgrading mode, although the success rate of the upgrading of the smart card after being downloaded is highest, the commercial smart card needs to be transported and recovered from the hands of a user, and the maintenance cost and the time cost of the product are increased.
Disclosure of Invention
The present invention aims to solve at least one of the technical problems existing in the prior art. Therefore, the invention provides the method and the system for updating the COS of the smart card in a downloading way, the smart card is not required to be recovered, the whole coverage of the module function can be realized, and the realization is simple.
According to an embodiment of the first aspect of the invention, the method for updating the COS of the smart card comprises the following steps: s100, powering on reset of the intelligent card COS, checking state configuration, and entering a post-download mode; s200, remotely downloading a corresponding update data packet to update, wherein the data source of the update data packet is an engineering hex file; s300, after updating is completed, switching to a normal working mode.
The method for updating the COS post-download of the smart card has at least the following beneficial effects: the intelligent card is not required to be recycled, the realization is simple, the whole coverage of the module function can be completed, the risk of updating failure is reduced, and the maintenance cost and the time cost of the product are saved.
According to some embodiments of the invention, the state configuration comprises: a status flag bit indicating that there is updated content and status flag content indicating whether the present smart card has completed updating.
The state configuration ensures that the smart card that needs to be updated can complete the update in time.
According to some embodiments of the invention, the step S100 includes: s110, the COS of the smart card is powered on and reset, and the state marking bit is checked to judge whether updated contents exist or not; s120, when the updated content exists, the state mark content is further checked to judge whether the smart card is updated; s130, if the smart card is not updated, entering the post-download mode; otherwise, entering the normal working mode. The state mark bit is used for marking whether all intelligent cards need to be updated, and the state mark content marks whether the intelligent card is updated, so that normal updating of the intelligent card is ensured, and repeated updating is avoided.
According to some embodiments of the invention, the step S200 includes: s210, remotely downloading the corresponding update data packet, and carrying out data inspection on the update data packet to judge whether the update data packet is normally downloaded; s220, deleting the update data packet if the download is wrong, exiting the post-download mode and entering the normal working mode; and S230, if the downloaded data packet is normal, updating the corresponding content of the updated data packet. By checking the data of the update package, the accuracy of the downloaded data content is ensured, the probability of successful update is improved, and the error content is prevented from being updated by mistake; the old data before updating can be normally used even if the downloading fails, and the next normal updating is reserved.
According to some embodiments of the invention, the step S300 further includes: the updating is successful, the state mark content is modified to be updated, and the normal working mode is switched; if the update fails, the process returns to step S200. When the update process is abnormal or fails, the update process is directly exited, and the update process is returned to be downloaded again, so that the following problems can be prevented from occurring: if the updating is completed and the switching is carried out to a normal state, the error updating data is effective in the next resetting, and the function abnormality occurs.
According to some embodiments of the invention, the data packet construction process includes: and performing data interpretation on the engineering hex file, normalizing the interpreted data content, and generating the update data packet. And the engineering hex file is analyzed and standardized, so that the later downloading, checking and updating are convenient.
According to some embodiments of the invention, the normalization of the data content is: and counting the explained data, carrying out data encapsulation on each line by using a fixed data size, and carrying out data filling on the last line data to enable the last line data size to be a multiple of a preset numerical value. The data is packed in a fixed format, so that the processing of the COS of the smart card is facilitated.
According to some embodiments of the invention, the fixed data size is 10K and the preset value is 8. And the subsequent data downloading processing is convenient.
According to an embodiment of the first aspect of the present invention, a system for updating a smart card COS post-download includes: the data packet construction module is used for constructing an update data packet according to the engineering hex file; the state checking module is used for checking state configuration and determining whether a post-download mode is required to be entered or not; and the post-download updating module is used for downloading and updating the updating data packet.
The system for downloading and updating the smart card COS according to the embodiment of the invention has at least the following beneficial effects: the intelligent card is not required to be recycled, the realization is simple, the whole coverage of the module function can be completed, the risk of updating failure is reduced, and the maintenance cost and the time cost of the product are saved.
According to some embodiments of the invention, the post-download update module comprises: the downloading module is used for downloading the corresponding updating data packet and checking whether the downloaded data is normal or not; and the updating module is used for updating the content of the updating data packet and checking whether the updating is normal or not. The downloading and updating modules are mutually independent, so that the realization is simplified, and the later maintenance is convenient.
Drawings
The foregoing and/or additional aspects and advantages of the invention will become apparent and may be better understood from the following description of embodiments taken in conjunction with the accompanying drawings in which:
FIG. 1 is a flow chart of steps of an embodiment of the present invention;
FIG. 2 is a detailed flowchart of step S100 according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating a download update process according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a flow chart for constructing an update packet according to an embodiment of the present invention;
FIG. 5 is a schematic flow chart of data normalization in FIG. 4;
fig. 6 is a schematic block diagram of a system according to an embodiment of the present invention.
Reference numerals:
a data packet construction module 100, a status checking module 200, a post download update module 300, a download module 310, and an update module 320.
Detailed Description
Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the drawings are illustrative only and are not to be construed as limiting the invention.
In the embodiment of the present invention, it should be noted that the post-COS download of the smart card refers to a download update after the smart card is issued.
Referring to fig. 1, the main method steps of the embodiment of the invention are: s100, powering on reset of the intelligent card COS, checking state configuration, and entering a post-download mode; s200, remotely downloading a corresponding update data packet to update, wherein the data source of the update data packet is an engineering hex file; s300, after updating is completed, switching to a normal working mode.
In some embodiments of the invention, referring to fig. 2, the state configuration includes: a status flag bit indicating that there is updated content and status flag content indicating whether the present smart card has completed updating. After the COS of the smart card is powered on and reset, the status flag bit is checked first to judge whether the update content exists. In this embodiment, the status flag is not null, indicating that there is updated content. If the update content exists, the status flag content is further checked to determine whether the smart card has completed updating, and in this embodiment, the status flag content is not the initial default value, which indicates that the update has been completed. And when the update content exists and the smart card does not complete the update, the COS of the smart card enters a post-download mode, otherwise, the COS of the smart card enters a normal working mode, and a normal working flow is started. It will be appreciated that the enabling of the update download after the smart card COS may also be done in other ways, such as a non-repeating sequence of numbers, only if the number of the present smart card is not equal to the remotely acquired number, indicating that there is an update.
In some embodiments of the present invention, referring to fig. 3, S200 includes: s210, remotely downloading a corresponding update data packet, and performing data inspection on the update data packet to judge whether the update data packet is normally downloaded; s220, deleting the updated data packet if the downloading is wrong, and entering a normal working mode in a downloading mode after exiting; s230, if the downloaded data packet is normal, the corresponding content is more relevant. In the embodiment of the invention, whether the downloaded data is correct is judged by CRC check, and it is understood that whether the downloaded data is correct can also be judged by other check modes. In the updating process, if abnormality occurs, the system returns to the post-download state mode, so that the updated functions can be ensured to be normally used. And when the updating is normal, the corresponding state mark content is modified, the updating is completed, and the normal working mode is switched to prevent repeated updating.
In some embodiments of the present invention, the update package construction process is described with reference to fig. 4 and 5. Firstly, the intelligent card COS acquires an engineering hex file, and interprets the content of the file. If the interpretation is wrong, stopping the construction; and if the interpretation is normal, performing data normalization on the interpretation content. And (5) completing the construction after successful standardization, and stopping the construction after failure. It will be appreciated that for a build that stops after failure, the problem is left to be verified and modified and then the build is performed again until the build is successful. The detailed process of data standardization is shown in fig. 5, firstly, counting the number of lines of the interpretation content, packaging each line of data by taking a fixed size of 10K as a block, and filling 0 into the last block of data to keep the size of the last block of data as a multiple of a preset value of 8. In this embodiment, after all the data are processed, the calculation of the CRC check value is also included. When other verification methods are adopted for the correct detection of the downloaded update package data, it can be understood that the construction of the update package also includes calculation of corresponding contents.
In some embodiments of the invention, the system includes 3 modules: the data packet construction module 100, the status checking module 200 and the post download updating module 300. The data packet construction module 100 is configured to construct an update data packet according to the engineering hex file; a status checking module 200, configured to check the status configuration, and determine whether a post download mode needs to be entered; the post-download updating module 300 is used for downloading and updating the update data packet.
In an embodiment of the present invention, the post-download update module 300 includes a download module 310 and an update module 320. A download module 310, configured to download a corresponding update data packet, and check whether the downloaded data is normal; the updating module 320 is configured to update the content of the update data packet and check whether the update is normal.
The embodiments of the present invention have been described in detail with reference to the accompanying drawings, but the present invention is not limited to the above embodiments, and various changes can be made within the knowledge of one of ordinary skill in the art without departing from the spirit of the present invention.

Claims (8)

1. The method for updating the COS post-download of the smart card is characterized by comprising the following steps of: s100, powering on reset of the intelligent card COS, checking state configuration, and entering a post-download mode;
s200, remotely downloading a corresponding update data packet to update, wherein the data source of the update data packet is an engineering hex file;
s300, switching to a normal working mode after updating is completed;
the construction process of the data packet comprises the following steps: performing data interpretation on the engineering hex file, standardizing the interpreted data content, and generating the update data packet;
the normalization of the data content is as follows: and counting the explained data, packaging the data of each row by using a fixed data size, and filling the data of the last row of data blocks to enable the size of the last row of data blocks to be a multiple of a preset numerical value.
2. The method for post-COS download update of a smart card as claimed in claim 1, wherein the status configuration comprises: a status flag bit indicating that there is updated content and status flag content indicating whether the present smart card has completed updating.
3. The method for updating the post-COS of the smart card as recited in claim 2, wherein the step S100 comprises: s110, the COS of the smart card is powered on and reset, the state marking bit is checked, and the update content is judged;
s120, when the updated content exists, the state mark content is further checked to judge whether the smart card is updated;
s130, if the smart card is not updated, entering the post-download mode; otherwise, entering the normal working mode.
4. The method for updating post-COS of a smart card as claimed in claim 1, wherein step S200 comprises: s210, remotely downloading the corresponding update data packet, and carrying out data inspection on the update data packet to judge whether the update data packet is normally downloaded;
s220, deleting the update data packet if the download is wrong, exiting the post-download mode and entering the normal working mode;
and S230, if the downloaded data packet is normal, updating the corresponding content of the updated data packet.
5. The method for updating the post-COS of the smart card as recited in claim 2, wherein the step S300 comprises: the updating is successful, the state mark content is modified to be updated, and the normal working mode is switched; if the update fails, the process returns to step S200.
6. The method for updating a post-COS download of a smart card as claimed in claim 1, wherein the fixed data size is 10K and the predetermined value is 8.
7. A smart card COS post download update system using the method of any of claims 1-6, comprising: the data packet construction module is used for constructing an update data packet according to the engineering hex file;
the state checking module is used for checking state configuration and determining whether a post-download mode is required to be entered or not;
the post-download updating module is used for downloading and updating the updating data packet;
the construction process of the data packet comprises the following steps: performing data interpretation on the engineering hex file, standardizing the interpreted data content, and generating the update data packet;
the normalization of the data content is as follows: and counting the explained data, packaging the data of each row by using a fixed data size, and filling the data of the last row of data blocks to enable the size of the last row of data blocks to be a multiple of a preset numerical value.
8. The smart card COS post-download update system as claimed in claim 7, wherein the post-download update module comprises: the downloading module is used for downloading the corresponding updating data packet and checking whether the downloaded data is normal or not;
and the updating module is used for updating the content of the updating data packet and checking whether the updating is normal or not.
CN201911224778.XA 2019-12-04 2019-12-04 Method and system for downloading and updating smart card COS (class of service) after operation Active CN111176700B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911224778.XA CN111176700B (en) 2019-12-04 2019-12-04 Method and system for downloading and updating smart card COS (class of service) after operation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911224778.XA CN111176700B (en) 2019-12-04 2019-12-04 Method and system for downloading and updating smart card COS (class of service) after operation

Publications (2)

Publication Number Publication Date
CN111176700A CN111176700A (en) 2020-05-19
CN111176700B true CN111176700B (en) 2023-08-01

Family

ID=70657213

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911224778.XA Active CN111176700B (en) 2019-12-04 2019-12-04 Method and system for downloading and updating smart card COS (class of service) after operation

Country Status (1)

Country Link
CN (1) CN111176700B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103577214A (en) * 2012-08-09 2014-02-12 罗森伯格(上海)通信技术有限公司 Method and device for updating application program
EP3217281A2 (en) * 2016-03-10 2017-09-13 Giesecke+Devrient Mobile Security GmbH Method for managing the card software of a smart card
CN107580245A (en) * 2017-09-13 2018-01-12 成都德芯数字科技股份有限公司 Online updating method, apparatus and smart card
CN108089886A (en) * 2016-11-19 2018-05-29 北京同方微电子有限公司 A kind of intelligent card chip downloads the implementation method of program

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090320012A1 (en) * 2008-06-04 2009-12-24 Mediatek Inc. Secure booting for updating firmware over the air

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103577214A (en) * 2012-08-09 2014-02-12 罗森伯格(上海)通信技术有限公司 Method and device for updating application program
EP3217281A2 (en) * 2016-03-10 2017-09-13 Giesecke+Devrient Mobile Security GmbH Method for managing the card software of a smart card
CN108089886A (en) * 2016-11-19 2018-05-29 北京同方微电子有限公司 A kind of intelligent card chip downloads the implementation method of program
CN107580245A (en) * 2017-09-13 2018-01-12 成都德芯数字科技股份有限公司 Online updating method, apparatus and smart card

Also Published As

Publication number Publication date
CN111176700A (en) 2020-05-19

Similar Documents

Publication Publication Date Title
CN104967497B (en) A kind of reliable data transmission method and upgrade method based on network communication protocol
US7350207B2 (en) Rule-based system and method for downloading computer software over a network
CN111634160B (en) Method for establishing communication connection with tire pressure monitoring system, device and electronic equipment thereof
CN110784348A (en) Firmware upgrading method and device, electronic equipment and storage medium
CN111190629B (en) Embedded terminal upgrading software package and analysis method thereof
CN108205446A (en) Firmware restorative procedure and device
CN107656765A (en) A kind of method, system and the terminal device of equipment initialization
US11327842B2 (en) Backing up a software update of a control device of transport vehicle
CN111176700B (en) Method and system for downloading and updating smart card COS (class of service) after operation
CN111522571A (en) Equipment upgrading method and device, terminal equipment and storage medium
CN113904955B (en) Detection method, device and system of data transmission link
CN106528248B (en) Downloading method and system of mobile terminal based on software integrity
CN114579166A (en) Component module upgrading method, component module and financial robot
CN112527342A (en) Method, device and equipment for upgrading application-programmable IAP (inter-Integrated Access Point) firmware
CN112488729A (en) Data verification method and device, computer equipment and readable storage medium
CN109495333B (en) Detection processing method, equipment and network equipment
CN102158304B (en) File self-repair downloading method for embedded type multi-machine system
CN105429790A (en) ONU (Optical Network Unit) upgrading method and system and optical network system
CN115220750B (en) Automobile OTA upgrading method, front-row host and system
US6760863B1 (en) CPU unit and run alternative control method of programmable controller
CN111221673B (en) Fault recovery method and device
JP2005085054A (en) Program operation change method
KR20080065166A (en) Application program download apparatus and method for touch panel in mobile terminal
KR20070067306A (en) Remote field programmable gate array programming apparatus and the method thereof
CN117032825A (en) Method and device for loading software of airborne electronic equipment, storage medium and aircraft

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