Data structure, handshake method and handshake system of numbered archive

By using the data structure of numbered archives in an embedded system and using the numbered value to judge the start and end of the transmission program, the problem of inefficiency of the embedded system when processing and transmitting complex archives is solved, and simplified data transmission and higher adaptability are achieved.

CN119829564APending Publication Date: 2025-04-15GIGA BYTE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311321527.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-12
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

Embedded systems encounter difficulties in processing and transmitting huge and complex archive formats, resulting in inefficient processing and transmission.

Method used

The data structure of a numbered archive is adopted to identify the data column by presetting the starting number value and sequential number value. The data receiving device judges the start and end of the transmission program based on these values, thereby realizing simplified data transmission.

Benefits of technology

This method simplifies the data transmission process, is suitable for embedded systems, and shows better adaptability on communication interfaces with lower data transmission speeds, improving the efficiency of data processing and transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119829564A_ABST
    Figure CN119829564A_ABST
Patent Text Reader

Abstract

The invention provides a numbered archive data structure which comprises a plurality of data columns, each data column is provided with a first field and a second field, and the data columns comprise a first data column and at least one second data column. A first field of the first data column stores a preset initial number value and a second field stores a total data number value. A first field of the second data column stores a sequence number value. The numbered archive data structure requires the communication device to execute a transmission program to transmit the data column to the communication device, so that the communication device judges the start of the transmission program based on the preset start number value and judges the end of the transmission program based on the data total number value and the sequence number value. The invention also provides a numbered file handshaking method and a numbered file handshaking system which are operated based on the storage values of the first field and the second field of the data column.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a data structure, a file handshaking system and a file handshaking method, and in particular to a data structure, a handshaking system and a handshaking method for numbered files. Background Art

[0002] With the development of technology, embedded systems that combine control, computing and communication capabilities are gradually being widely used in various environments, including home, work and leisure environments. Various devices equipped with embedded systems can transmit data with applications installed on user devices to provide user device information. For example, home appliances can transmit the operating status of home appliances to the application of the user device through the embedded system installed inside so that it can be displayed on the user device.

[0003] However, in order to meet user needs, embedded systems need to store and process an increasing amount of data. However, for embedded systems, large and complex file formats are not only difficult to process but also difficult to transmit to user devices. Summary of the invention

[0004] In view of the above, the present invention provides a data structure of a numbered file, a handshaking method and a handshaking system that meet the above requirements.

[0005] According to an embodiment of the present invention, a numbered file data structure comprises: a plurality of data rows, each having a first field and a second field, and comprising: a first data row and at least one second data row. The first field of the first data row stores a preset starting number value, and the second field of the first data row stores a total number of data values. The first field of each of the at least one second data row stores a sequence number value, and the smallest of the sequence number values ​​of the at least one second data row differs from the preset starting number value by a preset difference value. The total number of data values ​​is associated with the largest of the sequence number values ​​of the at least one second data row, the preset starting number value, and the preset difference value. The numbered file data structure is requested by a communication device to execute a transmission program to transmit a plurality of data rows to the communication device, so that the communication device determines the start of the transmission program based on the preset starting number value and determines the end of the transmission program based on the total number of data values ​​and the sequence number value.

[0006] A numbered file handshaking method according to an embodiment of the present invention is executed by a data receiving device, comprising: receiving a data column of a first numbered file from a data transmitting device, the data column having a first field and a second field; executing a judgment step on the data column to determine whether a storage value of the first field is equal to a preset starting number value or a cumulative number value; when the storage value of the first field is equal to the preset starting number value, setting an end judgment value according to the storage value of the second field, adding a preset difference value to the cumulative number value and storing the data column; when the storage value of the first field is equal to the cumulative number value, storing the data column; after storing the data column, determining whether the cumulative number value is equal to the end judgment value; when the cumulative number value is not equal to the end judgment value, adding the preset difference value to the cumulative number value, receiving another data column and executing a judgment step on the other data column; and when the cumulative number value is equal to the end judgment value, storing the stored data column as a second numbered file.

[0007] According to an embodiment of the present invention, a numbered file handshake system includes: a data transmission device and a data receiving device. The data transmission device stores a first numbered file. The data receiving device is connected to the data transmission device and is used to perform: receiving a data column of the first numbered file from the data transmission device, the data column having a first field and a second field; performing a judgment step on the data column to determine whether the storage value of the first field is equal to a preset starting number value or a cumulative number value; when the storage value of the first field is equal to the preset starting number value, setting an end judgment value according to the storage value of the second field, adding a preset difference value to the cumulative number value and storing the data column; when the storage value of the first field is equal to the cumulative number value, storing the data column; after storing the data column, determining whether the cumulative number value is equal to the end judgment value; when the cumulative number value is not equal to the end judgment value, adding a preset difference value to the cumulative number value, receiving another data column and performing a judgment step on the other data column; and when the cumulative number value is equal to the end judgment value, storing the stored data column as a second numbered file.

[0008] In summary, the data structure of the numbered file according to one or more embodiments of the present invention is simple and can be more suitable for embedded systems, can meet different data requirements and is easy to track, and has scalability, which is beneficial to user development and maintenance. In addition, due to the characteristics of the numbered file, it can be more suitable for communication interfaces with lower data transmission speeds, such as serial transmission interfaces such as Bluetooth. The numbered file handshake method and system according to one or more embodiments of the present invention can simply use the storage value of a specific field of the received data to perform data transmission, providing a simple data transmission mechanism, which can be more suitable for embedded systems, and can be more suitable for communication interfaces with lower data transmission speeds such as the aforementioned.

[0009] The above description of the contents of the present disclosure and the following description of the embodiments are intended to demonstrate and explain the spirit and principle of the present invention, and to provide further explanation of the scope of the patent application of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] Figure 1 is a block diagram of a numbered file handshaking system according to an embodiment of the present invention.

[0011] Figure 2 is a flow chart of a numbered file handshaking method according to an embodiment of the present invention.

[0012] Figure 3 is a flow chart of a data repair method according to an embodiment of the present invention.

[0013] The reference numerals are described as follows:

[0014] 1: Numbered file handover system

[0015] 10: Data receiving device

[0016] 20: Data transmission device

[0017] S101, S103, S105, S107, S109, S111, S113, S115, S117, S119, S201, S203, S205, S207, S209, S211, S213: Steps DETAILED DESCRIPTION

[0018] The detailed features and advantages of the present invention are described in detail in the following embodiments, and the contents are sufficient to enable any person skilled in the relevant art to understand the technical content of the present invention and implement it accordingly, and according to the contents, claims and drawings disclosed in this specification, any person skilled in the relevant art can easily understand the relevant purposes and advantages of the present invention. The following examples further illustrate the viewpoints of the present invention in detail, but do not limit the scope of the present invention in any viewpoint.

[0019] Please refer to Figure 1 , Figure 1 FIG. 1 is a block diagram of a numbered file handshaking system according to an embodiment of the present invention. Figure 1As shown, the numbered file handshake system 1 includes a data receiving device 10 and a data transmitting device 20, and the data receiving device 10 is connected to the data transmitting device 20. Further, the data receiving device 10 can be connected to the data transmitting device 20 through wireless communication technology, wherein the wireless communication technology is particularly a serial transmission technology, such as Bluetooth. The data receiving device 10 is used to receive the numbered file data structure from the data transmitting device 20. The data receiving device 10 and the data transmitting device 20 each include one or more processors, such as a central processing unit, a graphics processor, a microcontroller, a programmable logic controller or other processors with signal processing functions. For example, the data receiving device 10 can be a user device such as a smart phone, a smart watch and a tablet computer, and the data transmitting device 20 can be an embedded system installed in an application device. The data transmitting device 20 can store the operating status of the application device in a numbered file data structure and transmit it to the data receiving device 10. Taking a coffee roaster as an example, the embedded system in the coffee roaster can store the coffee roasting status of the coffee roaster in a numbered file data structure and transmit it to the user's mobile phone for the user to view.

[0020] As shown in Table 1 below, the numbered file data structure includes a plurality of data rows, each of which has a first field and a second field. The plurality of data rows include a first data row and at least one second data row. The first field of the first data row stores a preset starting number value, and the second field of the first data row stores a total number of data values. The first field of at least one second data row stores a sequential number value, and the second field of at least one second data row can store other information. Specifically, the second field of the second data row can store a data generation time. The data generation time is used to indicate the generation time of the data corresponding to the second data row.

[0021] Table 1

[0022]

[0023] The preset starting number value is used to indicate the first column of data in the numbered file data structure. The smallest of the sequential number values ​​differs from the preset starting number value by a preset difference value. The sequential number value is used to indicate the number of the second data column, the smallest of the sequential number values ​​is used to indicate the second column of data in the numbered file data structure, and the sequential number values ​​between each two subsequent consecutive second data columns differ by a preset difference value. The total number of data value is associated with the largest of the sequential number values ​​of the second data column, the preset starting number value and the preset difference value, and is used to indicate the total number of data columns in the numbered file data structure. Specifically, the total number of data value can be obtained by dividing the difference between the largest of the sequential number values ​​of the second data column and the preset starting number value by the preset difference value and adding 1.

[0024] Taking actual numerical values ​​as an example, assuming that the preset starting number value is 0, the preset difference value is 1, and the number of data rows is 4, the numbered file data structure can be shown in Table 2 below. As shown in Table 2, the preset starting number value of the first data row is "0000", which is used to represent the first data of the numbered file data structure. The total number of data is "0400", which is used to represent that there are four data rows in the numbered file data structure. The sequential number values ​​of the three second data rows are "0100", "0200" and "0300" respectively. In particular, the first two digits of the numerical values ​​presented in Table 2 are low-order digits, and the last two digits are high-order digits, but this case does not limit the storage method of the numerical values ​​in the column. In other embodiments, the preset starting number value and the preset difference value can be set to other numerical values, which are not limited in this case.

[0025] Table 2

[0026]

[0027] The communication device requests the communication device to execute a transmission procedure to transmit the data rows to the communication device, so that the communication device can determine the start of the transmission procedure based on a preset start number value and determine the end of the transmission procedure based on a data total value and a sequence number value. The communication device can be a data receiving device 10. In other words, the data receiving device 10 can determine that the currently received data is the first data row of the numbered file data structure based on the preset start number value, and determine that the currently received data is the last second data row of the numbered file data structure based on the data total value and the sequence number value.

[0028] The above-mentioned numbered file data structure is simple and more suitable for embedded systems, and provides a complete data structure to meet different data requirements and facilitate tracking. In addition, the above-mentioned numbered file data structure is more scalable, which is conducive to user development and maintenance, and is more suitable for communication interfaces with lower data transmission speeds, such as serial transmission interfaces such as Bluetooth.

[0029] The data bit lengths of the first data row and the second data row are the same. Specifically, the data bit length of the first column of the first data row is the same as the data bit length of the first column of each second data row, and the data bit length of the second column of the first data row is the same as the data bit length of the second column of each second data row.

[0030] In one implementation, each data row may further have a third field for storing data content, and the data generation time of the second field of the second data row is the generation time of the data content. The data content may be various data generated by the embedded system during operation.

[0031] In another embodiment, each data row may further have the third field and a fourth field storing a check code. Each check code is generated by performing a logical exclusive OR (XOR) operation using the stored values ​​of the first field, the second field, and the third field, and may be generated by performing a logical exclusive OR operation using the stored values ​​of the first field, the second field, and the third field in sequence. Accordingly, the data receiving device 10 may determine whether the received data row is correct based on the check code.

[0032] Please refer to Table 3, which exemplarily presents a numbered file data structure including the first to fourth columns mentioned above, wherein the preset starting number value and the total number of data of the first data column and the sequential number value of the second data column are the same as those of Table 2, and are not described in detail here. As shown in Table 3, the data generation time of the second data column is "0000", "0100" and "0200", respectively, representing the data generation time of the second data content to the fourth data content. The first check code is generated by sequentially performing a logical exclusive or operation on the preset starting number value "0000", the total number of data value "0400" and the first data content, and the same applies to the second check code to the fourth check code. In this example, the preset time difference value is "0100", but the present invention is not limited thereto.

[0033] Table 3

[0034]

[0035] Taking a coffee bean roaster as an example, the first data content may include one or more of the air outlet temperature, roasting power, wind speed, drum speed, bean weight, weight loss, preheating power, preheating wind speed, preheating drum, preheating temperature, total roasting time, index and roasting mode of the coffee bean roaster, and may further retain one or more blank third columns without stored values, wherein the above-mentioned preheating refers to various parameters of the coffee bean roaster when it is turned on and preheated before the beans are put in, and the second data content may include the coffee bean temperature, humidity, furnace temperature, interlayer temperature, air outlet temperature, profile coffee bean temperature, air pressure, power, wind speed, event, rate of rise (ROR) curve and other operating status information corresponding to the time point of the second column, and may further retain one or more blank third columns without stored values. The coffee bean temperature is the instantaneous temperature when roasting the beans, and the profile coffee bean temperature refers to the bean temperature value referenced by the coffee bean roaster when roasting the beans automatically. In other words, the coffee bean roaster automatically roasts coffee beans according to the set bean temperature value, and the instantaneous temperature of the coffee beans can be used as the second data content. Further, taking a coffee bean roaster with a user interface (such as a touch screen) as an example, the data transmission device 20 can present the instantaneous coffee bean temperature, humidity, furnace temperature, interlayer temperature, air outlet temperature, set coffee bean temperature, air pressure, firepower, wind power, events, and temperature rise rate curve of the coffee bean roaster through the user interface. The user can input the coffee bean roasting stage (such as first crack, second crack, etc.) corresponding to a specific time through the user interface. The data transmission device 20 can store the coffee bean temperature, humidity, furnace temperature, interlayer temperature, air outlet temperature, set coffee bean temperature, air pressure, firepower, wind power, events, temperature rise rate curve and user input information in the third field. Accordingly, the data receiving device 10 can obtain the above data from the data transmission device 20 and generate a chart of each stage of the coffee bean roasting based on the above data and the corresponding data generation time, and present it to the user.

[0036] The numbered file data structure may further include a header field for the data receiving device 10 and the data transmitting device 20 to find the starting point of each data row, and the data bit length of the stored value of each header field is the same. It should be noted that Table 2 shows four fields as an example, but the numbered file data structure may include more fields, for example, there may be a header field before the first field of the data row shown in Table 2, and the present invention is not limited thereto.

[0037] In particular, the numbered file data structure described in the above embodiment can be stored in an appropriate non-transitory computer-readable medium, such as a DVD, CD-ROM, flash drive, hard disk, or a network server that can be accessed through a network (e.g., the Internet, or other appropriate media). In one embodiment, the non-transitory computer-readable medium stores the numbered file data structure and a computer program of the above embodiment. When the computer program is executed by a processor (e.g., a processor of the data transmission device 20), it reads the numbered file data structure and outputs a data column with a specified number value in the numbered file data structure according to an instruction containing a specified number value (e.g., the accumulated number value inside the data receiving device 10).

[0038] Please refer to Figure 1 and Figure 2 ,in Figure 2 is a flow chart of a numbered file handshaking method according to an embodiment of the present invention. Figure 2 The numbered file handshake method shown is executed by a data receiving device 10, and includes: step S101: receiving a data column of a first numbered file from a data transmitting device, the data column having a first field and a second field; step S103: determining whether the storage value of the first field of the data column is equal to a preset starting number value or a cumulative number value; if the determination result of step S103 is the preset starting number value, executing step S105: setting an end determination value according to the storage value of the second field, and adding a preset difference value to the cumulative number value; step S107: storing the data column; if the determination result of step S103 is the cumulative number value, executing step S107; step S109: determining whether the cumulative number value is equal to the end determination value; if step S108 is equal to the end determination value, executing step S109; If the result of judgment of step S109 is "no", execute step S111: add the preset difference to the accumulated number value, receive another data row and execute step S103 for the other data row; if the result of judgment of step S109 is "yes", execute step S113: store the stored data row as a second numbering file; if the result of judgment of step S103 is a non-preset starting number value and a non-cumulative number value, execute step S115: send an interrupt command to the data transmission device; step S117: when receiving a confirmation signal in response to the interrupt command, output the accumulated number value to the data transmission device; and step S119: receive the corresponding data row of the accumulated number value from the data transmission device, and execute step S103 for the corresponding data row. The execution order of steps S105 and S107 is not affected by Figure 2 The order restriction shown is that steps S115, S117 and S119 are selectively executed steps. In one embodiment, when the determination result of step S103 is not a preset starting number value and not a cumulative number value, the data receiving device 10 can end the transmission process.

[0039] It should be noted that before executing step S101, the data receiving device 10 may initialize the cumulative number value and the end judgment value, for example, the cumulative number value is set to a preset starting number value, and the end judgment value is reset to zero. The data receiving device 10 then transmits the current cumulative number value to the data transmitting device 20 to inform the data transmitting device 20 which data column should be transmitted. After transmitting the cumulative number value to the data transmitting device 20, the data receiving device 10 starts to wait for the data column from the data transmitting device 20. If the data receiving device 10 receives the data column within a preset time (for example, 1 second), step S101 may be executed; if the data receiving device 10 has not received the data column within the preset time, the number of no data may be counted, and it may be determined whether the number of no data is greater than a preset number (for example, 5 times). If the number of no data is not greater than the preset number, the data receiving device 10 transmits the cumulative number value to the data transmitting device 20 again; if the number of no data is greater than the preset number, the data receiving device 10 may end the transmission procedure.

[0040] In step S101 , the data receiving device 10 receives a data row of a first numbering file from the data transmitting device 20 , wherein the data row has a first field and a second field, and the first field and the second field each have a stored value.

[0041] In step S103, the data receiving device 10 performs a determination step on the data column to determine whether the storage value of the first field is equal to a preset starting number value or a cumulative number value. The preset starting number value indicates that the data column is the first data of the first numbering file, and the cumulative number value indicates that the data column is another data of the first numbering file. In addition, in step S103, the data receiving device 10 can further perform a logical exclusive OR operation on the storage value of each field in the data column except the fourth field in sequence to obtain a verification code, and then compare the verification code with the storage value (check code) of the fourth field to verify the correctness of the data. If the two are equal, the data receiving device 10 then performs subsequent steps; if the two are not equal, the data receiving device 10 can regard the data column as an invalid data column and discard the data column.

[0042] If the data receiving device 10 determines that the storage value of the first column is equal to the preset starting number value, the data receiving device 10 executes steps S105 and S107 to set the end judgment value according to the storage value of the second column, add the preset difference value to the cumulative number value, and store the data column. Specifically, if the storage value of the first column is equal to the preset starting number value, it means that the data column is the first data column of the aforementioned numbered file data structure. Therefore, the data receiving device 10 sets the storage value of the second column of the data column (i.e., the total number of data) as the end judgment value, wherein the end judgment value is used to subsequently determine whether the received data column is the last data column. In step S105, the data receiving device 10 further adds the preset difference value to the cumulative number value, wherein the preset difference value is the same as the preset difference value of the sequence number value of the aforementioned numbered file data structure.

[0043] In step S109, the data receiving device 10 determines whether the cumulative number value updated in step S105 is equal to the end judgment value to determine whether the data row is the last data row. If the data receiving device 10 determines that the cumulative number value is not equal to the end judgment value, the data receiving device 10 executes step S111 to receive another data row from the data transmitting device 20, and executes step S103 on the other data row, that is, executes the judgment step on the other data row. If the data receiving device 10 determines that the cumulative number value is equal to the end judgment value, indicating that the data row is the last data row, the data receiving device 10 executes step S113 to store the stored data row as a second numbered file, wherein the number of stored data rows can be one or more.

[0044] The format of the second numbered file can be the same as the format of the first numbered file, and can be the same as the data structure of the numbered file mentioned above. In addition, after generating the second numbered file, the data receiving device 10 can further output the second numbered file to another communication device. In other words, the data receiving device 10 can be used as another data transmission device.

[0045] Returning to step S103 , if the data receiving device 10 determines that the storage value of the first field is not equal to the preset starting number value and the cumulative number value, then in step S115 , the data receiving device 10 executes a notification step to transmit an interruption command to the data transmitting device 20 .

[0046] In step S117, upon receiving an acknowledgment signal (ACK) in response to the interrupt command, the data receiving device 10 outputs the accumulated number value to the data transmitting device 20. Accordingly, the data transmitting device 20 can determine which data row to continue transmitting according to the accumulated number value.

[0047] In step S119, the data receiving device 10 receives the corresponding data row from the data transmitting device 20, wherein the storage value of the first field of the corresponding data row is equal to the cumulative number value. In addition, the data receiving device 10 performs step S103 on the corresponding data row, ie, performs a determination step on the corresponding data row.

[0048] In one embodiment, after step S115, the data receiving device 10 can determine whether a confirmation signal is received within a preset time period, wherein the preset time period can be 1 second, and the present invention is not limited thereto. If the data receiving device 10 receives a confirmation signal within the preset time period, step S117 is executed; otherwise, the data receiving device 10 counts the number of no responses.

[0049] Next, the data receiving device 10 determines whether the number of no responses is not greater than a preset number, wherein the preset number may be 5 times, and the present invention is not limited thereto. If the data receiving device 10 determines that the number of no responses is not greater than the preset number, step S115, i.e., the notification step, is executed again; otherwise, it indicates that there may be a problem with the connection between the data receiving device 10 and the data transmitting device 20, and the data receiving device 10 ends the transmission process.

[0050] Please refer to Figure 1 and Figure 3 ,in Figure 3 is a flow chart of a data repair method according to an embodiment of the present invention, which can be used to check whether there is any data row lost. Figure 3 In the embodiment of the present invention, the second numbered file includes a plurality of stored data rows. Figure 3 The data repair method shown is executed by the data receiving device 10 after storing the second numbered file, and can also be executed by the user triggering the data receiving device 10, and includes: step S201: selecting a target data row from a plurality of stored data rows according to the order; step S203: determining whether the stored value of the second field of the target data row matches the accumulated time value; if the determination result of step S203 is "no", executing step S205: generating a repair data row according to at least one adjacent data row of the target data row in the plurality of stored data rows, and using the repair data row to update the plurality of stored data rows row; step S207: adding another preset difference to the accumulated time value; and if the judgment result of step S203 is "yes", executing step S207; step S209: adding the preset difference to the accumulated number value; step S211: judging whether the accumulated number value is greater than the storage value of the second column of the first row of the plurality of stored data rows; if the judgment result of step S211 is "no", executing step S201; and if the judgment result of step S211 is "yes", executing step S213: adding the storage value of the second column of the first row to the number of generated repair data rows. The execution order of steps S205 and S207 is not affected by Figure 2 The order shown is restricted.

[0051] In step S201, the data receiving device 10 sequentially uses the second row of the plurality of stored data rows as the target data row to perform multiple repair procedures, wherein the repair procedures include steps S203, S205, and S207. When selecting the target data row, the data receiving device 10 may first set the cumulative number value to be the sum of the preset starting number value and the preset difference value to initialize the cumulative number value, and then select the stored data row whose storage value of the first field is equal to the cumulative number value from the plurality of stored data rows as the target data row. For example, if the preset starting number value is "0000" and the first preset difference value is "0100", the cumulative number value is "0100". In other words, the data receiving device 10 selects data rows other than the first row from the stored data rows as the target data row.

[0052] In step S203, the data receiving device 10 determines whether the stored value of the second column of the target data sequence matches the accumulated time value. The accumulated time value indicates the data generation time of the latest one of the received stored data sequences plus another preset difference value, wherein the other preset difference value can be the same as or different from the preset difference value of the sequence number value of the aforementioned numbered file data structure. In other words, the accumulated time value indicates the expected data generation time of the target data sequence.

[0053] If the storage value of the second column of the target data column does not match the cumulative time value, it means that the data column whose data generation time is the cumulative time value may be lost. Therefore, the data receiving device 10 executes step S205 to generate a repair data column according to the adjacent data column of the target data column, and use the repair data column to update the stored data column. The adjacent data column can be the previous data column and / or the next data column of the target data column. The data receiving device 10 can use the adjacent data column to generate the repair data column, and shift the storage value (i.e., the sequence number value) of the first column of the stored data column sorted after the target data column.

[0054] In step S207, the data receiving device 10 adds another preset difference to the accumulated time value to update the accumulated time value. If the storage value of the second column of the target data row matches the accumulated time value, it means that no data is lost. Therefore, the data receiving device 10 can execute step S207.

[0055] In step S209, the data receiving device 10 adds the preset difference to the accumulated number value, and the accumulated number value plus the preset difference value indicates the sequential number value of the target data row. In other words, after each execution of the repair process, the data receiving device 10 adds the preset difference to the accumulated number value.

[0056] In step S211, the data receiving device 10 determines whether the cumulative number value updated in step S209 is greater than the total number of data in the first stored data row. If the determination result of step S211 is "no", it means that the data receiving device 10 has not yet executed the repair procedure for all stored data rows. Therefore, the data receiving device 10 executes step S201 again.

[0057] If the result of the determination in step S211 is "yes", it means that the data receiving device 10 has executed the repairing procedure on all the stored data rows. Therefore, in step S213, the data receiving device 10 adds the storage value of the second column of the first row of the stored data rows to the number of the repaired data rows, that is, the total number of data is added to the number of the repaired data rows. The data receiving device 10 may execute step S213 after executing the repairing procedure on all the stored data rows.

[0058] Through the above data recovery method, even if data is lost, the integrity of the data can still be ensured.

[0059] It should be further explained that each stored data row further has a third field of the numbered file data structure as described above, for storing data content; and in step S205, the data receiving device 10 executes a method for generating a repair data row according to adjacent data rows of the target data row, which may include copying the adjacent data row or performing slope calculation on the adjacent data row to generate the repair data row.

[0060] In one embodiment, the data receiving device 10 adds the storage value of the first field of the previous data row of the target data row to a preset difference value (hereinafter referred to as the "first preset difference value") to generate the storage value of the first field of the repair data row, adds the storage value of the second field of the previous data row to another preset difference value (hereinafter referred to as the "second preset difference value") to generate the storage value of the second field of the repair data row, and uses the data content of the third field of the previous data row as the data content of the third field of the repair data row. In other words, the data receiving device 10 adds the sequence number value of the previous data row to the first preset difference value as the sequence number value of the repair data row, adds the data generation time of the previous data row to the second preset difference value to generate the data generation time of the repair data row, and uses the data content of the previous data row as the data content of the repair data row.

[0061] In another embodiment, the data receiving device 10 generates the storage value of the first column and the storage value of the second column of the repair data column in the same manner, and performs a slope operation on the data content of the third column of the previous data column and the data content of the third column of the next data column to obtain the data content of the third column of the repair data column. The slope operation may be an interpolation method.

[0062] In summary, the numbered file data structure according to one or more embodiments of the present invention is simple and can be more suitable for embedded systems. It provides a complete data structure that can meet different data requirements and is easy to track. It is also extensible and is conducive to user development and maintenance. In addition, due to the characteristics of the numbered structure, it can be more suitable for communication interfaces with lower data transmission speeds, such as serial transmission interfaces such as Bluetooth. In addition, by adding a field for storing a check code to the numbered file data structure, the data receiving end can determine whether the received data column is correct based on the check code. According to the numbered file handshake method and system of one or more embodiments of the present invention, data can be transmitted simply by using the stored value of a specific field of the received data, providing a simple data transmission mechanism, which can be more suitable for embedded systems and can be more suitable for communication interfaces with lower data transmission speeds such as the aforementioned. In addition, through the above-mentioned data repair method, even if data is lost, the integrity of the data can still be ensured.

[0063] Although the present invention is disclosed in the above embodiments, it is not intended to limit the present invention. Without departing from the spirit and scope of the present invention, all changes and modifications are within the scope of patent protection of the present invention. Please refer to the attached claims for the scope of protection defined by the present invention.

Claims

1. A numbered file data structure, characterized in that: Include: A plurality of data rows each having a first field and a second field, and comprising: a first data row, wherein the first column of the first data row stores a preset starting number value, and the second column of the first data row stores a total number of data values; and At least one second data row, the first column of each of which stores a sequence number value, and the smallest of the sequence number values ​​of the at least one second data row differs from the preset starting number value by a preset difference value; The total number of data is associated with the maximum of the sequence number values ​​of the at least one second data row, the preset starting number and the preset difference. The numbered file data structure is requested by a communication device to execute a transmission program to transmit the multiple data rows to the communication device, so that the communication device can determine the start of the transmission program based on the preset starting number, and determine the end of the transmission program based on the total number of data and the sequence number.

2. The numbered file data structure according to claim 1, wherein: The total number of data is obtained by dividing the difference between the largest of the sequence number values ​​of the at least one second data column and the preset starting number value by the preset difference plus 1.

3. The numbered file data structure according to claim 1, wherein: The data bit lengths of the plurality of data rows are the same as each other.

4. The numbered file data structure according to claim 1, wherein: Each of the plurality of data rows further has a third field for storing a data content, and the second field of each of the at least one second data row stores a data generation time of the data content.

5. The numbered file data structure according to claim 1, wherein: Each of the plurality of data rows further comprises a third field and a fourth field, the third field storing a data content, the fourth field storing a check code, and for each of the plurality of data rows, the check code is generated by performing a logical exclusive OR operation using the stored values ​​of the first field, the second field and the third field.

6. A numbered file handshaking method, executed by a data receiving device, characterized in that: Include: Receiving a data row of a first numbering file from a data transmission device, the data row having a first field and a second field; Performing a determination step on the data row to determine whether the storage value of the first column is equal to a preset starting number value or a cumulative number value; When the storage value of the first column is equal to the preset start number value, an end judgment value is set according to the storage value of the second column, a preset difference value is added to the accumulated number value, and the data row is stored; When the stored value of the first column is equal to the accumulated serial number value, storing the data row; After storing the data column, determining whether the accumulated serial number value is equal to the end determination value; When the accumulated serial number value is not equal to the end judgment value, adding the preset difference value to the accumulated serial number value, receiving another data row and performing the judgment step on the other data row; as well as When the accumulated serial number value is equal to the end judgment value, the stored data row is stored as a second serial number file.

7. The numbered file handshaking method according to claim 6, wherein: Also includes: When the storage value of the first field is not equal to the preset starting number value and the cumulative number value, executing a notification step to transmit an interrupt command to the data transmission device; as well as When receiving a confirmation signal in response to the interrupt command, outputting the accumulated serial number value to the data transmission device; as well as A corresponding data row of the accumulated serial number is received from the data transmission device and the determination step is performed on the corresponding data row.

8. The numbered file handshaking method according to claim 7, wherein: After transmitting the interrupt command to the data transmission device, the method further comprises: When the confirmation signal is not received within a preset time period, counting a number of no response times; and When the number of no responses is not greater than a preset number, the notification step is performed again.

9. The numbered file handshaking method according to claim 6, wherein: The second numbering file includes a plurality of stored data rows. After storing the second numbering file, the method further includes: A plurality of repair procedures are performed sequentially starting from the second row of the plurality of stored data rows as a target data row, the repair procedure comprising: Determining whether the stored value of the second column of the target data row matches a cumulative time value; When the stored value of the second column of the target data row does not match the accumulated time value, a repair data row is generated according to at least one adjacent data row of the target data row in the plurality of stored data rows, the plurality of stored data rows are updated with the repair data row, and another predetermined difference value is added to the accumulated time value; as well as When the storage value of the second column of the target data row matches the accumulated time difference, the accumulated time value is added to the other preset difference value.

10. The numbered file handshaking method according to claim 9, wherein: Starting from the second column of the plurality of stored data columns, the target data columns are sequentially comprised of: Set the cumulative number value to the sum of the preset starting number value and the preset difference value; as well as Selecting a stored data row whose stored value of the first column is equal to the accumulated serial number from the plurality of stored data rows as the target data row; The method further includes: After each execution of the repair program, the accumulated serial number value is added to the preset difference value; as well as When the accumulated serial number is greater than the stored value of the second column of the first column among the plurality of stored data columns, the stored value of the second column of the first column is added to the number of the generated repair data columns.

11. The numbered file handshaking method according to claim 9, wherein: The at least one adjacent data row includes a previous data row, each of the plurality of stored data rows further includes a third field, the third field stores a data content, and generating the repair data row according to the at least one adjacent data row of the target data row in the plurality of stored data rows includes: Adding the stored value of the first column of the previous data column and the preset difference value to generate a stored value of the first column of the repair data column; Adding the stored value of the second column of the previous data column and the other predetermined difference value to generate a stored value of a second column of the repair data column; as well as The data content of the third field of the previous data row is used as the data content of a third field of the repair data row.

12. The numbered file handshaking method according to claim 9, wherein: The at least one adjacent data row includes a previous data row and a next data row. Each of the plurality of stored data rows further includes a third field, and the third field stores a data content. Generating the repair data row according to the at least one adjacent data row of the target data row in the plurality of stored data rows includes: Adding the stored value of the first column of the previous data column and the preset difference value to generate a stored value of the first column of the repair data column; Adding the stored value of the second column of the previous data column and the other predetermined difference value to generate a stored value of a second column of the repair data column; as well as A slope calculation is performed on the data content of the third column of the previous data column and the data content of the third column of the next data column to obtain data content of a third column of the repair data column.

13. A numbered file handshake system, characterized in that: The invention comprises the data transmitting device and the data receiving device for executing the numbered file handshaking method according to any one of claims 6 to 12, wherein the data receiving device is connected to the data transmitting device, and the data transmitting device is used to store the first numbered file.