CN107943492A - It is a kind of based on method of the USB flash disk to embedded product write sequence number - Google Patents

It is a kind of based on method of the USB flash disk to embedded product write sequence number Download PDF

Info

Publication number
CN107943492A
CN107943492A CN201711214112.7A CN201711214112A CN107943492A CN 107943492 A CN107943492 A CN 107943492A CN 201711214112 A CN201711214112 A CN 201711214112A CN 107943492 A CN107943492 A CN 107943492A
Authority
CN
China
Prior art keywords
sequence number
usb flash
flash disk
embedded product
write
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.)
Pending
Application number
CN201711214112.7A
Other languages
Chinese (zh)
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.)
Sichuan Changhong Electric Co Ltd
Original Assignee
Sichuan Changhong Electric 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 Sichuan Changhong Electric Co Ltd filed Critical Sichuan Changhong Electric Co Ltd
Priority to CN201711214112.7A priority Critical patent/CN107943492A/en
Publication of CN107943492A publication Critical patent/CN107943492A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/443OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present invention relates to band USB flash disk mouth embedded product, it discloses a kind of based on method of the USB flash disk to embedded product write sequence number, solve the problems, such as to need in conventional art to reserve serial interface exclusively for embedded product and carry out increase hardware cost and the cost of labor that the mode of write sequence number is brought.This method comprises the following steps:A. configuration file and sequence number file are placed in USB flash disk;B. after embedded product opening initialization USB flash disk and carry, the configuration file in USB flash disk is obtained;C. analysis configuration file obtains needing the data amount check of write-in embedded product and corresponding filename;D. corresponding document name is found in USB flash disk, data content is read and is written in embedded product.

Description

It is a kind of based on method of the USB flash disk to embedded product write sequence number
Technical field
The present invention relates to band USB flash disk mouth embedded product, and in particular to it is a kind of based on USB flash disk to embedded product write sequence number Method.
Background technology
In various embedded type household electric appliances, the Shi Douhui that dispatches from the factory writes a unique identifier sequence number to product, with side Just manufacturer's shipping management, sales management and after-sales service management;For purposes of illustration only, the instrument of write sequence number is known as the number of writing System, in conventional art, most of embedded products can additionally stay a serial interface, utilize serial communication to coordinate the number of writing system Complete write sequence number, whole process includes serial ports handshaking information, data sending, response message etc., which add hardware into Sheet and cost of labor.
The content of the invention
The technical problems to be solved by the invention are:It is proposed it is a kind of based on method of the USB flash disk to embedded product write sequence number, Solve to need to reserve the increase hardware that serial interface carrys out the mode of write sequence number and bring exclusively for embedded product in conventional art The problem of cost and cost of labor.
The present invention solves the technical solution that above-mentioned technical problem uses:
It is a kind of based on method of the USB flash disk to embedded product write sequence number, comprise the following steps:
A. configuration file and sequence number file are placed in USB flash disk;
B. after embedded product opening initialization USB flash disk and carry, the configuration file in USB flash disk is obtained;
C. analysis configuration file obtains needing the data amount check of write-in embedded product and corresponding filename;
D. corresponding document name is found in USB flash disk, data content is read and is written in embedded product.
As further optimization, the embedded product is set-top box.
Optimize as further, in step a, the filename and structure of configuration file and the sequence number file are by set-top box Software definition.
Optimize as further, in step a, confidence is matched somebody with somebody in the storage that the structure and set-top box software of the configuration file define The structure of breath is consistent, including header, length, entry number, entry name character string and end mark.
As further optimization, in step a, storage sequence that the structure and set-top box software of the sequence number file define The structure of number information is consistent, including the length of header, significant character, sequence number number, starts sequence number, current sequence Number, write number and end mark.
Optimize as further, in step b, be stored in after obtaining the configuration file in USB flash disk in set-top box memory buf.
Optimize as further, in step c, the analysis configuration file specifically includes:Configuration file structure content is assigned It is worth the structure of the storage configuration information defined to set-top box, analysis structure gets the sequence number item of write-in set-top box.
Optimize as further, in step d, the corresponding document name that found in USB flash disk specifically includes:
The corresponding sequence number file of sequence number item got from USB flash disk reading, in sequence number file after reading successfully Hold the structure for being assigned to the storage sequence number information that set-top box defines.
As further optimization, in step d, the reading data content and writing in set-top box specifically includes:
Set-top box gets the structure content of storage sequence number information, current sequence number writing machine top in structure Current sequence number in structure, after writing successfully, is added 1, has write number and added 1 by box, and writes back the sequence number file in USB flash disk.
The beneficial effects of the invention are as follows:Using the existing USB interface of hardware itself, pass through custom profile name and text Part structure, realizes that write-in content can configure, and reads corresponding document according to configuration content, obtains valid data and write embedded production Product;The hardware cost of extra increase serial ports can be reduced, reduces cost of labor, the more simple and reliable words of production procedure, and reduce and sell The complexity repaired afterwards.
Brief description of the drawings
Fig. 1 is based on method flow diagram of the USB flash disk to embedded product write sequence number in embodiment.
Embodiment
The present invention is directed to propose it is a kind of based on method of the USB flash disk to embedded product write sequence number, solve to need in conventional art Serial interface is reserved exclusively for embedded product and comes increase hardware cost that the mode of write sequence number brings and cost of labor Problem.
In the present invention based on method of the USB flash disk to embedded product write sequence number, comprise the following steps:
A. configuration file and sequence number file are placed in USB flash disk;
B. after embedded product opening initialization USB flash disk and carry, the configuration file in USB flash disk is obtained;
C. analysis configuration file obtains needing the data amount check of write-in embedded product and corresponding filename;
D. corresponding document name is found in USB flash disk, data content is read and is written in embedded product.
Embodiment:
By taking the method flow of write sequence number into set-top box as an example, as shown in Figure 1, it includes implemented below step:
1.U packing catalogues put configuration file " SystemInfoConfig.dat ", we are known as file A;File structure is determined Justice is:Head (systeminfoconfig)+length+entry number (1)+entry name character string (serial)+end mark end] };
2.U packing catalogues put serial.bin files, we claim file B.Document structure definition is:Head (serial)+long Degree (length of significant character)+sequence number number+beginning sequence number+current sequence number+has write number+end mark (end]);
3. set-top box software defines 2 structures, a storage configuration file A structure content, we claim this structure For StructA, another storage sequence number file B structure content, our this structure is referred to as StructB;Wherein StructA Structure be:
Char confighead [20] // configuration file header
U8Length//significant character length
U8Item//write-in set-top box item number
Char dataname [10] [the 20] // corresponding filename of write-in each data of set-top box
Char endbuf [4] // end mark END] }
The structure of StructB is:
Char datahead [20] // machine File header information
U8Length//significant character length
U8SerialNumber//sequence number number
Char FirstSN//beginning sequence number
Char CurrentSN//current sequence number
U8finshNumber//write number
Char endbuf [4] // end mark
4. after set-top-box opening initialization USB flash disk mouth and carry, going to read configuration file, read failure box and normally start, After reading successfully, configuration file A structure contents are assigned to the structure StructA defined in third step, analysis structure obtains Get the sequence number item of write-in set-top box;
5. reading the sequence number item serial.bin files got in the 4th step from USB flash disk, read failure box and normally open It is dynamic, the content in file B is assigned to StructB structures after reading successfully.
6. set-top box gets structure StructB contents, current sequence number write-in set-top box in structure;
7. after writing successfully, the current sequence number in StructB structures is added 1, number is write and has added 1, and write back in USB flash disk Serial.bin files.After writing successfully, turn off file A and file B.

Claims (9)

  1. It is 1. a kind of based on method of the USB flash disk to embedded product write sequence number, it is characterised in that to comprise the following steps:
    A. configuration file and sequence number file are placed in USB flash disk;
    B. after embedded product opening initialization USB flash disk and carry, the configuration file in USB flash disk is obtained;
    C. analysis configuration file obtains needing the data amount check of write-in embedded product and corresponding filename;
    D. corresponding document name is found in USB flash disk, data content is read and is written in embedded product.
  2. It is 2. as claimed in claim 1 a kind of based on method of the USB flash disk to embedded product write sequence number, it is characterised in that described Embedded product is set-top box.
  3. It is 3. as claimed in claim 2 a kind of based on method of the USB flash disk to embedded product write sequence number, it is characterised in that step a In, the filename and structure of configuration file and the sequence number file are defined by set-top box software.
  4. It is 4. as claimed in claim 3 a kind of based on method of the USB flash disk to embedded product write sequence number, it is characterised in that step a In, the structure for storing configuration information that structure and the set-top box software of the configuration file define is consistent, including header, length Degree, entry number, entry name character string and end mark.
  5. It is 5. as claimed in claim 3 a kind of based on method of the USB flash disk to embedded product write sequence number, it is characterised in that step a In, the structure of the sequence number file is consistent with the structure for the storage sequence number information that set-top box software defines, including head letter Breath, the length of significant character, sequence number number, start sequence number, current sequence number, write number and end mark.
  6. It is 6. as claimed in claim 2 a kind of based on method of the USB flash disk to embedded product write sequence number, it is characterised in that step b In, it is stored in after obtaining the configuration file in USB flash disk in set-top box memory buf.
  7. It is 7. as claimed in claim 2 a kind of based on method of the USB flash disk to embedded product write sequence number, it is characterised in that step c In, the analysis configuration file specifically includes:Configuration file structure content is assigned to the storage configuration information that set-top box defines Structure, analysis structure get write-in set-top box sequence number item.
  8. It is 8. as claimed in claim 2 a kind of based on method of the USB flash disk to embedded product write sequence number, it is characterised in that step d In, the corresponding document name that found in USB flash disk specifically includes:
    The corresponding sequence number file of sequence number item got from USB flash disk reading, assigns the content of sequence number file after reading successfully It is worth the structure of the storage sequence number information defined to set-top box.
  9. It is 9. as claimed in claim 2 a kind of based on method of the USB flash disk to embedded product write sequence number, it is characterised in that step d In, the reading data content and writing in set-top box specifically includes:
    Set-top box gets the structure content of storage sequence number information, and current sequence number in structure is write set-top box, is write After entering successfully, the current sequence number in structure is added 1, number has been write and has added 1, and writes back the sequence number file in USB flash disk.
CN201711214112.7A 2017-11-28 2017-11-28 It is a kind of based on method of the USB flash disk to embedded product write sequence number Pending CN107943492A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711214112.7A CN107943492A (en) 2017-11-28 2017-11-28 It is a kind of based on method of the USB flash disk to embedded product write sequence number

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711214112.7A CN107943492A (en) 2017-11-28 2017-11-28 It is a kind of based on method of the USB flash disk to embedded product write sequence number

Publications (1)

Publication Number Publication Date
CN107943492A true CN107943492A (en) 2018-04-20

Family

ID=61950269

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711214112.7A Pending CN107943492A (en) 2017-11-28 2017-11-28 It is a kind of based on method of the USB flash disk to embedded product write sequence number

Country Status (1)

Country Link
CN (1) CN107943492A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112469039A (en) * 2020-11-25 2021-03-09 深圳市中易通安全芯科技有限公司 Mobile terminal security authorization method based on security chip

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010007936A1 (en) * 2008-07-14 2010-01-21 日本ビクター株式会社 Data writing method and data writing device
CN102104800A (en) * 2009-12-22 2011-06-22 康佳集团股份有限公司 Method and system for burning serial number of set-top box
CN102231852A (en) * 2011-05-06 2011-11-02 深圳市九洲电器有限公司 Method and device for programming serial number of set-top box
CN102572561A (en) * 2010-12-08 2012-07-11 康佳集团股份有限公司 Automatic programing method and system for serial numbers of set-top box
CN106792015A (en) * 2016-11-30 2017-05-31 广东九联科技股份有限公司 A kind of programming serial number of set-top box method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010007936A1 (en) * 2008-07-14 2010-01-21 日本ビクター株式会社 Data writing method and data writing device
CN102104800A (en) * 2009-12-22 2011-06-22 康佳集团股份有限公司 Method and system for burning serial number of set-top box
CN102572561A (en) * 2010-12-08 2012-07-11 康佳集团股份有限公司 Automatic programing method and system for serial numbers of set-top box
CN102231852A (en) * 2011-05-06 2011-11-02 深圳市九洲电器有限公司 Method and device for programming serial number of set-top box
CN106792015A (en) * 2016-11-30 2017-05-31 广东九联科技股份有限公司 A kind of programming serial number of set-top box method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112469039A (en) * 2020-11-25 2021-03-09 深圳市中易通安全芯科技有限公司 Mobile terminal security authorization method based on security chip

Similar Documents

Publication Publication Date Title
EP1983519A3 (en) System and method for providing program information, and recording medium used therefor
CN102289418A (en) Built-in device programming system and method
US8682459B2 (en) Device information setting apparatus and device information setting method
CN104699714A (en) Method and device for transferring files of book edition format into files of EPUB format
CN103902458A (en) Universal storage software test design method
CN110837385A (en) DSP application program online upgrading method based on CANopen protocol
CN104038450A (en) Message transmission method and apparatus based on PCIE bus
CN107943492A (en) It is a kind of based on method of the USB flash disk to embedded product write sequence number
CN106020837A (en) Method and system for loading set top box drive
CN104221089A (en) Information processing device and information processing method
CN103761095A (en) Method for generating universal header data information of upgraded file
CN107977222A (en) Suitable for the conversion of the upgrade file of eMMC, generation method and device
CN102486719B (en) Intelligent memory card and transaction-writing method thereof
CN101261611A (en) Peripheral apparatus data-transmission apparatus and transmission method
CN110866411A (en) Electronic tag coding system
CN106371950A (en) Method and device for achieving RAID level conversion
CN101710237B (en) Equipment production flow using flash memory as storage medium
CN104090779B (en) Automatic configuration method and cloud compiling system
CN107248040B (en) Method and device for automatic fool-proof control of customized information
CN101706864B (en) Method for identifying logical encryption card
CN104320454A (en) Method and system for realizing user-defined output in HTTP protocol recovery
US20040003166A1 (en) Portable electronic medium issuing system and issuing method and portable electronic medium
CN101571808A (en) Method for improving production efficiency of telecommunication smart card
CN106775810A (en) The wiring method and device of configuration file in distributed file system
US20060007590A1 (en) Magnetic disk apparatus

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180420