WO2017113603A1 - 数据写入方法和装置 - Google Patents

数据写入方法和装置 Download PDF

Info

Publication number
WO2017113603A1
WO2017113603A1 PCT/CN2016/084649 CN2016084649W WO2017113603A1 WO 2017113603 A1 WO2017113603 A1 WO 2017113603A1 CN 2016084649 W CN2016084649 W CN 2016084649W WO 2017113603 A1 WO2017113603 A1 WO 2017113603A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
value
read
address
written
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.)
Ceased
Application number
PCT/CN2016/084649
Other languages
English (en)
French (fr)
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.)
Shenzhen TCL Digital Technology Co Ltd
Original Assignee
Shenzhen TCL Digital 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 Shenzhen TCL Digital Technology Co Ltd filed Critical Shenzhen TCL Digital Technology Co Ltd
Publication of WO2017113603A1 publication Critical patent/WO2017113603A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation

Definitions

  • the present invention relates to the field of data processing technologies, and in particular, to a data writing method and apparatus.
  • the performance requirements of TV are getting higher and higher, so the capacity of the circuit board is getting bigger and bigger.
  • many storage spaces are blank.
  • the storage space of the circuit board of the TV is 16GB.
  • the space for normal storage software is only 2GB, a large amount of space is blank, blank areas fill the same data by default, reading or writing the same data byte by byte, which takes time.
  • a primary object of the present invention is to provide a data writing method and apparatus for solving the technical problem of time-consuming writing data to a circuit board.
  • the present invention provides a data writing method, the data writing method comprising the steps of:
  • the storage address associated with storing the data and the value of consecutive multiple data are length values of default values
  • the data is sequentially written into the storage area
  • the present invention provides a data writing method, and the data writing method includes:
  • the present invention further provides a data writing device, the data writing device comprising:
  • a first reading module configured to sequentially read data to be read by the data writing device storage area
  • a first determining module configured to determine whether the data is marked each time the data is read
  • An obtaining module configured to acquire a length value of the data association if the data is marked
  • the writing module is further configured to: when the length value is obtained, write a default value corresponding to the length value to an address corresponding to the storage area of the circuit board to be written.
  • the data writing method of the present invention when data is written, the data address and length of the blank area of the recording circuit board are counted, and the default data is written into the blank area of the circuit board to be written according to the data address and the length, thereby saving Time, improve efficiency.
  • FIG. 1 is a schematic flow chart of a first embodiment of a data writing method according to the present invention.
  • FIG. 2 is a schematic diagram of a refinement process of obtaining a length value in FIG. 1;
  • FIG. 3 is a schematic flow chart of a second embodiment of a data writing method according to the present invention.
  • FIG. 4 is a schematic flow chart of a third embodiment of a data writing method according to the present invention.
  • FIG. 5 is a schematic diagram showing a refinement process of data whose value is a default value according to an embodiment of the present invention
  • FIG. 6 is a schematic diagram of functional modules of a first embodiment of a data writing apparatus according to the present invention.
  • FIG. 7 is a schematic diagram of functional modules of the acquisition module of FIG. 6;
  • FIG. 8 is a schematic diagram of functional modules of a second embodiment of a data writing apparatus according to the present invention.
  • FIG. 9 is a schematic diagram of functional modules of a third embodiment of a data writing apparatus according to the present invention.
  • FIG. 10 is a schematic diagram of functional blocks of data marked with a default value in an embodiment of the present invention.
  • FIG. 1 is a schematic flowchart of a first embodiment of a data writing method according to the present invention.
  • This embodiment provides a data writing method, where the data writing method includes:
  • Step S10 sequentially reading data to be read by the data writing device storage area
  • the program is written to the board to be written by the data writing device, the data to be read in the storage area of the data writing device is sequentially read, and the data is written into the circuit to be written. board.
  • Step S20 determining, when each time the data is read, whether the data is marked
  • the data when data is written to the board to be written, it is judged whether the currently read data has been marked. If it is marked, the data is the first data of a blank area. At this time, the storage address of the data is obtained, and the length value of the management stored data is used as a default value according to the storage address.
  • Step S30 if the data is marked, obtaining a length value of the data association
  • the program is written to the circuit board to be written, and when the blank area is large, the search length value can be matched according to the stored address of the read mark.
  • the step S30 includes:
  • Step S31 acquiring a storage address of the data
  • the storage address includes a current segment address and an intra-segment offset address.
  • Step S32 determining whether the storage address is found
  • Step S33 if the storage address is found, performing the step of acquiring the length value of the data association according to the storage address;
  • step S34 if the storage address is not found, an error message is displayed.
  • an error message may be popped up to remind the writing process of an error.
  • Step S40 when the length value is obtained, writing a default value corresponding to the length value to the address corresponding to the storage area of the circuit board to be written;
  • the blank area when there is a blank area in the template circuit board to be written on the circuit board to be written, the blank area may be written by determining a storage address and a length of the first data of the blank area.
  • Default data the default data can be 00 or FF.
  • Step S50 if the data is not marked, the data is written to the board to be written.
  • the storage address corresponding to the data is stored according to the creation list, and the data segment length which is the default value is consecutively written, and the blank area is quickly written into the blank area.
  • the default value instead of writing the default value of the blank area byte by byte, saves time and improves efficiency.
  • the present invention further provides a second embodiment of the data writing method based on the second embodiment.
  • the step S10 includes:
  • Step S60 displaying a list of data written by different circuit boards stored in the storage area of the device.
  • the data writing device may store a program running by a plurality of different specifications of the circuit board, and when writing the program to the circuit board to be written, may display different data storage devices.
  • Step S70 the data corresponding to the storage address is set as the data to be read according to the storage address of the data of the selected circuit board.
  • the data writing device stores data of a plurality of circuit boards of different specifications, and when receiving information of the selected circuit board, searches for a storage address of the associated data according to the information of the circuit board. And obtaining the data as data to be read.
  • the data writing method proposed in this embodiment provides a plurality of writing programs, and selects corresponding programs for writing according to actual needs, thereby improving resource utilization.
  • the present invention further provides a third embodiment of the data writing method based on the first embodiment.
  • the data writing method further includes the following steps:
  • Step S80 sequentially reading data stored on the circuit board to be read
  • the data writing method is used to write the stored program data on the circuit board to the circuit board to be written by the data writing device.
  • the data writing device may first Program data is written to the memory area of the device.
  • Step S90 determining, when each time the data is read, whether the value of the data is a default value
  • the blank areas are provided with the same default value, that is, a default value, and the default value can be arbitrarily set, generally 00 or FF, byte-by-byte read and write. It is a waste of time to write the default values of the blank areas and write them one by one.
  • the read data when the data of the circuit board is read, it is first determined whether the read data is a default value, and different operations are performed according to the value of the read data.
  • Step S100 marking the data when the data is a default value
  • a mark may be added to the data, indicating that the data is the first data read in a blank area on the circuit board as a default value. Obtaining the storage address of the data, and calculating the length of the segment where the continuous data is the default value, that is, the length of the blank area.
  • Step S110 the storage address associated with storing the data and the value of the continuous plurality of data are length values of default values
  • a list of blank areas of the program may be established in a storage area of the data writing device, corresponding to a storage address in which the data is stored and a data segment length that is consecutively a default value.
  • the storage address of the tag may be obtained, and the length of the corresponding blank area is searched according to the storage address, and the default value is stored according to the storage.
  • the address and its corresponding segment length are written to the board to be written, wherein the memory address includes a segment address and an intra-segment offset address.
  • Step S120 When the data is a non-default value, the data is sequentially written into the storage area.
  • the data when the data is not the default value, that is, when the data is valid program data, the data is sequentially written into the storage area of the data writing device.
  • step S110 further includes the following steps:
  • Step S130 updating the value of the continuous plurality of data is the length value of the default value
  • the current storage space, computing power, and data reading and writing capabilities of the circuit board are relatively strong.
  • the blank area is not large, that is, the data segment whose default value is the data length does not reach the second pre- Setting a threshold value
  • the efficiency of writing the data byte by byte is not lower than the efficiency of filling the blank area with data at one time
  • the storage space of the circuit board may be 16 GB, and the first time may be set.
  • the preset threshold is 200 bytes. If the data length of the blank area does not reach the second preset threshold, the data may be stored one by one in order.
  • Step S140 determining whether the length value reaches a second preset threshold
  • the data length of the piece of data may be statistically calculated. If the data length reaches a second preset threshold, a corresponding list creation list corresponding storage is established. The storage address of the data and the length of the data segment that are consecutive default values;
  • step S110 If the length value reaches the second preset threshold, perform the step S110;
  • step S120 is performed.
  • the data of the circuit board as a template is analyzed and processed, and the data stored by the circuit board is sequentially read; when the data is read, it is determined whether the data is a default value; When the data is a default value, the data is marked, and the next data is continuously read until the data of the non-default value is read; the storage address of the storage area is stored corresponding to the storage address of the data and the default values are consecutive default values.
  • the data segment is long; when the data is not the default value, the data is sequentially written into the storage area, and the blank area of the circuit board is extracted, which saves time and improves efficiency.
  • the invention further provides a data writing device.
  • FIG. 6 is a schematic diagram of functional modules of a first embodiment of a data writing apparatus according to the present invention.
  • the functional block diagram shown in FIG. 6 is merely an exemplary diagram of a preferred embodiment, and those skilled in the art will surround the functional modules of the data writing device shown in FIG.
  • the new function modules can be easily supplemented; the names of the function modules are custom names, which are only used to assist in understanding the various program function blocks of the data writing device, and are not used to define the technical solution of the present invention, and the core of the technical solution of the present invention Yes, the functions to be achieved by the function modules that each define the name.
  • the data writing device includes:
  • the first reading module 10 is configured to sequentially read data to be read by the data writing device storage area;
  • the program is written to the board to be written by the data writing device, the data to be read in the storage area of the data writing device is sequentially read, and the data is written to be written. Into the board.
  • the first determining module 20 is configured to determine whether the data is marked each time the data is read;
  • the data when data is written to the circuit board to be written, it is determined whether the currently read data has been marked. If it is marked, the data is the first data of a blank area, and is acquired at this time.
  • the storage address of the data is used to find the length value of the management stored data as a default value according to the storage address.
  • the program is written into the circuit board to be written, and when the blank area is large, the storage address of the read mark mark can be matched in the list. Find the length value.
  • the obtaining module 40 is configured to obtain a length value of the data association if the data is marked;
  • the obtaining module 40 includes:
  • An obtaining unit 41 configured to acquire a storage address of the data
  • the determining unit 42 is configured to determine whether the storage address is found
  • the obtaining unit 43 is further configured to: if the storage address is found, perform the step of acquiring the length value of the data association according to the storage address;
  • the prompting unit 44 is configured to pop up an error prompt if the storage address is not found.
  • an error message may be popped up to remind the writing process of an error.
  • the writing module 30 is further configured to: when the length value is obtained, write a default value corresponding to the length value to an address corresponding to the storage area of the circuit board to be written.
  • the blank area when there is a blank area in the template circuit board to be written on the circuit board to be written, the blank area may be written by determining a storage address and a length of the first data of the blank area.
  • Default data the default data can be 00 or FF.
  • the storage address corresponding to the data is stored according to the creation list, and the data segment length which is the default value is consecutively written, and the blank area is quickly written into the blank area.
  • the default value instead of writing the default value of the blank area byte by byte, saves time and improves efficiency.
  • the present invention further provides a second embodiment of the data writing device based on the second embodiment.
  • the data writing device further includes:
  • a display module 50 configured to display a list of data written by different data boards stored in the storage area of the device
  • the data writing device may store a program running by a plurality of different specifications of the circuit board, and when writing the program to the circuit board to be written, may display different data storage devices.
  • the processing module 60 is configured to set, according to a storage address of the data of the selected circuit board, data stored corresponding to the storage address as data to be read.
  • the data writing device stores data of a plurality of circuit boards of different specifications, and when receiving information of the selected circuit board, searches for a storage address of the associated data according to the information of the circuit board. And obtaining the data as data to be read.
  • the data writing method proposed in this embodiment provides a plurality of writing programs, and selects corresponding programs for writing according to actual needs, thereby improving resource utilization.
  • the present invention further provides a third embodiment of the data writing device based on the first embodiment.
  • the data writing device further includes:
  • a second reading module 70 configured to sequentially read data stored by the circuit board to be read
  • the data writing method is used to write the stored program data on the circuit board to the circuit board to be written by the data writing device.
  • the data writing device may first Program data is written to the memory area of the device.
  • the blank areas are provided with the same default value, that is, a default value, and the default value can be arbitrarily set, generally 00 or FF, byte-by-byte read and write. It is a waste of time to write the default values of the blank areas and write them one by one.
  • the read data when the data of the circuit board is read, it is first determined whether the read data is a default value, and different operations are performed according to the value of the read data.
  • a second determining module 80 configured to determine, when each time the data is read, whether the value of the data is a default value
  • a mark may be added to the data, indicating that the data is the first data read in a blank area on the circuit board as a default value. Obtaining the storage address of the data, and calculating the length of the segment where the continuous data is the default value, that is, the length of the blank area.
  • a marking module 90 configured to mark the data when the data is a default value
  • the storage module 100 is configured to associate and store a storage address of the data and a value of a plurality of consecutive data as a default value.
  • a list of blank areas of the program may be established in a storage area of the data writing device, corresponding to a storage address in which the data is stored and a data segment length that is consecutively a default value.
  • the storage address of the tag may be obtained, and the length of the corresponding blank area is searched according to the storage address, and the default value is stored according to the storage.
  • the address and its corresponding segment length are written to the board to be written, wherein the memory address includes a segment address and an intra-segment offset address.
  • the storage module 100 is further configured to write the data into the storage area in sequence when the data is a non-default value.
  • the data when the data is not the default value, that is, when the data is valid program data, the data is sequentially written into the storage area of the data writing device.
  • the data writing device includes:
  • the update module 110 is configured to update a length value of a plurality of consecutive data values that are default values
  • the current storage space, computing power, and data reading and writing capabilities of the circuit board are relatively strong.
  • the blank area is not large, that is, the data segment whose default value is the data length does not reach the second pre- Setting a threshold value
  • the efficiency of writing the data byte by byte is not lower than the efficiency of filling the blank area with data at one time
  • the storage space of the circuit board may be 16 GB, and the first time may be set.
  • the preset threshold is 200 bytes. If the data length of the blank area does not reach the second preset threshold, the data may be stored one by one in order.
  • the third determining module 120 is configured to determine whether the length value reaches a second preset threshold
  • the second preset threshold is that the preset continuously stored data is the length value of the default data
  • the data length of the piece of data may be statistically calculated. If the data length reaches a second preset threshold, a corresponding list creation list corresponding storage is established. The storage address of the data and the length of the data segment that are consecutive default values;
  • the storage module 100 is further configured to store the length value and a storage address of the data if the length value reaches a second preset threshold;
  • the storage module 100 is further configured to store the data into the storage area in order if the length value does not reach the second preset threshold.
  • the data of the circuit board as a template is analyzed and processed, and the data stored by the circuit board is sequentially read; when the data is read, it is determined whether the data is a default value; When the data is a default value, the data is marked, and the next data is continuously read until the data of the non-default value is read; the storage address of the storage area is stored corresponding to the storage address of the data and the default values are consecutive default values.
  • the data segment is long; when the data is not the default value, the data is sequentially written into the storage area, and the blank area of the circuit board is extracted, which saves time and improves efficiency.
  • the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be through hardware, but in many cases, the former is better.
  • Implementation Based on such understanding, the technical solution of the present invention, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk,
  • the optical disc includes a number of instructions for causing a terminal device (which may be a cell phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the methods described in various embodiments of the present invention.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一种数据写入方法和装置,所述数据写入方法包括:依次读取数据写入设备存储区域待读取的数据(S10);在每次读取到所述数据时,判断所述数据是否被标记(S20);若所述数据没有被标记,将所述数据写入待写入电路板(S50);若所述数据被标记,获取所述数据关联的长度值(S30);在获取到所述长度值时,向所述待写入电路板存储区域对应的地址写入与长度值对应的默认数值(S40)。在写入数据时,统计记录电路板的空白区域的数据地址及长度,根据所述数据地址及长度将默认数据写入待写入电路板的空白区域,节省时间,提高效率。

Description

数据写入方法和装置
技术领域
本发明涉及数据处理技术领域,尤其涉及一种数据写入方法和装置。
背景技术
在许多电子设备中(如电视等),系统的运行需要电路板上的存储器芯片为其提供运行程序,否则系统将无法启动。因此,生产者需要将程序代码通过烧录设备储存在存储器芯片中。存储器芯片都是以一个字节为单位存储信息,读写程序代码的时候都是逐个字节的读取或写入数据。
目前对电视的性能要求越来越高,所以电路板的容量越来越大,现在的电子设备,除了预装的程序,很多存储空间都是空白的,例如:电视的电路板存储空间是16GB,而正常存放软件的空间只有2GB,大量的空间是空白的,空白区域默认填充相同的数据,逐个字节的读取或写入相同数据,耗费时间。
发明内容
本发明的主要目的在于提供一种数据写入方法和装置,旨在解决向电路板写入数据耗费时间的技术问题。
为实现上述目的,本发明提供一种数据写入方法,所述数据写入方法包括步骤:
依次读取待读取电路板存储的数据;
在每次读取到所述数据时,判断所述数据的数值是否为默认数值;
在所述数据为默认数值时,标记所述数据;
关联存储所述数据的存储地址和连续多个数据的数值均为默认数值的长度值;
在所述数据为非默认数值时,将所述数据按照顺序写入存储区域;
显示数据写入设备存储区域存储的不同电路板的数据的列表;
根据选定的电路板的数据的存储地址,将所述存储地址对应存储的数据设为待读取的数据;
依次读取数据写入设备存储区域待读取的数据;
在每次读取到所述数据时,判断所述数据是否被标记;
若所述数据没有被标记,将所述数据写入待写入电路板;
若所述数据被标记,获取所述数据关联的长度值;
在获取到所述长度值时,向所述待写入电路板存储区域对应的地址写入与长度值对应的默认数值。
为实现上述目的,本发明提供一种数据写入方法,所述数据写入方法包括:
依次读取数据写入设备存储区域待读取的数据;
在每次读取到所述数据时,判断所述数据是否被标记;
若所述数据没有被标记,将所述数据写入待写入电路板;
若所述数据被标记,获取所述数据关联的长度值;
在获取到所述长度值时,向所述待写入电路板存储区域对应的地址写入与长度值对应的默认数值。
本发明进一步提供一种数据写入装置,所述数据写入装置包括:
第一读取模块,用于依次读取数据写入设备存储区域待读取的数据;
第一判断模块,用于在每次读取到所述数据时,判断所述数据是否被标记;
写入模块,用于若所述数据没有被标记,将所述数据写入待写入电路板;
获取模块,用于若所述数据被标记,获取所述数据关联的长度值;
所述写入模块,还用于在获取到所述长度值时,向所述待写入电路板存储区域对应的地址写入与长度值对应的默认数值。
本发明提出的数据写入方法,在写入数据时,统计记录电路板的空白区域的数据地址及长度,根据所述数据地址及长度将默认数据写入待写入电路板的空白区域,节省时间,提高效率。
附图说明
图1为本发明数据写入方法第一实施例的流程示意图;
图2为图1中获取长度值的细化流程示意图;
图3为本发明数据写入方法第二实施例的流程示意图;
图4为本发明数据写入方法第三实施例流程示意图;
图5为本发明一实施例中标记数值为默认数值的数据的细化流程示意图;
图6为本发明数据写入装置第一实施例的功能模块示意图;
图7为图6中获取模块的功能模块示意图;
图8为本发明数据写入装置第二实施例的功能模块示意图;
图9为本发明数据写入装置第三实施例的功能模块示意图。
图10为本发明一实施例中标记数值为默认数值的数据的功能模块示意图。
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
具体实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。
参照图1,图1为本发明数据写入方法第一实施例的流程示意图。
本实施例提出一种数据写入方法,所述数据写入方法包括:
步骤S10,依次读取数据写入设备存储区域待读取的数据;
在本实施例中,通过数据写入设备向待写入电路板写入程序,依次读取所述数据写入设备的存储区域待读取的数据,并将所述数据写入待写入电路板。
步骤S20,在每次读取到所述数据时,判断所述数据是否被标记;
在本实施例中,在向待写入电路板写入数据时,判断当前读取的数据是否已被标记,若被标记,则说明所述数据为一空白区域的首个数据。此时获取所述数据的存储地址,根据所述存储地址查找管理存储的数据为默认数值的长度值。
步骤S30,若所述数据被标记,获取所述数据关联的长度值;
在本实施例中,根据数据写入设备存储的程序数据,将所述程序写入待写入电路板,空白区域较大时,可根据读取到的标记的存储地址匹配查找长度值。
参照图2,所述步骤S30包括:
步骤S31,获取所述数据的存储地址;
在本实施例中,所述存储地址包括当前段地址和段内偏移地址。
步骤S32,判断是否查找到所述存储地址;
步骤S33,若查找到所述存储地址,根据所述存储地址执行所述获取所述数据关联的长度值的步骤;
步骤S34,若未查找到所述存储地址,弹出错误提示。
在没有根据所述标记的地址查找到空白区域的数据长度值时,可弹出错误提示,提醒写入过程出错。
步骤S40,在获取到所述长度值时,向所述待写入电路板存储区域对应的地址写入与长度值对应的默认数值;
在本实施例中,在所述待写入电路板将要写入的模板电路板存在空白区域时,可通过确定所述空白区域的首个数据的存储地址和长度,将所述空白区域写入默认数据,所述默认数据可以为00或FF。
步骤S50,若所述数据没有被标记,将所述数据写入待写入电路板。
本实施例提出的数据写入方法,在向待写入电路板写入数据时,根据建立列表对应存储所述数据的存储地址和连续均为默认数值的数据段长,批量快速写入空白区域的默认数值,而不是逐个字节的写入空白区域的默认数值,节省时间,提高效率。
进一步地,基于第二实施例本发明还提出数据写入方法的第二实施例,参照图3,所述步骤S10之前包括:
步骤S60,显示数据写入设备存储区域存储的不同电路板的数据的列表;
在本实施例中,所述数据写入设备可存储多个不同规格的电路板运行的程序,在向所述待写入电路板写入程序时,可以显示所述数据写入设备存储的不同的电路板的数据的列表,根据需要,选择相应的电路板存储的数据。
步骤S70,根据选定的电路板的数据的存储地址,将所述存储地址对应存储的数据设为待读取的数据。
在本实施例中,所述数据写入设备存储有多个不同规格的电路板的数据,在接收到选定的电路板的信息时,根据所述电路板的信息查找关联的数据的存储地址,获取所述数据为待读取数据。
本实施例提出的数据写入方法,提供多个供写入程序,根据实际需要选择相应的程序进行写入,提高资源利用率。
进一步地,基于第一实施例本发明还提出数据写入方法的第三实施例,参照图4,所述步骤S10之前,所述数据写入方法还包括步骤:
步骤S80,依次读取待读取电路板存储的数据;
在本实施例中,通过数据写入设备运用所述数据写入方法将电路板上已存储的程序数据写入待写入电路板,具体地,可通过所述数据写入设备先将所述程序数据写入数据写入设备的存储区域。
步骤S90,在每次读取到所述数据时,判断所述数据的数值是否为默认数值;
可以理解的是,电路板中存在大量空白区域,所述空白区域设有相同的默认数值,即默认数值,所述默认值可任意设置,一般可以为00或FF,逐个字节的读写所述空白区域的默认数值并将其逐个写入较为浪费时间。
在本实施例中,读取电路板的数据时,首先判断所述读取到的数据是否为默认数值,根据读取到的数据的数值,进行不同的操作。
步骤S100,在所述数据为默认数值时,标记所述数据;
在本实施例中,若读取到的所述数据为默认数值,则可在所述数据添加一个标记,标明此数据为电路板上一段空白区域中读取到的首个为默认数值的数据,获取所述数据的存储地址,并计算连续的数据均为默认数值的段长,即空白区域的长度。
步骤S110,关联存储所述数据的存储地址和连续多个数据的数值均为默认数值的长度值;
在本实施例中,可在所述数据写入设备的存储区域建立所述程序的空白区域的列表,对应存储所述数据的存储地址和连续均为默认数值的数据段长。
在向待写入电路板写入数据时,若读取到所述标记,则可获取所述标记的存储地址,根据所述存储地址查找对应的空白区域的长度,将默认数值按照所述存储地址及其对应的所述段长写入待写入电路板,其中所述存储地址包括段地址和段内偏移地址。
步骤S120,在所述数据为非默认数值时,将所述数据按照顺序写入存储区域。
在本实施例中,在所述数据不为默认数值时,即所述数据为有效程序数据时,将所述数据按顺序写入数据写入设备的存储区域。
进一步地,参照图5,所述步骤S110之前还包括步骤:
步骤S130,更新连续多个数据的数值均为默认数值的长度值;
可以理解的是,目前的电路板的存储空间、计算能力和数据读写能力都较为强大,在所述空白区域不大时,即所述数据均为默认数值的数据段长没有达到第二预设阈值,逐个字节的写入所述数据的效率与一次性将所述空白区域填充数据的效率相比并不低,所述电路板的存储空间可以为16GB,此时可以设置所述第二预设阈值为200字节,若所述空白区域的数据长度没有达到所述第二预设阈值,此时,可以将所述数据按照顺序逐个存储。
步骤S140,判断所述长度值是否达到第二预设阈值;
在本实施例中,当读取到一段数据均为默认数值时,可统计计算所述一段数据的数据长度,若所述数据长度达到第二预设阈值,则建立相应的列表建立列表对应存储所述数据的存储地址和连续均为默认数值的数据段长;
若所述长度值达到第二预设阈值,执行所述步骤S110;
若所述长度值未达到第二预设阈值,执行所述步骤S120。
本实施例提出的数据写入方法,将作为模板的电路板的数据进行分析处理,依次读取电路板存储的数据;在读取到所述数据时,判断所述数据是否为默认数值;在所述数据为默认数值时,标记所述数据,继续读取下一数据,直至读取到非默认数值的数据;在存储区域建立列表对应存储所述数据的存储地址和连续均为默认数值的数据段长;在所述数据不为默认数值时,将所述数据按照顺序写入存储区域,提取出所述电路板的空白区域,节省时间,提高效率。
本发明进一步提供一种数据写入装置。
参照图6,图6为本发明数据写入装置第一实施例的功能模块示意图。
需要强调的是,对本领域的技术人员来说,图6所示功能模块图仅仅是一个较佳实施例的示例图,本领域的技术人员围绕图6所示的数据写入装置的功能模块,可轻易进行新的功能模块的补充;各功能模块的名称是自定义名称,仅用于辅助理解数据写入装置的各个程序功能块,不用于限定本发明的技术方案,本发明技术方案的核心是,各自定义名称的功能模块所要达成的功能。
本实施例提出的数据写入装置,所述数据写入装置包括:
第一读取模块10,用于依次读取数据写入设备存储区域待读取的数据;
在本实施例中,通过所述数据写入设备向待写入电路板写入程序,依次读取所述数据写入设备的存储区域待读取的数据,并将所述数据写入待写入电路板。
第一判断模块20,用于在每次读取到所述数据时,判断所述数据是否被标记;
在本实施例中,在向待写入电路板写入数据时,判断当前读取的数据是否已被标记,若被标记,则说明所述数据为一空白区域的首个数据,此时获取所述数据的存储地址,根据所述存储地址查找管理存储的数据为默认数值的长度值。
写入模块30,用于若所述数据没有被标记,将所述数据写入待写入电路板;
在本实施中,根据数据写入设备存储的程序数据,将所述程序写入待写入电路板,空白区域较大时,可根据读取到的标记标记的存储地址在所述列表中匹配查找长度值。
获取模块40,用于若所述数据被标记,获取所述数据关联的长度值;
参照图7,所述获取模块40包括:
获取单元41,用于获取所述数据的存储地址;
判断单元42,用于判断是否查找到所述存储地址;
所述获取单元43,还用于若查找到所述存储地址,根据所述存储地址执行所述获取所述数据关联的长度值的步骤;
提示单元44,用于若未查找到所述存储地址,弹出错误提示。
在没有根据所述标记的地址查找到空白区域的数据长度值时,可弹出错误提示,提醒写入过程出错。
所述写入模块30,还用于在获取到所述长度值时,向所述待写入电路板存储区域对应的地址写入与长度值对应的默认数值。
在本实施例中,在所述待写入电路板将要写入的模板电路板存在空白区域时,可通过确定所述空白区域的首个数据的存储地址和长度,将所述空白区域写入默认数据,所述默认数据可以为00或FF。
本实施例提出的数据写入方法,在向待写入电路板写入数据时,根据建立列表对应存储所述数据的存储地址和连续均为默认数值的数据段长,批量快速写入空白区域的默认数值,而不是逐个字节的写入空白区域的默认数值,节省时间,提高效率。
进一步地,基于第二实施例本发明还提出数据写入装置的第二实施例,参照图8,所述数据写入装置还包括:
显示模块50,用于显示数据写入设备存储区域存储的不同电路板的数据的列表;
在本实施例中,所述数据写入设备可存储多个不同规格的电路板运行的程序,在向所述待写入电路板写入程序时,可以显示所述数据写入设备存储的不同的电路板的数据的列表,根据需要,选择相应的电路板存储的数据。
处理模块60,用于根据选定的电路板的数据的存储地址,将所述存储地址对应存储的数据设为待读取的数据。
在本实施例中,所述数据写入设备存储有多个不同规格的电路板的数据,在接收到选定的电路板的信息时,根据所述电路板的信息查找关联的数据的存储地址,获取所述数据为待读取数据。
本实施例提出的数据写入方法,提供多个供写入程序,根据实际需要选择相应的程序进行写入,提高资源利用率。
进一步地,基于第一实施例本发明还提出数据写入装置的第三实施例,参照图9,所述数据写入装置还包括:
第二读取模块70,用于依次读取待读取电路板存储的数据;
在本实施例中,通过数据写入设备运用所述数据写入方法将电路板上已存储的程序数据写入待写入电路板,具体地,可通过所述数据写入设备先将所述程序数据写入数据写入设备的存储区域。
可以理解的是,电路板中存在大量空白区域,所述空白区域设有相同的默认数值,即默认数值,所述默认值可任意设置,一般可以为00或FF,逐个字节的读写所述空白区域的默认数值并将其逐个写入较为浪费时间。
在本实施例中,读取电路板的数据时,首先判断所述读取到的数据是否为默认数值,根据读取到的数据的数值,进行不同的操作。
第二判断模块80,用于在每次读取到所述数据时,判断所述数据的数值是否为默认数值;
在本实施例中,若读取到的所述数据为默认数值,则可在所述数据添加一个标记,标明此数据为电路板上一段空白区域中读取到的首个为默认数值的数据,获取所述数据的存储地址,并计算连续的数据均为默认数值的段长,即空白区域的长度。
标记模块90,用于在所述数据为默认数值时,标记所述数据;
存储模块100,用于关联存储所述数据的存储地址和连续多个数据的数值均为默认数值的长度值;
在本实施例中,可在所述数据写入设备的存储区域建立所述程序的空白区域的列表,对应存储所述数据的存储地址和连续均为默认数值的数据段长。
在向待写入电路板写入数据时,若读取到所述标记,则可获取所述标记的存储地址,根据所述存储地址查找对应的空白区域的长度,将默认数值按照所述存储地址及其对应的所述段长写入待写入电路板,其中所述存储地址包括段地址和段内偏移地址。
所述存储模块100,还用于在所述数据为非默认数值时,将所述数据按照顺序写入存储区域。
在本实施例中,在所述数据不为默认数值时,即所述数据为有效程序数据时,将所述数据按顺序写入数据写入设备的存储区域。
进一步地,参照图10,所述数据写入装置包括:
更新模块110,用于更新连续多个数据的数值均为默认数值的长度值;
可以理解的是,目前的电路板的存储空间、计算能力和数据读写能力都较为强大,在所述空白区域不大时,即所述数据均为默认数值的数据段长没有达到第二预设阈值,逐个字节的写入所述数据的效率与一次性将所述空白区域填充数据的效率相比并不低,所述电路板的存储空间可以为16GB,此时可以设置所述第二预设阈值为200字节,若所述空白区域的数据长度没有达到所述第二预设阈值,此时,可以将所述数据按照顺序逐个存储。
第三判断模块120,用于判断所述长度值是否达到第二预设阈值;
所述第二预设阈值即为预设的连续存储的数据均为默认数据的长度值;
在本实施例中,当读取到一段数据均为默认数值时,可统计计算所述一段数据的数据长度,若所述数据长度达到第二预设阈值,则建立相应的列表建立列表对应存储所述数据的存储地址和连续均为默认数值的数据段长;
所述存储模块100,还用于若所述长度值达到第二预设阈值,关联存储所述长度值和所述数据的存储地址;
所述存储模块100,还用于若所述长度值未达到第二预设阈值,将所述数据按照顺序存入存储区域。
本实施例提出的数据写入方法,将作为模板的电路板的数据进行分析处理,依次读取电路板存储的数据;在读取到所述数据时,判断所述数据是否为默认数值;在所述数据为默认数值时,标记所述数据,继续读取下一数据,直至读取到非默认数值的数据;在存储区域建立列表对应存储所述数据的存储地址和连续均为默认数值的数据段长;在所述数据不为默认数值时,将所述数据按照顺序写入存储区域,提取出所述电路板的空白区域,节省时间,提高效率。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本发明各个实施例所述的方法。
以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。

Claims (19)

  1. 一种数据写入方法,其特征在于,所述数据写入方法包括步骤:
    依次读取待读取电路板存储的数据;
    在每次读取到所述数据时,判断所述数据的数值是否为默认数值;
    在所述数据为默认数值时,标记所述数据;
    关联存储所述数据的存储地址和连续多个数据的数值均为默认数值的长度值;
    在所述数据为非默认数值时,将所述数据按照顺序写入存储区域;
    显示数据写入设备存储区域存储的不同电路板的数据的列表;
    根据选定的电路板的数据的存储地址,将所述存储地址对应存储的数据设为待读取的数据;
    依次读取数据写入设备存储区域待读取的数据;
    在每次读取到所述数据时,判断所述数据是否被标记;
    若所述数据没有被标记,将所述数据写入待写入电路板;
    若所述数据被标记,获取所述数据关联的长度值;
    在获取到所述长度值时,向所述待写入电路板存储区域对应的地址写入与长度值对应的默认数值。
  2. 如权利要求1所述的数据写入方法,其特征在于,所述获取所述数据关联的长度值的步骤包括:
    获取所述数据的存储地址;
    判断是否查找到所述存储地址;
    若查找到所述存储地址,根据所述存储地址获取所述数据关联的长度值;
    若未查找到所述存储地址,弹出错误提示。
  3. 如权利要求2所述的数据写入方法,其特征在于,所述存储地址包括当前段地址和段内偏移地址。
  4. 如权利要求1所述的数据写入方法,其特征在于,所述关联存储所述数据的存储地址和连续多个数据的数值均为默认数值的长度值的步骤之前包括步骤:
    更新连续多个数据的数值均为默认数值的长度值;
    判断所述长度值是否达到第二预设阈值;
    若所述长度值达到第二预设阈值,执行所述关联保存所述长度值和所述数据的存储地址的步骤;
    若所述长度值未达到第二预设阈值,执行所述将所述数据按照顺序存入存储区域的步骤。
  5. 如权利要求1所述数据写入方法,其特征在于,所述电路板存储存储区域中空白区域设有相同的默认数值。
  6. 一种数据写入方法,其特征在于,所述数据写入方法包括步骤:
    依次读取数据写入设备存储区域待读取的数据;
    在每次读取到所述数据时,判断所述数据是否被标记;
    若所述数据没有被标记,将所述数据写入待写入电路板;
    若所述数据被标记,获取所述数据关联的长度值;
    在获取到所述长度值时,向所述待写入电路板存储区域对应的地址写入与长度值对应的默认数值。
  7. 如权利要求6所述的数据写入方法,其特征在于,所述获取所述数据关联的长度值的步骤包括:
    获取所述数据的存储地址;
    判断是否查找到所述存储地址;
    若查找到所述存储地址,根据所述存储地址获取所述数据关联的长度值;
    若未查找到所述存储地址,弹出错误提示。
  8. 如权利要求6所述的数据写入方法,其特征在于,所述存储地址包括当前段地址和段内偏移地址。
  9. 如权利要求6所述的数据写入方法,其特征在于,所述依次读取数据写入设备存储区域待读取的数据的步骤之前包括:
    显示数据写入设备存储区域存储的不同电路板的数据的列表;
    根据选定的电路板的数据的存储地址,将所述存储地址对应存储的数据设为待读取的数据。
  10. 如权利要求6所述的数据写入方法,其特征在于,所述依次读取数据写入设备存储区域存储的数据的步骤之前,所述数据写入方法还包括:
    依次读取待读取电路板存储的数据;
    在每次读取到所述数据时,判断所述数据的数值是否为默认数值;
    在所述数据为默认数值时,标记所述数据;
    关联存储所述数据的存储地址和连续多个数据的数值均为默认数值的长度值;
    在所述数据为非默认数值时,将所述数据按照顺序写入存储区域。
  11. 如权利要求10所述的数据写入方法,其特征在于,所述关联存储所述数据的存储地址和连续多个数据的数值均为默认数值的长度值的步骤之前包括步骤:
    更新连续多个数据的数值均为默认数值的长度值;
    判断所述长度值是否达到第二预设阈值;
    若所述长度值达到第二预设阈值,执行所述关联保存所述长度值和所述数据的存储地址的步骤;
    若所述长度值未达到第二预设阈值,执行所述将所述数据按照顺序存入存储区域的步骤。
  12. 如权利要求5所述的数据写入方法,其特征在于,所述电路板存储存储区域中空白区域设有相同的默认数值。
  13. 一种数据写入装置,其特征在于,所述数据写入装置包括:
    第一读取模块,用于依次读取数据写入设备存储区域待读取的数据;
    第一判断模块,用于在每次读取到所述数据时,判断所述数据是否被标记;
    写入模块,用于若所述数据没有被标记,将所述数据写入待写入电路板;
    获取模块,用于若所述数据被标记,获取所述数据关联的长度值;
    所述写入模块,还用于在获取到所述长度值时,向所述待写入电路板存储区域对应的地址写入与长度值对应的默认数值。
  14. 如权利要求13所述的数据写入装置,其特征在于,所述获取模块包括:
    获取单元,用于获取所述数据的存储地址;
    判断单元,用于判断是否查找到所述存储地址;
    所述获取单元,还用于若查找到所述存储地址,根据所述存储地址执行所述获取所述数据关联的长度值的步骤;
    提示单元,用于若未查找到所述存储地址,弹出错误提示。
  15. 如权利要求13所述的数据写入装置,其特征在于,所述数据写入装置还包括:
    显示模块,用于显示数据写入设备存储区域存储的不同电路板的数据的列表;
    处理模块,用于根据选定的电路板的数据的存储地址,将所述存储地址对应存储的数据设为待读取的数据。
  16. 如权利要求15所述的数据写入装置,其特征在于,所述存储地址包括当前段地址和段内偏移地址。
  17. 如权利要求13所述的数据写入装置,其特征在于,所述数据写入装置还包括:
    第二读取模块,用于依次读取待读取电路板存储的数据;
    第二判断模块,用于在每次读取到所述数据时,判断所述数据的数值是否为默认数值;
    标记模块,用于在所述数据为默认数值时,标记所述数据;
    存储模块,用于关联存储所述数据的存储地址和连续多个数据的数值均为默认数值的长度值;
    所述存储模块,还用于在所述数据为非默认数值时,将所述数据按照顺序写入存储区域。
  18. 如权利要求17所述的数据写入装置,其特征在于,所述数据写入装置还包括:
    更新模块,用于更新连续多个数据的数值均为默认数值的长度值;
    第三判断模块,用于判断所述长度值是否达到第二预设阈值;
    所述存储模块,还用于若所述长度值达到第二预设阈值,关联存储所述长度值和所述数据的存储地址;
    所述存储模块,还用于若所述长度值未达到第二预设阈值,将所述数据按照顺序存入存储区域。
  19. 如权利要求13所述的数据写入装置,其特征在于,所述电路板存储存储区域中空白区域设有相同的默认数值。
PCT/CN2016/084649 2015-12-30 2016-06-03 数据写入方法和装置 Ceased WO2017113603A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201511019651.6A CN105653469B (zh) 2015-12-30 2015-12-30 数据写入方法和装置
CN201511019651.6 2015-12-30

Publications (1)

Publication Number Publication Date
WO2017113603A1 true WO2017113603A1 (zh) 2017-07-06

Family

ID=56478439

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/084649 Ceased WO2017113603A1 (zh) 2015-12-30 2016-06-03 数据写入方法和装置

Country Status (2)

Country Link
CN (1) CN105653469B (zh)
WO (1) WO2017113603A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112148308A (zh) * 2019-06-28 2020-12-29 青岛海尔空调器有限总公司 防止漏烧的数据烧写方法及其装置、数据烧写设备

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5526025A (en) * 1992-04-07 1996-06-11 Chips And Technolgies, Inc. Method and apparatus for performing run length tagging for increased bandwidth in dynamic data repetitive memory systems
CN101667457A (zh) * 2008-09-03 2010-03-10 京元电子股份有限公司 芯片烧录系统与方法
CN102360569A (zh) * 2011-08-24 2012-02-22 中兴通讯股份有限公司 非易失闪存芯片烧录方法、系统及装置

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100643287B1 (ko) * 2004-11-19 2006-11-10 삼성전자주식회사 플래시 메모리의 데이터 처리 장치 및 방법
CN101808095B (zh) * 2010-03-22 2012-08-15 华中科技大学 一种分布式存储环境下的加密副本组织方法
CN103324503A (zh) * 2013-05-29 2013-09-25 京东方科技集团股份有限公司 一种数据烧录系统及方法
CN103778964B (zh) * 2013-12-30 2016-08-17 上海晨思电子科技有限公司 一种NAND Flash烧写数据的处理、使用方法及装置、系统

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5526025A (en) * 1992-04-07 1996-06-11 Chips And Technolgies, Inc. Method and apparatus for performing run length tagging for increased bandwidth in dynamic data repetitive memory systems
CN101667457A (zh) * 2008-09-03 2010-03-10 京元电子股份有限公司 芯片烧录系统与方法
CN102360569A (zh) * 2011-08-24 2012-02-22 中兴通讯股份有限公司 非易失闪存芯片烧录方法、系统及装置

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112148308A (zh) * 2019-06-28 2020-12-29 青岛海尔空调器有限总公司 防止漏烧的数据烧写方法及其装置、数据烧写设备

Also Published As

Publication number Publication date
CN105653469B (zh) 2018-11-02
CN105653469A (zh) 2016-06-08

Similar Documents

Publication Publication Date Title
WO2018107610A1 (zh) 业务数据处理方法、系统、设备及计算机可读存储介质
WO2019061613A1 (zh) 贷款资质筛选方法、装置及计算机可读存储介质
WO2018120429A1 (zh) 一种资源更新的方法、终端、计算机可读存储介质及资源更新设备
WO2015035777A1 (zh) 一种移动终端的软件升级方法和系统
WO2019041851A1 (zh) 家电售后咨询方法、电子设备和计算机可读存储介质
WO2017143692A1 (zh) 智能电视及其语音控制方法
WO2019037396A1 (zh) 账户清结算方法、装置、设备及存储介质
WO2019024219A1 (zh) 文档自动生成方法、装置、文档自动生成器及介质
WO2012122718A1 (zh) 一种浏览器预读方法及其系统
WO2019000801A1 (zh) 数据同步方法、装置、设备及计算机可读存储介质
WO2017054592A1 (zh) 一种界面显示的方法及终端
WO2017084302A1 (zh) 显示终端开机播放视频的方法及显示终端
WO2015103864A1 (zh) 内存管理的方法及Linux终端
WO2017148112A1 (zh) 一种指纹录入方法及终端
WO2018233301A1 (zh) 产品推荐方法、装置、设备以及计算机可读存储介质
WO2018166314A1 (zh) 额度审批方法、装置、设备以及计算机可读存储介质
WO2017088427A1 (zh) 音频输出控制方法及装置
WO2018188342A1 (zh) 脚本文件生成方法、装置、设备和计算机可读存储介质
WO2017036208A1 (zh) 显示界面中的信息提取方法及系统
WO2019080247A1 (zh) 产生保单批文的方法、装置、设备及计算机可读存储介质
WO2019062199A1 (zh) 用电计费方式的推荐方法、装置及存储介质
WO2019165723A1 (zh) 处理音视频的方法、系统、设备及存储介质
WO2019000800A1 (zh) 制证方法、装置、设备及计算机可读存储介质
WO2018201699A1 (zh) 客户评价方法、装置、设备以及计算机可读存储介质
WO2018098879A1 (zh) 数字水印加密方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16880411

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 061118)

122 Ep: pct application non-entry in european phase

Ref document number: 16880411

Country of ref document: EP

Kind code of ref document: A1