CN111176700A - Method and system for downloading and updating smart card COS (chip operating System) - Google Patents
Method and system for downloading and updating smart card COS (chip operating System) Download PDFInfo
- Publication number
- CN111176700A CN111176700A CN201911224778.XA CN201911224778A CN111176700A CN 111176700 A CN111176700 A CN 111176700A CN 201911224778 A CN201911224778 A CN 201911224778A CN 111176700 A CN111176700 A CN 111176700A
- Authority
- CN
- China
- Prior art keywords
- updating
- post
- data
- cos
- update
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
- G06F8/654—Updates using techniques specially adapted for alterable solid state memories, e.g. for EEPROM or flash memories
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE 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/00—Energy 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 after-COS (chip operating system) downloading of an intelligent card, wherein the method comprises the following steps: s100, the intelligent card COS is electrified and reset, the state configuration is checked, and a post-download mode is entered; s200, remotely downloading a corresponding updating data packet for updating, wherein the data source of the updating data packet is an engineering hex file; and S300, after the updating is finished, switching to a normal working mode. The embodiment of the invention has at least the following beneficial effects: the method has the advantages that the smart card does not need to be recycled, the realization is simple, the whole coverage of the module function can be completed, the risk of update failure is reduced, and the maintenance cost and the time cost of the product are saved.
Description
Technical Field
The invention relates to the field of smart cards, in particular to a method for updating after COS of a smart card.
Background
The existing commercial smart card products, when the smart card products have functional problems, are usually solved by the following two ways: 1. repairing corresponding functions by patches in an air mode in a patching mode, wherein if a plurality of functional problems occur, the repairing needs to be carried out in a one-to-one correspondence mode; 2. and repairing the smart card products in local batches after market recovery.
The existing patch upgrading mode needs to know the function interface implementation address, cannot update and cover the whole function of a certain module, and increases the implementation complexity, so that the risk of failure in downloading and upgrading after the intelligent card COS is increased; in the local upgrading mode, although the smart card COS is downloaded and upgraded to the highest power, the commercial smart card needs to be transported and recovered from the user, which increases the product maintenance cost and time cost.
Disclosure of Invention
The present invention is directed to solving at least one of the problems of the prior art. Therefore, the invention provides the method and the system for downloading and updating the smart card COS, the smart card does not need to be recycled, the module function can be integrally covered, and the realization is simple.
The post-COS download updating method for the intelligent card comprises the following steps: s100, the intelligent card COS is electrified and reset, the state configuration is checked, and a post-download mode is entered; s200, remotely downloading a corresponding updating data packet for updating, wherein the data source of the updating data packet is an engineering hex file; and S300, after the updating is finished, switching to a normal working mode.
The method for updating the smart card after COS of the embodiment of the invention at least has the following beneficial effects: the method has the advantages that the smart card does not need to be recycled, the realization is simple, the whole coverage of the module function can be completed, the risk of update 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 the updating content exists and status flag content indicating whether the intelligent card completes the updating.
The state configuration ensures that the smart card needing to be updated can complete the update in time.
According to some embodiments of the invention, said step S100 comprises: s110, the intelligent card COS is electrified and reset, the state mark bit is checked, and whether updated content exists is judged; s120, when the updating content exists, the state marking content is further checked, and whether the intelligent card is updated or not is judged; s130, if the smart card is not updated, entering a post-download mode; otherwise, entering the normal working mode. The status flag bit is used for identifying whether all the intelligent cards need to be updated or not, and the status flag content identifies whether the intelligent card completes updating or not, so that normal updating of the intelligent card is ensured, and repeated updating is avoided.
According to some embodiments of the invention, said step S200 comprises: s210, remotely downloading the corresponding update data packet, performing data check on the update data packet, and judging whether the update data packet is normally downloaded; s220, if the downloading is wrong, deleting the updating data packet, exiting the post-downloading 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. Through data inspection of the update package, the accuracy of downloaded data content is ensured, the probability of successful update is improved, and the wrong content is prevented from being updated by mistake; and the old data before updating can be normally used even if the downloading fails, and the old data is reserved for the next normal updating.
According to some embodiments of the invention, said step S300 further comprises: if the updating is successful, the content of the state mark is modified into the updated state mark, and the state mark is switched into a normal working mode; if the update fails, the process returns to the step S200. When the update process is abnormal or fails, the update process is directly quitted, and downloading is returned again, so that the following problems can be prevented: if the updating is finished and the updating is quitted and switched to the normal state, the wrong updating data is enabled to be effective when the next resetting is carried out, and the function is abnormal.
According to some embodiments of the invention, the process of constructing the data packet comprises: and performing data interpretation on the engineering hex file, standardizing the interpreted data content, and generating the updating data packet. The engineering hex file is analyzed and standardized, so that the later downloading, verification and updating are facilitated.
According to some embodiments of the invention, the data content is normalized by: and counting the interpreted data, performing data encapsulation on each line by using a fixed data size, and performing data filling on the last line of data to enable the size of the last line of data to be a multiple of a preset numerical value. And data is packed in a fixed format, so that the intelligent card COS can be conveniently processed.
According to some embodiments of the invention, the fixed data size is 10K and the predetermined value is 8. And the subsequent data downloading processing is facilitated.
The post-COS download updating system for the intelligent card comprises: the data package construction module is used for constructing an updating data package according to the engineering hex file; the state checking module is used for checking state configuration and determining whether a post-download mode needs to be entered; and the post-download updating module is used for downloading and updating the updating data packet.
The post-COS downloading and updating system for the intelligent card, provided by the embodiment of the invention, at least has the following beneficial effects: the method has the advantages that the smart card does not need to be recycled, the realization is simple, the whole coverage of the module function can be completed, the risk of update 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 download module is used for downloading the corresponding update data packet and checking whether the downloaded data is normal; and the updating module is used for updating the content of the updating data packet and checking whether the updating is normal. The downloading and updating modules are mutually independent, so that the implementation is simplified, and the later maintenance is facilitated.
Drawings
The above and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
FIG. 1 is a schematic flow chart illustrating 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 process for constructing an update package according to an embodiment of the present invention;
FIG. 5 is a schematic flow chart of the data normalization of FIG. 4;
FIG. 6 is a schematic block diagram of a system in accordance with an embodiment of the present invention.
Reference numerals:
the system comprises a data package building module 100, a state checking module 200, a post-download updating module 300, a downloading module 310 and an updating module 320.
Detailed Description
Referring to fig. 1, the main method steps of the embodiment of the present invention are: s100, the intelligent card COS is electrified and reset, the state configuration is checked, and a post-download mode is entered; s200, remotely downloading a corresponding updating data packet for updating, wherein the data source of the updating data packet is an engineering hex file; and S300, after the updating is finished, switching to a normal working mode.
In some embodiments of the invention, referring to fig. 2, the state configuration comprises: a state flag bit indicating that the updating content exists and state flag content indicating whether the intelligent card completes the updating. After the intelligent card COS is electrified and reset, the state marking bit is firstly checked, and whether the updated content exists is judged. In this embodiment, the status flag is not null, i.e., it indicates that there is an update. If the updated content exists, the status flag content is further checked to determine whether the smart card has completed updating. And only when the updating content exists and the intelligent card is not updated, the intelligent card COS enters a post-downloading mode, otherwise, the intelligent card COS is switched to a normal working mode, and a normal working process is started. It will be appreciated that the enabling of the post-COS download update of the smart card may also be performed in other ways, such as a non-repeating sequence of numbers, indicating that there is update content only if the number of the smart card is not equal to the number obtained remotely.
In some embodiments of the present invention, referring to fig. 3, S200 comprises: s210, remotely downloading a corresponding updating data packet, performing data check on the updating data packet, and judging whether the updating data packet is normally downloaded; s220, if the downloading is wrong, deleting the update data packet, and entering the normal working mode after exiting the downloading mode; and S230, if the download data packet is normal, the corresponding content is further provided. In the embodiment of the present invention, whether the downloaded data is correct is determined through CRC check, and it can be understood that whether the downloaded data is correct may also be determined through other check methods. And in the updating process, if the abnormal condition occurs, the mode returns to the post-downloading state mode, so that the updated function can be normally used. And when the updating is normal, modifying the corresponding state mark content, finishing the updating, and switching to a normal working mode to prevent repeated updating.
In some embodiments of the invention, the update package construction process is described with reference to fig. 4 and 5. Firstly, the smart card COS acquires an engineering hex file and explains the file content. If the explanation is wrong, stopping the construction; if the interpretation is normal, data normalization is performed on the interpreted content. And if the standardization is successful, the construction can be completed, and if the standardization is failed, the construction is stopped. It will be appreciated that for builds that stop after failure, the problem is left to be verified and modified before the build is performed again until the build is successful. The detailed process of data normalization is shown in fig. 5, firstly, the line number of the interpretation content is counted, each line of data is packaged by taking a fixed size 10K as a block, and the last block of data is filled with 0 to keep the size of the last block of data to be a multiple of the preset value 8. In this embodiment, after all data are processed, the calculation of the CRC check value is also included. When other verification methods are used for the correct detection of the downloaded update package data, it is understood that the construction of the update package data also includes the calculation of the corresponding contents.
In some embodiments of the invention, the system includes 3 modules: a data packet constructing module 100, a status checking module 200 and a post-download updating module 300. The data package building module 100 is configured to build an update data package according to the engineering he x file; a state checking module 200, configured to check a state configuration, and determine whether a post-download mode needs to be entered; and a post-download updating module 300, configured to download and update the update data package.
In an embodiment of the present invention, the post-download update module 300 includes a download module 310 and an update module 320. A downloading module 310, configured to download a corresponding update data packet and check whether the downloaded data is normal; and an update module 320, 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 those skilled in the art without departing from the gist of the present invention.
Claims (10)
1. A post-COS downloading and updating method for an intelligent card is characterized by comprising the following steps:
s100, the intelligent card COS is electrified and reset, the state configuration is checked, and a post-download mode is entered;
s200, remotely downloading a corresponding updating data packet for updating, wherein the data source of the updating data packet is an engineering hex file;
and S300, after the updating is finished, switching to a normal working mode.
2. The method for post-COS download update of a smart card as claimed in claim 1, wherein said state configuration comprises: a status flag bit indicating that the updating content exists and status flag content indicating whether the intelligent card completes the updating.
3. The method for post-COS download update of a smart card as claimed in claim 2, wherein said step S100 comprises:
s110, the intelligent card COS is electrified and reset, the state mark bit is checked, and the state mark bit is judged to have the updated content;
s120, when the updating content exists, the state marking content is further checked, and whether the intelligent card is updated or not is judged;
s130, if the smart card is not updated, entering a post-download mode; otherwise, entering the normal working mode.
4. The method for post-COS download update of a smart card as claimed in claim 1, wherein said step S200 comprises:
s210, remotely downloading the corresponding update data packet, performing data check on the update data packet, and judging whether the update data packet is normally downloaded;
s220, if the downloading is wrong, deleting the updating data packet, exiting the post-downloading 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 post-COS download update of a smart card as claimed in claim 2, wherein said step S300 comprises: if the updating is successful, the content of the state mark is modified into the updated state mark, and the state mark is switched into a normal working mode; if the update fails, the process returns to the step S200.
6. The method for post-COS download update of a smart card as claimed in claim 1, wherein the process of constructing the data package comprises: and performing data interpretation on the engineering hex file, standardizing the interpreted data content, and generating the updating data packet.
7. The method for post-COS download update of a smart card as claimed in claim 6, wherein the data content is normalized by: and counting the interpreted data, performing data encapsulation on each line by using a fixed data size, and performing data filling on the last line of data blocks to enable the size of the last line of data blocks to be a multiple of a preset numerical value.
8. The method for post-COS download update of a smart card of claim 7, wherein the fixed data size is 10K and the predetermined value is 8.
9. A smart card post-COS download update system, using the method of any of claims 1-8, comprising:
the data package construction module is used for constructing an updating data package according to the engineering hex file;
the state checking module is used for checking state configuration and determining whether a post-download mode needs to be entered;
and the post-download updating module is used for downloading and updating the updating data packet.
10. The smart card COS post-download update system of claim 9, wherein the post-download update module comprises:
the download module is used for downloading the corresponding update data packet and checking whether the downloaded data is normal;
and the updating module is used for updating the content of the updating data packet and checking whether the updating is normal.
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 true CN111176700A (en) | 2020-05-19 |
CN111176700B 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 (5)
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 |
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 |
-
2019
- 2019-12-04 CN CN201911224778.XA patent/CN111176700B/en active Active
Patent Citations (5)
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 |
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 |
---|---|
CN111176700B (en) | 2023-08-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110134415A (en) | A kind of controller and its method for upgrading software and device | |
EP3933573B1 (en) | Zero differential upgrade method, non-volatile storage medium and electronic device | |
CN111190629B (en) | Embedded terminal upgrading software package and analysis method thereof | |
CN113467813A (en) | Controller online upgrading method and device, electronic equipment and storage medium | |
CN113608763A (en) | Vehicle-mounted OTA upgrading method, device, equipment and operation machine | |
CN107656765A (en) | A kind of method, system and the terminal device of equipment initialization | |
CN110147246A (en) | Version checking method and device, storage medium and the terminal of space download technology | |
CN107479924B (en) | Software upgrading verification method based on Android system | |
CN113885907A (en) | Firmware upgrading system and method | |
CN111176700A (en) | Method and system for downloading and updating smart card COS (chip operating System) | |
CN114793196B (en) | Firmware upgrading method, device, equipment and storage medium | |
CN106951276B (en) | Multi-controller software upgrading and address conflict detection method and device | |
CN112925546B (en) | Multistage verification method and system for preventing vehicle-mounted ECU from refreshing errors | |
CN114915554A (en) | Remote upgrading method and device, computer equipment and storage medium | |
CN112559349B (en) | Program running method and running device | |
CN116243941A (en) | Downloading method and device of OTA upgrade package, vehicle and storage medium | |
CN112527342A (en) | Method, device and equipment for upgrading application-programmable IAP (inter-Integrated Access Point) firmware | |
CN113904955A (en) | Detection method, device and system of data transmission link | |
CN107967160B (en) | Method and device for updating operating system file through Boot Loader | |
CN112328288A (en) | Method, system, equipment and storage medium for updating server component | |
CN114579166A (en) | Component module upgrading method, component module and financial robot | |
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 | |
CN112312213A (en) | Upgrading method of digital television system and related device | |
CN109032615A (en) | A kind of on-line software updating method for Wireless Networking door lock |
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 |