A high-efficiency retransmission method and device for low-frequency acquisition of instrument operation data

Through the circular linked list storage structure and specific storage and retransmission operations, the problem of insufficient storage space during the data retransmission of the instrument is solved, efficient storage and retransmission of data is realized, and the data is effectively stored and retransmitted within the system set time is ensured. transmission.

CN113472486BActive Publication Date: 2024-11-12SICHUAN PROVINCIAL ANALYSIS & TESTING SERVICE CENT
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110736860.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-30
Publication Date
2024-11-12
Estimated Expiration
2041-06-30

AI Technical Summary

Technical Problem

In the prior art, the storage space occupies a large amount of storage space during the retransmission of instrument operation data, and cannot effectively support the retransmission of data.

Method used

Using a circular linked list storage structure, data collection and storage are completed through the device side, data reporting is carried out using the sendcoapData function, and corresponding processing is carried out when successful or failed, including storage and retransmission operations, and storage package number and loop are managed using the STMFLASH_Read and STMFLASH_Write functions. flags to realize efficient storage and retransmission of data.

Benefits of technology

Within the effective storage time set by the system, the effective storage and retransmission of data is achieved through the smallest storage space, which solves the problem that the storage space cannot support data retransmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113472486B_ABST
    Figure CN113472486B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of data transmission, and specifically to a method and device for efficiently retransmitting instrument operation data acquired at a low frequency. The method comprises the following steps: completing storage data acquisition and judging whether normal reporting is successful; if normal reporting fails, starting data storage; if normal reporting is successful, starting data retransmission. The present invention also proposes a device for the method for efficiently retransmitting instrument operation data acquired at a low frequency as described above, comprising a request receiving module, a memory, a time detection module, a processor and a data sending module, and setting an upper limit storage data packet upper limit value according to the amount of data within the effective storage time set by the system, thereby solving the problem in the prior art that the storage space cannot support data retransmission.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data transmission, and in particular to a high-efficiency retransmission method and device for low-frequency acquisition of instrument operation data. Background Art

[0002] After the equipment completes the collection of operating data, the data is often transmitted immediately. However, sometimes due to problems with the transmission channel, the data cannot be uploaded in time. Therefore, the existing technology uses retransmission to transmit the data again.

[0003] However, in the prior art, during the retransmission process, there is a problem that the storage space of the stored data occupies a large amount, resulting in that the storage space of the data cannot support the retransmission of the data. Summary of the invention

[0004] The purpose of the present invention is to provide a method and device for efficiently retransmitting instrument operation data collected at a low frequency, so as to solve the problem in the prior art that the storage space cannot support data retransmission.

[0005] To achieve the above object, the present invention provides an efficient retransmission method for low-frequency acquisition of instrument operation data, and the efficient retransmission method for low-frequency acquisition of instrument operation data comprises the following steps:

[0006] Use the device to complete storage data collection, call the sendcoapData (storage data) function to report normal data, and determine whether the normal reporting is successful;

[0007] If normal reporting fails, data storage is started;

[0008] If the report is successful, data retransmission will be started.

[0009] The step of judging whether the reporting is successful includes the following steps:

[0010] If the network receives an ACK feedback message indicating successful reporting, the reporting is successful.

[0011] If no ACK feedback reporting success message is received from the network, the normal reporting fails.

[0012] The data storage comprises the following steps:

[0013] If the storage flag is 0, there is no data to be retransmitted in the storage area, the storage package number is assigned 1, and the loop flag is set to 0;

[0014] If the storage flag is 1, the STMFLASH_Read (storage package number, loop flag) function is called to read the storage package number and the loop flag, and the storage package number is incremented by 1 and the first preprocessing is performed to obtain the storage package self-increment number;

[0015] Then call the STMFLASH_Write (storage package self-increment number, loop flag) function to store the current data packet number and loop flag, and call the STMFLASH_Write (storage data, storage package self-increment number) function to store the current data packet to the corresponding storage area of ​​the flash.

[0016] Wherein, the first preprocessing comprises the following steps:

[0017] When the storage package number is added to the upper limit of the storage data packet number set by the system, the storage package number is set to 0 and the loop flag is set to 1.

[0018] The data retransmission comprises the following steps:

[0019] If the storage flag is judged to be 1, there is data to be retransmitted, call STMFLASH_Read (storage package number, loop flag) function to read the storage package number and loop flag, call STMFLASH_Read (storage data, storage package number) to read the storage data of the storage package number;

[0020] Determine the timeliness field in the stored data. If it is within the retransmission timeliness range set by the system and the storage package number is not 0, call the sendcoapData (storage data) function to enter the data reporting. If not, perform the second preprocessing.

[0021] If a normal feedback message is received from the network after the data is reported, the retransmission is successful, the storage package number is decremented by 1, and the third preprocessing is performed to obtain the storage package self-decrement number, and the next data retransmission is performed until the storage package self-decrement number and the loop flag are both 0, and the storage flag is set to 0, and the data retransmission ends;

[0022] If no normal feedback message is received from the network, the retransmission fails, and the STMFLASH_Write (storage package number, loop flag) function is called to store the current storage package self-decrementing number and loop flag, and the device stops the data retransmission service.

[0023] The present invention also discloses a device for an efficient retransmission method for low-frequency acquisition of instrument operation data as described above, comprising a request receiving module, a memory, a timeliness detection module, a processor and a data sending module, wherein the request receiving module is configured to receive normal feedback messages from the network end, the memory is configured to store processor executable instructions, the timeliness detection module is configured to detect the timeliness field in the stored data and compare it with the retransmission timeliness range set by the system, the processor is configured to execute the efficient retransmission method for low-frequency acquisition of instrument operation data, and the data sending module is configured to cooperate with the processor to realize the retransmission of data.

[0024] The present invention discloses an efficient retransmission method and device for low-frequency acquisition of instrument operation data. The method sets an upper limit value of the upper limit storage data packet according to the amount of data within the effective storage time set by the system, and adopts a circular linked list storage structure to achieve storage of effective data with the minimum storage space, thereby solving the problem in the prior art that the storage space cannot support data retransmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0026] Figure 1 It is a flow chart of an efficient retransmission method for low-frequency acquisition of instrument operation data provided by the present invention, and the dotted line part in the figure is an abbreviated flow chart of data storage.

[0027] Figure 2 The invention provides a detailed data storage flow diagram of an efficient retransmission method for low-frequency acquisition of instrument operation data.

[0028] Figure 3 It is a schematic diagram of the steps of an efficient retransmission method for low-frequency acquisition of instrument operation data provided by the present invention.

[0029] Figure 4 It is a schematic diagram of the steps of judging whether normal reporting is successful in an efficient retransmission method for low-frequency acquisition of instrument operation data provided by the present invention.

[0030] Figure 5 It is a schematic diagram of the steps of data storage of a method for efficiently retransmitting instrument operation data at a low frequency acquisition provided by the present invention.

[0031] Figure 6 It is a schematic diagram of the first preprocessing steps of a method for efficiently retransmitting instrument operation data at a low frequency acquisition provided by the present invention.

[0032] Figure 7 It is a schematic diagram of the steps of data retransmission of an efficient retransmission method for low-frequency acquisition of instrument operation data provided by the present invention.

[0033] Figure 8 It is a schematic diagram of the third preprocessing step of a method for efficiently retransmitting instrument operation data at a low frequency acquisition provided by the present invention.

[0034] Fig. 9It is a schematic diagram of the second preprocessing steps of a method for efficiently retransmitting low-frequency acquisition of instrument operation data provided by the present invention.

[0035] Fig.10 The present invention is a schematic diagram of the structure of a device for a high-efficiency retransmission method for low-frequency acquisition of instrument operation data provided by the present invention.

[0036] 10 - processor, 20 - memory, 30 - timeliness detection module, 40 - request receiving module, 50 - data sending module. DETAILED DESCRIPTION

[0037] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.

[0038] In the description of the present invention, it should be understood that the terms "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, in the description of the present invention, "multiple" means two or more, unless otherwise clearly and specifically defined.

[0039] See also Figures 1 to 10 The present invention provides an efficient retransmission method for low-frequency acquisition of instrument operation data, and the efficient retransmission method for low-frequency acquisition of instrument operation data comprises the following steps:

[0040] S101: Use the device end to complete storage data collection, call the sendcoapData (storage data) function to report normal data, and determine whether the normal reporting is successful;

[0041] S102: If normal reporting fails, data storage is started;

[0042] S103: If the reporting is successful, data retransmission is started.

[0043] Attached Figure 1 The dotted line portion is a schematic diagram of the abbreviated data storage process.

[0044] Further, the determining whether the normal reporting is successful comprises the following steps:

[0045] S201: If the network end ACK feedback reporting success message is received, the normal reporting is successful;

[0046] S202: If no ACK feedback reporting success message is received from the network, normal reporting fails.

[0047] Furthermore, the data storage comprises the following steps:

[0048] S301: If the storage flag is 0, then there is no data to be retransmitted in the storage area, the storage package number is assigned a value of 1, and the loop flag is set to 0;

[0049] S302: if the storage flag is 1, the STMFLASH_Read (storage package number, loop flag) function is called to read the storage package number and the loop flag, and the storage package number is incremented by 1 and a first preprocessing is performed to obtain the storage package incremented number;

[0050] S303: Call the STMFLASH_Write (storage package self-increment number, loop flag) function to store the current data packet number and loop flag, and call the STMFLASH_Write (storage data, storage package self-increment number) function to store the current data packet to the corresponding storage area of ​​the flash.

[0051] Furthermore, the first preprocessing comprises the following steps:

[0052] S401: When the storage package number is added to the upper limit of the storage data package number set by the system, the storage package number is set to 0 and the loop flag is set to 1.

[0053] Furthermore, the data retransmission comprises the following steps:

[0054] S501: If the storage flag is judged to be 1, there is data to be retransmitted, call STMFLASH_Read (storage package number, loop flag) function to read the storage package number and loop flag, call STMFLASH_Read (storage data, storage package number) to read the storage data of the storage package number;

[0055] S502: Determine the timeliness field in the stored data. If it is within the retransmission timeliness range set by the system and the storage package number is not 0, call the sendcoapData (storage data) function to enter data reporting. If not, perform the second preprocessing.

[0056] S503: If a normal feedback message is received from the network after the data is reported, the retransmission is successful, the storage package number is decremented by 1, and the third preprocessing is performed to obtain the storage package self-decrementing number, and the next data retransmission is performed until the storage package self-decrementing number and the loop flag are both 0, and the storage flag is set to 0, and the data retransmission ends;

[0057] S504: If no normal feedback message is received from the network, the retransmission fails, and the STMFLASH_Write (storage package number, loop flag) function is called to store the current storage package self-decrementing number and loop flag, and the device stops the data retransmission service.

[0058] The present invention also discloses a device for an efficient retransmission method for low-frequency acquisition of instrument operation data as described above, comprising a request receiving module 40, a memory 20, a timeliness detection module 30, a processor 10 and a data sending module 50, wherein the request receiving module 40 is configured to receive normal feedback messages from the network end, the memory 20 is configured to store executable instructions of the processor 10, the timeliness detection module 30 is configured to detect the timeliness field in the stored data and compare it with the retransmission timeliness range set by the system, the processor 10 is configured to execute the efficient retransmission method for low-frequency acquisition of instrument operation data, and the data sending module 50 is configured to cooperate with the processor 10 to realize the retransmission of data.

[0059] Furthermore, the third preprocessing comprises the following steps:

[0060] S601: When the storage package number is reduced to a value of 0, if the loop flag is 1, the storage package number is assigned to the upper limit of the storage data packet number set by the system, and the loop flag is set to 0.

[0061] Furthermore, the second preprocessing comprises the following steps:

[0062] S701: If it is not within the retransmission time limit set by the system, the stored data, the loop flag and the storage flag are set to 0, and the data retransmission is terminated.

[0063] What is disclosed above is only a preferred embodiment of the present invention, and it certainly cannot be used to limit the scope of rights of the present invention. Ordinary technicians in this field can understand that all or part of the processes of the above embodiment and equivalent changes made according to the claims of the present invention still fall within the scope of the invention.

Claims

1. An efficient retransmission method for low-frequency acquisition of instrument operation data, It is characterized in that The method for efficiently retransmitting low-frequency acquisition of instrument operation data comprises the following steps: Use the device to complete storage data collection, call the sendcoapData (storage data) function to report normal data, and determine whether the normal reporting is successful; If normal reporting fails, data storage is started; If the report is successful, data retransmission will be started; The data retransmission comprises the following steps: If the storage flag is judged to be 1, there is data to be retransmitted, call STMFLASH_Read (storage package number, loop flag) function to read the storage package number and loop flag, call STMFLASH_Read (storage data, storage package number) to read the storage data of the storage package number; Determine the timeliness field in the stored data. If it is within the retransmission timeliness range set by the system and the storage package number is not 0, call the sendcoapData (storage data) function to enter the data reporting. If not, perform the second preprocessing. If a normal feedback message is received from the network after the data is reported, the retransmission is successful, the storage package number is decremented by 1, and the third preprocessing is performed to obtain the storage package self-decrement number, and the next data retransmission is performed until the storage package self-decrement number and the loop flag are both 0, and the storage flag is set to 0, and the data retransmission ends; If no normal feedback message is received from the network, the retransmission fails, and the STMFLASH_Write (storage package number, loop flag) function is called to store the current storage package self-decrementing number and loop flag, and the device stops the data retransmission service; The third preprocessing comprises the following steps: When the storage package number is reduced to 0, if the loop flag is 1, the storage package number is assigned to the upper limit of the storage data package number set by the system, and the loop flag is set to 0; The second preprocessing comprises the following steps: If it is not within the retransmission time limit set by the system, the stored data, loop flag and storage flag are set to 0, and data retransmission ends.

2. The method for efficiently retransmitting low-frequency acquisition of instrument operation data as claimed in claim 1, It is characterized in that The determination of whether the normal reporting is successful comprises the following steps: If the network receives an ACK feedback message indicating successful reporting, the reporting is successful. If no ACK feedback reporting success message is received from the network, the normal reporting fails.

3. The method for efficiently retransmitting low-frequency acquisition of instrument operation data as claimed in claim 2, It is characterized in that The data storage comprises the following steps: If the storage flag is 0, there is no data to be retransmitted in the storage area, the storage package number is assigned 1, and the loop flag is set to 0; If the storage flag is 1, the STMFLASH_Read (storage package number, loop flag) function is called to read the storage package number and the loop flag, and the storage package number is incremented by 1 and the first preprocessing is performed to obtain the storage package self-increment number; Then call the STMFLASH_Write (storage package self-increment number, loop flag) function to store the current data packet number and loop flag, and call the STMFLASH_Write (storage data, storage package self-increment number) function to store the current data packet to the corresponding storage area of ​​the flash.

4. The method for efficiently retransmitting low-frequency acquisition of instrument operation data as claimed in claim 3, It is characterized in that The first preprocessing comprises the following steps: When the storage package number is added to the upper limit of the storage data packet number set by the system, the storage package number is set to 0 and the loop flag is set to 1.

5. A device using the method for efficiently retransmitting low-frequency acquisition of instrument operation data as claimed in claim 1, It is characterized in that It includes a request receiving module, a memory, a timeliness detection module, a processor and a data sending module. The request receiving module is configured to receive normal feedback messages from the network end, the memory is configured to store processor executable instructions, the timeliness detection module is configured to detect the timeliness field in the stored data and compare it with the retransmission timeliness range set by the system, the processor is configured to execute an efficient retransmission method for low-frequency acquisition of the instrument operation data, and the data sending module is configured to cooperate with the processor to realize the retransmission of data.