WO2017113603A1 - Method and device for data writing - Google Patents

Method and device for data writing 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
Application number
PCT/CN2016/084649
Other languages
French (fr)
Chinese (zh)
Inventor
詹翠丹
Original Assignee
深圳Tcl数字技术有限公司
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 深圳Tcl数字技术有限公司 filed Critical 深圳Tcl数字技术有限公司
Publication of WO2017113603A1 publication Critical patent/WO2017113603A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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

A method and a device for data writing, the method for data writing comprising: sequentially reading data to be read in a storage area of a data writing device (S10); each time the data is read, determining whether the data is marked (S20); if the data is not marked, writing the data into a circuit board to be written (S50); if the data is marked, acquiring the length value associated with the data (S30); when the length value is acquired, writing into the address that the storage area of the circuit board to be written corresponds to the default value corresponding to the length value (S40). Upon data writing, the address and length of data of a blank area of the circuit board are gathered and recorded, and the default data is written into the blank area of the circuit board to be written according to the address and length of the data, saving the time, improving the efficiency.

Description

数据写入方法和装置  Data writing method and device
技术领域Technical field
本发明涉及数据处理技术领域,尤其涉及一种数据写入方法和装置。The present invention relates to the field of data processing technologies, and in particular, to a data writing method and apparatus.
背景技术Background technique
在许多电子设备中(如电视等),系统的运行需要电路板上的存储器芯片为其提供运行程序,否则系统将无法启动。因此,生产者需要将程序代码通过烧录设备储存在存储器芯片中。存储器芯片都是以一个字节为单位存储信息,读写程序代码的时候都是逐个字节的读取或写入数据。In many electronic devices (such as TVs), the operation of the system requires a memory chip on the board to provide a running program, otherwise the system will not boot. Therefore, the producer needs to store the program code in the memory chip through the programming device. Memory chips store information in units of one byte, and read or write data byte by byte when reading or writing program code.
目前对电视的性能要求越来越高,所以电路板的容量越来越大,现在的电子设备,除了预装的程序,很多存储空间都是空白的,例如:电视的电路板存储空间是16GB,而正常存放软件的空间只有2GB,大量的空间是空白的,空白区域默认填充相同的数据,逐个字节的读取或写入相同数据,耗费时间。At present, the performance requirements of TV are getting higher and higher, so the capacity of the circuit board is getting bigger and bigger. Nowadays, in addition to the pre-installed programs, many storage spaces are blank. For example, 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.
发明内容Summary of the invention
本发明的主要目的在于提供一种数据写入方法和装置,旨在解决向电路板写入数据耗费时间的技术问题。SUMMARY OF THE INVENTION 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.
为实现上述目的,本发明提供一种数据写入方法,所述数据写入方法包括步骤:To achieve the above object, the present invention provides a data writing method, the data writing method comprising the steps of:
依次读取待读取电路板存储的数据;Reading data stored on the circuit board to be read in sequence;
在每次读取到所述数据时,判断所述数据的数值是否为默认数值;Determining whether the value of the data is a default value each time the data is read;
在所述数据为默认数值时,标记所述数据;Marking the data when the data is a default value;
关联存储所述数据的存储地址和连续多个数据的数值均为默认数值的长度值;The storage address associated with storing the data and the value of consecutive multiple data are length values of default values;
在所述数据为非默认数值时,将所述数据按照顺序写入存储区域;When the data is a non-default value, the data is sequentially written into the storage area;
显示数据写入设备存储区域存储的不同电路板的数据的列表;Display a list of data written to different boards stored in the device storage area;
根据选定的电路板的数据的存储地址,将所述存储地址对应存储的数据设为待读取的数据;Setting, according to a storage address of data of the selected circuit board, data stored corresponding to the storage address as data to be read;
依次读取数据写入设备存储区域待读取的数据;Reading data to be read in the storage area of the device in sequence;
在每次读取到所述数据时,判断所述数据是否被标记;Determining whether the data is marked each time the data is read;
若所述数据没有被标记,将所述数据写入待写入电路板;If the data is not marked, the data is written to the board to be written;
若所述数据被标记,获取所述数据关联的长度值;If the data is marked, obtaining a length value of the data association;
在获取到所述长度值时,向所述待写入电路板存储区域对应的地址写入与长度值对应的默认数值。When the length value is obtained, a default value corresponding to the length value is written to the address corresponding to the storage area of the board to be written.
为实现上述目的,本发明提供一种数据写入方法,所述数据写入方法包括:To achieve the above object, the present invention provides a data writing method, and the data writing method includes:
依次读取数据写入设备存储区域待读取的数据;Reading data to be read in the storage area of the device in sequence;
在每次读取到所述数据时,判断所述数据是否被标记;Determining whether the data is marked each time the data is read;
若所述数据没有被标记,将所述数据写入待写入电路板;If the data is not marked, the data is written to the board to be written;
若所述数据被标记,获取所述数据关联的长度值;If the data is marked, obtaining a length value of the data association;
在获取到所述长度值时,向所述待写入电路板存储区域对应的地址写入与长度值对应的默认数值。When the length value is obtained, a default value corresponding to the length value is written to the address corresponding to the storage area of the board to be written.
本发明进一步提供一种数据写入装置,所述数据写入装置包括: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;
写入模块,用于若所述数据没有被标记,将所述数据写入待写入电路板;Writing a module, if the data is not marked, writing the data to a circuit board to be written;
获取模块,用于若所述数据被标记,获取所述数据关联的长度值;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.
本发明提出的数据写入方法,在写入数据时,统计记录电路板的空白区域的数据地址及长度,根据所述数据地址及长度将默认数据写入待写入电路板的空白区域,节省时间,提高效率。According to 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.
附图说明DRAWINGS
图1为本发明数据写入方法第一实施例的流程示意图;1 is a schematic flow chart of a first embodiment of a data writing method according to the present invention;
图2为图1中获取长度值的细化流程示意图;2 is a schematic diagram of a refinement process of obtaining a length value in FIG. 1;
图3为本发明数据写入方法第二实施例的流程示意图;3 is a schematic flow chart of a second embodiment of a data writing method according to the present invention;
图4为本发明数据写入方法第三实施例流程示意图;4 is a schematic flow chart of a third embodiment of a data writing method according to the present invention;
图5为本发明一实施例中标记数值为默认数值的数据的细化流程示意图;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为本发明数据写入装置第一实施例的功能模块示意图;6 is a schematic diagram of functional modules of a first embodiment of a data writing apparatus according to the present invention;
图7为图6中获取模块的功能模块示意图;7 is a schematic diagram of functional modules of the acquisition module of FIG. 6;
图8为本发明数据写入装置第二实施例的功能模块示意图;8 is a schematic diagram of functional modules of a second embodiment of a data writing apparatus according to the present invention;
图9为本发明数据写入装置第三实施例的功能模块示意图。FIG. 9 is a schematic diagram of functional modules of a third embodiment of a data writing apparatus according to the present invention.
图10为本发明一实施例中标记数值为默认数值的数据的功能模块示意图。FIG. 10 is a schematic diagram of functional blocks of data marked with a default value in an embodiment of the present invention.
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The implementation, functional features, and advantages of the present invention will be further described in conjunction with the embodiments.
具体实施方式detailed description
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
参照图1,图1为本发明数据写入方法第一实施例的流程示意图。Referring to FIG. 1, 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:
步骤S10,依次读取数据写入设备存储区域待读取的数据;Step S10, sequentially reading data to be read by the data writing device storage area;
在本实施例中,通过数据写入设备向待写入电路板写入程序,依次读取所述数据写入设备的存储区域待读取的数据,并将所述数据写入待写入电路板。In this embodiment, 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.
步骤S20,在每次读取到所述数据时,判断所述数据是否被标记;Step S20, determining, when each time the data is read, whether the data is marked;
在本实施例中,在向待写入电路板写入数据时,判断当前读取的数据是否已被标记,若被标记,则说明所述数据为一空白区域的首个数据。此时获取所述数据的存储地址,根据所述存储地址查找管理存储的数据为默认数值的长度值。In this embodiment, 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.
步骤S30,若所述数据被标记,获取所述数据关联的长度值;Step S30, if the data is marked, obtaining a length value of the data association;
在本实施例中,根据数据写入设备存储的程序数据,将所述程序写入待写入电路板,空白区域较大时,可根据读取到的标记的存储地址匹配查找长度值。In this embodiment, according to the program data stored by the data writing device, 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.
参照图2,所述步骤S30包括:Referring to FIG. 2, the step S30 includes:
步骤S31,获取所述数据的存储地址;Step S31, acquiring a storage address of the data;
在本实施例中,所述存储地址包括当前段地址和段内偏移地址。In this embodiment, the storage address includes a current segment address and an intra-segment offset address.
步骤S32,判断是否查找到所述存储地址;Step S32, determining whether the storage address is found;
步骤S33,若查找到所述存储地址,根据所述存储地址执行所述获取所述数据关联的长度值的步骤;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;
步骤S34,若未查找到所述存储地址,弹出错误提示。In step S34, if the storage address is not found, an error message is displayed.
在没有根据所述标记的地址查找到空白区域的数据长度值时,可弹出错误提示,提醒写入过程出错。When the data length value of the blank area is not found according to the address of the tag, an error message may be popped up to remind the writing process of an error.
步骤S40,在获取到所述长度值时,向所述待写入电路板存储区域对应的地址写入与长度值对应的默认数值;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;
在本实施例中,在所述待写入电路板将要写入的模板电路板存在空白区域时,可通过确定所述空白区域的首个数据的存储地址和长度,将所述空白区域写入默认数据,所述默认数据可以为00或FF。In this embodiment, 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.
步骤S50,若所述数据没有被标记,将所述数据写入待写入电路板。Step S50, if the data is not marked, the data is written to the board to be written.
本实施例提出的数据写入方法,在向待写入电路板写入数据时,根据建立列表对应存储所述数据的存储地址和连续均为默认数值的数据段长,批量快速写入空白区域的默认数值,而不是逐个字节的写入空白区域的默认数值,节省时间,提高效率。In the data writing method of the embodiment, when data is written to the circuit 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.
进一步地,基于第二实施例本发明还提出数据写入方法的第二实施例,参照图3,所述步骤S10之前包括:Further, the present invention further provides a second embodiment of the data writing method based on the second embodiment. Referring to FIG. 3, the step S10 includes:
步骤S60,显示数据写入设备存储区域存储的不同电路板的数据的列表;Step S60, displaying a list of data written by different circuit boards stored in the storage area of the device;
在本实施例中,所述数据写入设备可存储多个不同规格的电路板运行的程序,在向所述待写入电路板写入程序时,可以显示所述数据写入设备存储的不同的电路板的数据的列表,根据需要,选择相应的电路板存储的数据。In this embodiment, 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 list of data for the board, as needed, select the data stored on the corresponding board.
步骤S70,根据选定的电路板的数据的存储地址,将所述存储地址对应存储的数据设为待读取的数据。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.
在本实施例中,所述数据写入设备存储有多个不同规格的电路板的数据,在接收到选定的电路板的信息时,根据所述电路板的信息查找关联的数据的存储地址,获取所述数据为待读取数据。In this embodiment, 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.
进一步地,基于第一实施例本发明还提出数据写入方法的第三实施例,参照图4,所述步骤S10之前,所述数据写入方法还包括步骤:Further, the present invention further provides a third embodiment of the data writing method based on the first embodiment. Referring to FIG. 4, before the step S10, the data writing method further includes the following steps:
步骤S80,依次读取待读取电路板存储的数据;Step S80, sequentially reading data stored on the circuit board to be read;
在本实施例中,通过数据写入设备运用所述数据写入方法将电路板上已存储的程序数据写入待写入电路板,具体地,可通过所述数据写入设备先将所述程序数据写入数据写入设备的存储区域。In this embodiment, 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. Specifically, the data writing device may first Program data is written to the memory area of the device.
步骤S90,在每次读取到所述数据时,判断所述数据的数值是否为默认数值;Step S90, determining, when each time the data is read, whether the value of the data is a default value;
可以理解的是,电路板中存在大量空白区域,所述空白区域设有相同的默认数值,即默认数值,所述默认值可任意设置,一般可以为00或FF,逐个字节的读写所述空白区域的默认数值并将其逐个写入较为浪费时间。It can be understood that there are a large number of blank areas in the circuit board, and 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.
在本实施例中,读取电路板的数据时,首先判断所述读取到的数据是否为默认数值,根据读取到的数据的数值,进行不同的操作。In the embodiment, 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.
步骤S100,在所述数据为默认数值时,标记所述数据;Step S100, marking the data when the data is a default value;
在本实施例中,若读取到的所述数据为默认数值,则可在所述数据添加一个标记,标明此数据为电路板上一段空白区域中读取到的首个为默认数值的数据,获取所述数据的存储地址,并计算连续的数据均为默认数值的段长,即空白区域的长度。In this embodiment, if the read 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.
步骤S110,关联存储所述数据的存储地址和连续多个数据的数值均为默认数值的长度值;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;
在本实施例中,可在所述数据写入设备的存储区域建立所述程序的空白区域的列表,对应存储所述数据的存储地址和连续均为默认数值的数据段长。In this embodiment, 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.
在向待写入电路板写入数据时,若读取到所述标记,则可获取所述标记的存储地址,根据所述存储地址查找对应的空白区域的长度,将默认数值按照所述存储地址及其对应的所述段长写入待写入电路板,其中所述存储地址包括段地址和段内偏移地址。When the data is written to the board to be written, if the tag is read, 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.
步骤S120,在所述数据为非默认数值时,将所述数据按照顺序写入存储区域。Step S120: When the data is a non-default value, the data is sequentially written into the storage area.
在本实施例中,在所述数据不为默认数值时,即所述数据为有效程序数据时,将所述数据按顺序写入数据写入设备的存储区域。 In this embodiment, 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.
进一步地,参照图5,所述步骤S110之前还包括步骤:Further, referring to FIG. 5, the step S110 further includes the following steps:
步骤S130,更新连续多个数据的数值均为默认数值的长度值;Step S130, updating the value of the continuous plurality of data is the length value of the default value;
可以理解的是,目前的电路板的存储空间、计算能力和数据读写能力都较为强大,在所述空白区域不大时,即所述数据均为默认数值的数据段长没有达到第二预设阈值,逐个字节的写入所述数据的效率与一次性将所述空白区域填充数据的效率相比并不低,所述电路板的存储空间可以为16GB,此时可以设置所述第二预设阈值为200字节,若所述空白区域的数据长度没有达到所述第二预设阈值,此时,可以将所述数据按照顺序逐个存储。It can be understood that the current storage space, computing power, and data reading and writing capabilities of the circuit board are relatively strong. When 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, and 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.
步骤S140,判断所述长度值是否达到第二预设阈值;Step S140, determining whether the length value reaches a second preset threshold;
在本实施例中,当读取到一段数据均为默认数值时,可统计计算所述一段数据的数据长度,若所述数据长度达到第二预设阈值,则建立相应的列表建立列表对应存储所述数据的存储地址和连续均为默认数值的数据段长;In this embodiment, when a piece of data is read as a default value, 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;
若所述长度值达到第二预设阈值,执行所述步骤S110;If the length value reaches the second preset threshold, perform the step S110;
若所述长度值未达到第二预设阈值,执行所述步骤S120。If the length value does not reach the second preset threshold, the step S120 is performed.
本实施例提出的数据写入方法,将作为模板的电路板的数据进行分析处理,依次读取电路板存储的数据;在读取到所述数据时,判断所述数据是否为默认数值;在所述数据为默认数值时,标记所述数据,继续读取下一数据,直至读取到非默认数值的数据;在存储区域建立列表对应存储所述数据的存储地址和连续均为默认数值的数据段长;在所述数据不为默认数值时,将所述数据按照顺序写入存储区域,提取出所述电路板的空白区域,节省时间,提高效率。 In the data writing method of the embodiment, 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.
参照图6,图6为本发明数据写入装置第一实施例的功能模块示意图。Referring to FIG. 6, FIG. 6 is a schematic diagram of functional modules of a first embodiment of a data writing apparatus according to the present invention.
需要强调的是,对本领域的技术人员来说,图6所示功能模块图仅仅是一个较佳实施例的示例图,本领域的技术人员围绕图6所示的数据写入装置的功能模块,可轻易进行新的功能模块的补充;各功能模块的名称是自定义名称,仅用于辅助理解数据写入装置的各个程序功能块,不用于限定本发明的技术方案,本发明技术方案的核心是,各自定义名称的功能模块所要达成的功能。It should be emphasized that, for those skilled in the art, 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.
本实施例提出的数据写入装置,所述数据写入装置包括:In the data writing device of the embodiment, the data writing device includes:
第一读取模块10,用于依次读取数据写入设备存储区域待读取的数据;The first reading module 10 is configured to sequentially read data to be read by the data writing device storage area;
在本实施例中,通过所述数据写入设备向待写入电路板写入程序,依次读取所述数据写入设备的存储区域待读取的数据,并将所述数据写入待写入电路板。In this embodiment, 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.
第一判断模块20,用于在每次读取到所述数据时,判断所述数据是否被标记;The first determining module 20 is configured to determine whether the data is marked each time the data is read;
在本实施例中,在向待写入电路板写入数据时,判断当前读取的数据是否已被标记,若被标记,则说明所述数据为一空白区域的首个数据,此时获取所述数据的存储地址,根据所述存储地址查找管理存储的数据为默认数值的长度值。In this embodiment, 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.
写入模块30,用于若所述数据没有被标记,将所述数据写入待写入电路板;Writing to the module 30, if the data is not marked, writing the data to the circuit board to be written;
在本实施中,根据数据写入设备存储的程序数据,将所述程序写入待写入电路板,空白区域较大时,可根据读取到的标记标记的存储地址在所述列表中匹配查找长度值。In this implementation, according to the program data stored by the data writing device, 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.
获取模块40,用于若所述数据被标记,获取所述数据关联的长度值;The obtaining module 40 is configured to obtain a length value of the data association if the data is marked;
参照图7,所述获取模块40包括:Referring to FIG. 7, the obtaining module 40 includes:
获取单元41,用于获取所述数据的存储地址;An obtaining unit 41, configured to acquire a storage address of the data;
判断单元42,用于判断是否查找到所述存储地址;The determining unit 42 is configured to determine whether the storage address is found;
所述获取单元43,还用于若查找到所述存储地址,根据所述存储地址执行所述获取所述数据关联的长度值的步骤;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;
提示单元44,用于若未查找到所述存储地址,弹出错误提示。The prompting unit 44 is configured to pop up an error prompt if the storage address is not found.
在没有根据所述标记的地址查找到空白区域的数据长度值时,可弹出错误提示,提醒写入过程出错。When the data length value of the blank area is not found according to the address of the tag, an error message may be popped up to remind the writing process of an error.
所述写入模块30,还用于在获取到所述长度值时,向所述待写入电路板存储区域对应的地址写入与长度值对应的默认数值。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.
在本实施例中,在所述待写入电路板将要写入的模板电路板存在空白区域时,可通过确定所述空白区域的首个数据的存储地址和长度,将所述空白区域写入默认数据,所述默认数据可以为00或FF。In this embodiment, 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.
本实施例提出的数据写入方法,在向待写入电路板写入数据时,根据建立列表对应存储所述数据的存储地址和连续均为默认数值的数据段长,批量快速写入空白区域的默认数值,而不是逐个字节的写入空白区域的默认数值,节省时间,提高效率。In the data writing method of the embodiment, when data is written to the circuit 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.
进一步地,基于第二实施例本发明还提出数据写入装置的第二实施例,参照图8,所述数据写入装置还包括:Further, the present invention further provides a second embodiment of the data writing device based on the second embodiment. Referring to FIG. 8, the data writing device further includes:
显示模块50,用于显示数据写入设备存储区域存储的不同电路板的数据的列表;a display module 50, configured to display a list of data written by different data boards stored in the storage area of the device;
在本实施例中,所述数据写入设备可存储多个不同规格的电路板运行的程序,在向所述待写入电路板写入程序时,可以显示所述数据写入设备存储的不同的电路板的数据的列表,根据需要,选择相应的电路板存储的数据。In this embodiment, 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 list of data for the board, as needed, select the data stored on the corresponding board.
处理模块60,用于根据选定的电路板的数据的存储地址,将所述存储地址对应存储的数据设为待读取的数据。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.
在本实施例中,所述数据写入设备存储有多个不同规格的电路板的数据,在接收到选定的电路板的信息时,根据所述电路板的信息查找关联的数据的存储地址,获取所述数据为待读取数据。In this embodiment, 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.
进一步地,基于第一实施例本发明还提出数据写入装置的第三实施例,参照图9,所述数据写入装置还包括:Further, the present invention further provides a third embodiment of the data writing device based on the first embodiment. Referring to FIG. 9, the data writing device further includes:
第二读取模块70,用于依次读取待读取电路板存储的数据;a second reading module 70, configured to sequentially read data stored by the circuit board to be read;
在本实施例中,通过数据写入设备运用所述数据写入方法将电路板上已存储的程序数据写入待写入电路板,具体地,可通过所述数据写入设备先将所述程序数据写入数据写入设备的存储区域。In this embodiment, 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. Specifically, the data writing device may first Program data is written to the memory area of the device.
可以理解的是,电路板中存在大量空白区域,所述空白区域设有相同的默认数值,即默认数值,所述默认值可任意设置,一般可以为00或FF,逐个字节的读写所述空白区域的默认数值并将其逐个写入较为浪费时间。It can be understood that there are a large number of blank areas in the circuit board, and 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.
在本实施例中,读取电路板的数据时,首先判断所述读取到的数据是否为默认数值,根据读取到的数据的数值,进行不同的操作。In the embodiment, 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.
第二判断模块80,用于在每次读取到所述数据时,判断所述数据的数值是否为默认数值;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;
在本实施例中,若读取到的所述数据为默认数值,则可在所述数据添加一个标记,标明此数据为电路板上一段空白区域中读取到的首个为默认数值的数据,获取所述数据的存储地址,并计算连续的数据均为默认数值的段长,即空白区域的长度。In this embodiment, if the read 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.
标记模块90,用于在所述数据为默认数值时,标记所述数据;a marking module 90, configured to mark the data when the data is a default value;
存储模块100,用于关联存储所述数据的存储地址和连续多个数据的数值均为默认数值的长度值;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.
在本实施例中,可在所述数据写入设备的存储区域建立所述程序的空白区域的列表,对应存储所述数据的存储地址和连续均为默认数值的数据段长。In this embodiment, 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.
在向待写入电路板写入数据时,若读取到所述标记,则可获取所述标记的存储地址,根据所述存储地址查找对应的空白区域的长度,将默认数值按照所述存储地址及其对应的所述段长写入待写入电路板,其中所述存储地址包括段地址和段内偏移地址。When the data is written to the board to be written, if the tag is read, 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.
所述存储模块100,还用于在所述数据为非默认数值时,将所述数据按照顺序写入存储区域。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.
在本实施例中,在所述数据不为默认数值时,即所述数据为有效程序数据时,将所述数据按顺序写入数据写入设备的存储区域。 In this embodiment, 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.
进一步地,参照图10,所述数据写入装置包括:Further, referring to FIG. 10, the data writing device includes:
更新模块110,用于更新连续多个数据的数值均为默认数值的长度值;The update module 110 is configured to update a length value of a plurality of consecutive data values that are default values;
可以理解的是,目前的电路板的存储空间、计算能力和数据读写能力都较为强大,在所述空白区域不大时,即所述数据均为默认数值的数据段长没有达到第二预设阈值,逐个字节的写入所述数据的效率与一次性将所述空白区域填充数据的效率相比并不低,所述电路板的存储空间可以为16GB,此时可以设置所述第二预设阈值为200字节,若所述空白区域的数据长度没有达到所述第二预设阈值,此时,可以将所述数据按照顺序逐个存储。It can be understood that the current storage space, computing power, and data reading and writing capabilities of the circuit board are relatively strong. When 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, and 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.
第三判断模块120,用于判断所述长度值是否达到第二预设阈值;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;
在本实施例中,当读取到一段数据均为默认数值时,可统计计算所述一段数据的数据长度,若所述数据长度达到第二预设阈值,则建立相应的列表建立列表对应存储所述数据的存储地址和连续均为默认数值的数据段长;In this embodiment, when a piece of data is read as a default value, 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;
所述存储模块100,还用于若所述长度值达到第二预设阈值,关联存储所述长度值和所述数据的存储地址;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;
所述存储模块100,还用于若所述长度值未达到第二预设阈值,将所述数据按照顺序存入存储区域。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.
本实施例提出的数据写入方法,将作为模板的电路板的数据进行分析处理,依次读取电路板存储的数据;在读取到所述数据时,判断所述数据是否为默认数值;在所述数据为默认数值时,标记所述数据,继续读取下一数据,直至读取到非默认数值的数据;在存储区域建立列表对应存储所述数据的存储地址和连续均为默认数值的数据段长;在所述数据不为默认数值时,将所述数据按照顺序写入存储区域,提取出所述电路板的空白区域,节省时间,提高效率。 In the data writing method of the embodiment, 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.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It is to be understood that the term "comprises", "comprising", or any other variants thereof, is intended to encompass a non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes those elements. It also includes other elements that are not explicitly listed, or elements that are inherent to such a process, method, article, or device. An element that is defined by the phrase "comprising a ..." does not exclude the presence of additional equivalent elements in the process, method, item, or device that comprises the element.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本发明各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that 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.
以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above are only the preferred embodiments of the present invention, and are not intended to limit the scope of the invention, and the equivalent structure or equivalent process transformations made by the description of the present invention and the drawings are directly or indirectly applied to other related technical fields. The same is included in the scope of patent protection of the present invention.

Claims (19)

  1. 一种数据写入方法,其特征在于,所述数据写入方法包括步骤:A data writing method, characterized in that the data writing method comprises the steps of:
    依次读取待读取电路板存储的数据;Reading data stored on the circuit board to be read in sequence;
    在每次读取到所述数据时,判断所述数据的数值是否为默认数值;Determining whether the value of the data is a default value each time the data is read;
    在所述数据为默认数值时,标记所述数据;Marking the data when the data is a default value;
    关联存储所述数据的存储地址和连续多个数据的数值均为默认数值的长度值;The storage address associated with storing the data and the value of consecutive multiple data are length values of default values;
    在所述数据为非默认数值时,将所述数据按照顺序写入存储区域;When the data is a non-default value, the data is sequentially written into the storage area;
    显示数据写入设备存储区域存储的不同电路板的数据的列表;Display a list of data written to different boards stored in the device storage area;
    根据选定的电路板的数据的存储地址,将所述存储地址对应存储的数据设为待读取的数据;Setting, according to a storage address of data of the selected circuit board, data stored corresponding to the storage address as data to be read;
    依次读取数据写入设备存储区域待读取的数据;Reading data to be read in the storage area of the device in sequence;
    在每次读取到所述数据时,判断所述数据是否被标记;Determining whether the data is marked each time the data is read;
    若所述数据没有被标记,将所述数据写入待写入电路板;If the data is not marked, the data is written to the board to be written;
    若所述数据被标记,获取所述数据关联的长度值;If the data is marked, obtaining a length value of the data association;
    在获取到所述长度值时,向所述待写入电路板存储区域对应的地址写入与长度值对应的默认数值。When the length value is obtained, a default value corresponding to the length value is written to the address corresponding to the storage area of the board to be written.
  2. 如权利要求1所述的数据写入方法,其特征在于,所述获取所述数据关联的长度值的步骤包括:The data writing method according to claim 1, wherein the step of acquiring the length value of the data association comprises:
    获取所述数据的存储地址;Obtaining a storage address of the data;
    判断是否查找到所述存储地址;Determining whether the storage address is found;
    若查找到所述存储地址,根据所述存储地址获取所述数据关联的长度值;If the storage address is found, obtaining a length value of the data association according to the storage address;
    若未查找到所述存储地址,弹出错误提示。If the storage address is not found, an error message is displayed.
  3. 如权利要求2所述的数据写入方法,其特征在于,所述存储地址包括当前段地址和段内偏移地址。The data writing method according to claim 2, wherein said storage address comprises a current segment address and an intra-segment offset address.
  4. 如权利要求1所述的数据写入方法,其特征在于,所述关联存储所述数据的存储地址和连续多个数据的数值均为默认数值的长度值的步骤之前包括步骤:The data writing method according to claim 1, wherein the step of associating the storage address of the data and the value of the continuous plurality of data as the length value of the default value comprises the steps of:
    更新连续多个数据的数值均为默认数值的长度值;The value of updating consecutive data is the length value of the default value;
    判断所述长度值是否达到第二预设阈值;Determining whether the length value reaches a second preset threshold;
    若所述长度值达到第二预设阈值,执行所述关联保存所述长度值和所述数据的存储地址的步骤;And if the length value reaches a second preset threshold, performing the associating step of saving the length value and the storage address of the data;
    若所述长度值未达到第二预设阈值,执行所述将所述数据按照顺序存入存储区域的步骤。And if the length value does not reach the second preset threshold, performing the step of storing the data in the storage area in order.
  5. 如权利要求1所述数据写入方法,其特征在于,所述电路板存储存储区域中空白区域设有相同的默认数值。The data writing method according to claim 1, wherein the blank area in the storage area of the circuit board is provided with the same default value.
  6. 一种数据写入方法,其特征在于,所述数据写入方法包括步骤: A data writing method, characterized in that the data writing method comprises the steps of:
    依次读取数据写入设备存储区域待读取的数据;Reading data to be read in the storage area of the device in sequence;
    在每次读取到所述数据时,判断所述数据是否被标记;Determining whether the data is marked each time the data is read;
    若所述数据没有被标记,将所述数据写入待写入电路板;If the data is not marked, the data is written to the board to be written;
    若所述数据被标记,获取所述数据关联的长度值;If the data is marked, obtaining a length value of the data association;
    在获取到所述长度值时,向所述待写入电路板存储区域对应的地址写入与长度值对应的默认数值。When the length value is obtained, a default value corresponding to the length value is written to the address corresponding to the storage area of the board to be written.
  7. 如权利要求6所述的数据写入方法,其特征在于,所述获取所述数据关联的长度值的步骤包括:The data writing method according to claim 6, wherein the step of acquiring the length value of the data association comprises:
    获取所述数据的存储地址;Obtaining a storage address of the data;
    判断是否查找到所述存储地址;Determining whether the storage address is found;
    若查找到所述存储地址,根据所述存储地址获取所述数据关联的长度值;If the storage address is found, obtaining a length value of the data association according to the storage address;
    若未查找到所述存储地址,弹出错误提示。If the storage address is not found, an error message is displayed.
  8. 如权利要求6所述的数据写入方法,其特征在于,所述存储地址包括当前段地址和段内偏移地址。The data writing method according to claim 6, wherein said storage address comprises a current segment address and an intra-segment offset address.
  9. 如权利要求6所述的数据写入方法,其特征在于,所述依次读取数据写入设备存储区域待读取的数据的步骤之前包括:The data writing method according to claim 6, wherein the step of sequentially reading the data to be read by the data writing device to be read includes:
    显示数据写入设备存储区域存储的不同电路板的数据的列表;Display a list of data written to different boards stored in the device storage area;
    根据选定的电路板的数据的存储地址,将所述存储地址对应存储的数据设为待读取的数据。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.
  10. 如权利要求6所述的数据写入方法,其特征在于,所述依次读取数据写入设备存储区域存储的数据的步骤之前,所述数据写入方法还包括:The data writing method according to claim 6, wherein the data writing method further comprises: before the step of sequentially reading the data stored in the storage area of the device storage area, the data writing method further comprises:
    依次读取待读取电路板存储的数据;Reading data stored on the circuit board to be read in sequence;
    在每次读取到所述数据时,判断所述数据的数值是否为默认数值;Determining whether the value of the data is a default value each time the data is read;
    在所述数据为默认数值时,标记所述数据;Marking the data when the data is a default value;
    关联存储所述数据的存储地址和连续多个数据的数值均为默认数值的长度值;The storage address associated with storing the data and the value of consecutive multiple data are length values of default values;
    在所述数据为非默认数值时,将所述数据按照顺序写入存储区域。When the data is a non-default value, the data is written to the storage area in order.
  11. 如权利要求10所述的数据写入方法,其特征在于,所述关联存储所述数据的存储地址和连续多个数据的数值均为默认数值的长度值的步骤之前包括步骤:The data writing method according to claim 10, wherein the step of associating the storage address of the data and the value of the continuous plurality of data being the length value of the default value comprises the steps of:
    更新连续多个数据的数值均为默认数值的长度值;The value of updating consecutive data is the length value of the default value;
    判断所述长度值是否达到第二预设阈值;Determining whether the length value reaches a second preset threshold;
    若所述长度值达到第二预设阈值,执行所述关联保存所述长度值和所述数据的存储地址的步骤;And if the length value reaches a second preset threshold, performing the associating step of saving the length value and the storage address of the data;
    若所述长度值未达到第二预设阈值,执行所述将所述数据按照顺序存入存储区域的步骤。And if the length value does not reach the second preset threshold, performing the step of storing the data in the storage area in order.
  12. 如权利要求5所述的数据写入方法,其特征在于,所述电路板存储存储区域中空白区域设有相同的默认数值。The data writing method according to claim 5, wherein the blank area in the storage area of the circuit board is provided with the same default value.
  13. 一种数据写入装置,其特征在于,所述数据写入装置包括:A data writing device, characterized in that the data writing device comprises:
    第一读取模块,用于依次读取数据写入设备存储区域待读取的数据;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;
    写入模块,用于若所述数据没有被标记,将所述数据写入待写入电路板;Writing a module, if the data is not marked, writing the data to a circuit board to be written;
    获取模块,用于若所述数据被标记,获取所述数据关联的长度值;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.
  14. 如权利要求13所述的数据写入装置,其特征在于,所述获取模块包括:The data writing device according to claim 13, wherein the obtaining module comprises:
    获取单元,用于获取所述数据的存储地址;An obtaining unit, configured to acquire a storage address of the data;
    判断单元,用于判断是否查找到所述存储地址;a determining unit, configured to determine whether the storage address is found;
    所述获取单元,还用于若查找到所述存储地址,根据所述存储地址执行所述获取所述数据关联的长度值的步骤;The obtaining unit 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 is configured to pop up an error prompt if the storage address is not found.
  15. 如权利要求13所述的数据写入装置,其特征在于,所述数据写入装置还包括:The data writing device of claim 13, wherein the data writing device further comprises:
    显示模块,用于显示数据写入设备存储区域存储的不同电路板的数据的列表;a display module, configured to display a list of data written to different boards stored in a storage area of the device;
    处理模块,用于根据选定的电路板的数据的存储地址,将所述存储地址对应存储的数据设为待读取的数据。And a processing module, 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.
  16. 如权利要求15所述的数据写入装置,其特征在于,所述存储地址包括当前段地址和段内偏移地址。The data writing device according to claim 15, wherein said memory address comprises a current segment address and an intra-segment offset address.
  17. 如权利要求13所述的数据写入装置,其特征在于,所述数据写入装置还包括:The data writing device of claim 13, wherein the data writing device further comprises:
    第二读取模块,用于依次读取待读取电路板存储的数据;a second reading module, configured to sequentially read data stored on the circuit board to be read;
    第二判断模块,用于在每次读取到所述数据时,判断所述数据的数值是否为默认数值;a second determining module, configured to determine whether the value of the data is a default value each time the data is read;
    标记模块,用于在所述数据为默认数值时,标记所述数据;a marking module, configured to mark the data when the data is a default value;
    存储模块,用于关联存储所述数据的存储地址和连续多个数据的数值均为默认数值的长度值;a storage module, configured to associate a storage address storing the data and a value of a plurality of consecutive data as a default value;
    所述存储模块,还用于在所述数据为非默认数值时,将所述数据按照顺序写入存储区域。The storage module is further configured to write the data into the storage area in sequence when the data is a non-default value.
  18. 如权利要求17所述的数据写入装置,其特征在于,所述数据写入装置还包括:The data writing device of claim 17, wherein the data writing device further comprises:
    更新模块,用于更新连续多个数据的数值均为默认数值的长度值;An update module for updating a value of a plurality of consecutive data values that are default values;
    第三判断模块,用于判断所述长度值是否达到第二预设阈值;a third determining module, configured to determine whether the length value reaches a second preset threshold;
    所述存储模块,还用于若所述长度值达到第二预设阈值,关联存储所述长度值和所述数据的存储地址;The storage module 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 is further configured to store the data in the storage area in order if the length value does not reach the second preset threshold.
  19. 如权利要求13所述的数据写入装置,其特征在于,所述电路板存储存储区域中空白区域设有相同的默认数值。The data writing device according to claim 13, wherein the blank area in the storage area of the circuit board is provided with the same default value.
PCT/CN2016/084649 2015-12-30 2016-06-03 Method and device for data writing WO2017113603A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201511019651.6 2015-12-30
CN201511019651.6A CN105653469B (en) 2015-12-30 2015-12-30 Method for writing data and device

Publications (1)

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

Family

ID=56478439

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/084649 WO2017113603A1 (en) 2015-12-30 2016-06-03 Method and device for data writing

Country Status (2)

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

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 (en) * 2008-09-03 2010-03-10 京元电子股份有限公司 System and method for burning chips
CN102360569A (en) * 2011-08-24 2012-02-22 中兴通讯股份有限公司 Burning method, system and apparatus for nand flash chips

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100643287B1 (en) * 2004-11-19 2006-11-10 삼성전자주식회사 Data processing device and method for flash memory
CN101808095B (en) * 2010-03-22 2012-08-15 华中科技大学 Encryption copy organization method under distributed storage environment
CN103324503A (en) * 2013-05-29 2013-09-25 京东方科技集团股份有限公司 Data programming system and method
CN103778964B (en) * 2013-12-30 2016-08-17 上海晨思电子科技有限公司 Process, using method and the device of a kind of NAND Flash programming data, system

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 (en) * 2008-09-03 2010-03-10 京元电子股份有限公司 System and method for burning chips
CN102360569A (en) * 2011-08-24 2012-02-22 中兴通讯股份有限公司 Burning method, system and apparatus for nand flash chips

Also Published As

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

Similar Documents

Publication Publication Date Title
WO2019061613A1 (en) Loan qualification screening method, device and computer readable storage medium
WO2019061612A1 (en) Loan product promotion method and apparatus, and computer-readable storage medium
WO2018120429A1 (en) Resource update method, terminal, computer readable storage medium and resource update device
WO2017143692A1 (en) Smart television and voice control method therefor
WO2012122718A1 (en) Browser pre-fetching method and system thereof
WO2015035777A1 (en) Software upgrade method and system for mobile terminal
WO2019000801A1 (en) Data synchronization method, apparatus, and device, and computer readable storage medium
WO2017084302A1 (en) Method for playing boot video of a display terminal and display terminal
WO2017054592A1 (en) Interface display method and terminal
WO2019024219A1 (en) Automatic document generation method and apparatus, automatic document generator and medium
WO2019041851A1 (en) Home appliance after-sales consulting method, electronic device and computer-readable storage medium
WO2015103864A1 (en) Method for memory management and linux terminal
WO2017088427A1 (en) Audio output control method and device
WO2019080247A1 (en) Method, apparatus and device for generating insurance policy approval, and computer readable storage medium
WO2017036208A1 (en) Method and system for extracting information in display interface
WO2018188342A1 (en) Method, apparatus and device for generating script file, and computer-readable storage medium
WO2018166314A1 (en) Limit approval method, apparatus and device, and computer-readable storage medium
WO2018233301A1 (en) Product recommendation method, apparatus, and device, and computer readable storage medium
WO2019062199A1 (en) Method and device for recommending power consumption charging mode, and storage medium
WO2015139594A1 (en) Security verification method, apparatus, and system
WO2019165723A1 (en) Method and system for processing audio/video, and device and storage medium
WO2018201699A1 (en) Customer evaluation method, device, and apparatus, and computer readable storage medium
WO2017080195A1 (en) Audio recognition method and device
WO2019000800A1 (en) Credential preparation method, apparatus, and device and computer readable storage medium
WO2019071771A1 (en) Wireless signal fingerprint information calibration method, system, server and medium

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