Wave recording file synchronous transmission method and system
By judging the format integrity of the recording file and transmitting it in the retransmission processing stage, the problem of incomplete or missing recording file transmission is solved, ensuring the complete transmission of files and the improvement of equipment processing efficiency.
Patent Information
- Application Number
- CN202411015620.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-26
- Publication Date
- 2024-11-05
Smart Images

Figure CN118900271A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of electric power information communication, and in particular relates to a method and system for synchronous transmission of wave recording files. Background Art
[0002] After the relay protection device is activated and the protection is completed, the protection device usually generates a recording file of the fault sequence number. In the prior art, usually according to the relevant provisions of the 61850 protocol, after the relay protection is activated, a fault report is sent to the remote client device, and the remote client device starts the fault recording file transmission service according to the fault report. The protection device responds to the fault file directory file transmission service request and reports each recording file under the current recording file directory to the remote client device.
[0003] Existing recording files (such as recording files transmitted based on the 61850 protocol, etc.) often have problems such as incomplete fault recording data and missing actual content in some recording files (such as the actual file size is 0kb) during the process of generation and synchronous transmission. Since the protocol itself usually does not have a corresponding processing mechanism, it will affect the analysis of the recording files by the remote master station and the improvement of the efficiency of handling problems of the primary equipment on site.
[0004] The Chinese invention patent with application publication number CN103501047A provides a fault recording master station information management system, in which an automatic inspection module is set up to automatically check the connection status and file information of each fault recording device according to a preset time or period, that is, to automatically inspect whether the fault recording device can work normally, so as to avoid problems in the generation and transmission of recording files caused by problems with the fault recording device itself; and this method actually belongs to the inspection of the fault recording device itself, and it is difficult to timely reflect whether each recording file itself meets the transmission requirements, so that the recording data is still prone to abnormalities during the transmission process, resulting in transmission failure. Summary of the invention
[0005] The purpose of the present invention is to provide a method and system for synchronous transmission of recording files, which is used to solve the problem that the prior art is difficult to timely reflect whether each recording file itself meets the transmission requirements, making it easy for the recording data to have abnormalities during the transmission process, resulting in transmission failure.
[0006] In order to achieve the above-mentioned purpose, the present invention provides a method for synchronous transmission of recording files, including: for untransmitted recording files, judging whether the format of the untransmitted recording files corresponding to the same fault number is complete according to the format of the untransmitted recording files and the corresponding fault number; if complete, treating each untransmitted recording file corresponding to the fault number as a recording file to be transmitted, and transmitting it in the synchronous transmission stage; otherwise, marking each untransmitted recording file corresponding to the fault number as a failure and not transmitting it in the synchronous transmission stage; waiting until the retransmission processing stage, and then retransmitting the recording files marked as failure.
[0007] Furthermore, the method for determining whether the formats of the untransmitted recording files corresponding to the same fault number are complete includes: if the formats of the untransmitted recording files corresponding to the same fault number include the set format corresponding to the recording file, then it is determined that the formats of the untransmitted recording files corresponding to the fault number are complete; otherwise, it is determined that the formats of the untransmitted recording files corresponding to the fault number are incomplete.
[0008] Furthermore, it also includes: after a certain recording file to be transmitted has been transmitted in the synchronous transmission stage, determine whether the recording file is transmitted correctly. If it is transmitted correctly, end the transmission of the recording file, otherwise mark the recording file as a failure; after ending the transmission of the recording file, continue to determine whether other recording files corresponding to the same fault number as the recording file have also been transmitted in the synchronous transmission stage and transmitted correctly. If the other recording files have also been transmitted in the synchronous transmission stage and transmitted correctly, end the recording transmission task of the fault number corresponding to the recording file, and no longer transmit the recording file corresponding to the fault number; otherwise, continue to transmit other recording files corresponding to the fault number.
[0009] Furthermore, the method for determining whether the recording file is correctly transmitted includes determining whether the recording file is correctly transmitted based on the actual size of the recording file that has been transmitted and the normal size of the recording file: if the actual size of the recording file that has been transmitted is consistent with the normal size of the recording file, then it is determined that the recording file is correctly transmitted; otherwise, it is determined that the recording file is not correctly transmitted.
[0010] Furthermore, the method of retransmitting the recording file marked as failed includes:
[0011] During the retransmission processing stage, the recording files that have been marked as failures are retransmitted in the same manner as the recording files that have not been transmitted in the synchronous transmission stage. If no new failure mark is given to the recording file during the first retransmission, the recording file will not be retransmitted, otherwise the next retransmission will be performed; if the number of retransmissions reaches the corresponding upper limit threshold, no retransmission will be performed.
[0012] Furthermore, it also includes: in the retransmission processing stage, if a new untransmitted recording file is generated, the new untransmitted recording file is transmitted according to the transmission method of the untransmitted recording file in the synchronous transmission stage.
[0013] Furthermore, before determining whether the formats of the untransmitted recording files corresponding to the same fault number are complete, different sets are identified according to the fault number, and the untransmitted recording files corresponding to the same fault number are stored in the set corresponding to the same fault number; the determination of whether the formats of the untransmitted recording files corresponding to the same fault number are complete is performed based on the data obtained from the set corresponding to the fault number.
[0014] Furthermore, the method of ending the recording transmission task of the fault number corresponding to the recording file includes: recording the fault number corresponding to the recording file and all recording files corresponding to the fault number into the recording history, and clearing the set corresponding to the fault number of the recording file from the sets corresponding to each fault number.
[0015] Furthermore, the method for determining the untransmitted recording file includes:
[0016] If a certain fault serial number has not been recorded in the recording history, it is determined that the recording files corresponding to the fault serial number are all untransmitted recording files; if the fault serial number corresponding to a recording file has been recorded in the recording history, it is further determined whether the recording file exists in the recording history; if the recording file exists in the recording history and the size of the recording file in the recording history is consistent with the actual size of the recording file, it is determined that the recording file is not an untransmitted recording file, otherwise, the recording file is determined to be an untransmitted recording file.
[0017] Furthermore, it also includes: if the synchronous transmission of the recording files is interrupted, then after the interruption is eliminated and the transmission is resumed, it is judged whether there is a transmission interruption for each recording file based on the actual size of each recording file that has been transmitted and the normal size of each recording file; if there is a transmission interruption for a recording file, the recording file is treated as an untransmitted recording file and transmitted accordingly.
[0018] The beneficial effects of the technical solution of the above-mentioned recording file synchronous transmission method of the present invention include:
[0019] By judging whether the formats of the untransmitted recording files corresponding to the same fault sequence number are complete, the transmission failure caused by directly transmitting the file for the fault sequence number in which the corresponding recording fault file is not completely generated during the synchronous transmission of the recording file is avoided. At the same time, the retransmission mechanism of marking the recording fault file that is not completely generated for retransmission is equivalent to temporarily putting all file transmissions of the fault sequence number in which the corresponding recording fault file is not completely generated on hold in the synchronous transmission stage to wait for the recording fault file corresponding to the fault sequence number to be completely generated, and then waiting until the retransmission processing stage to transmit these recording fault files, it can be ensured that the recording fault file corresponding to the fault sequence number can also be successfully transmitted. Therefore, it can timely reflect whether the format integrity of each recording file meets the transmission requirements and transmit the recording fault files corresponding to the fault sequence number that meet the requirements accordingly; at the same time, wait until the retransmission stage to transmit the recording fault files corresponding to the fault sequence number that do not meet the transmission requirements due to incomplete formats in the synchronous transmission stage, and ensure that the recording fault files corresponding to the fault sequence number are all generated during the waiting period, so that these files can also meet the transmission requirements, thereby trying to avoid the situation where the recording data is still prone to abnormalities during the transmission process, resulting in transmission failure.
[0020] The present invention also provides a recording file synchronous transmission system, including a processor, wherein the processor stores executable program instructions, and the executable program instructions are used to be executed to implement the above-mentioned recording file synchronous transmission method.
[0021] The technical solution of the above-mentioned recording file synchronous transmission system of the present invention can achieve the same beneficial effects as the above-mentioned recording file synchronous transmission method. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 It is a flowchart of the synchronous transmission method of the recording file in the embodiment of the synchronous transmission method of the recording file of the present invention;
[0023] Figure 2 It is a schematic diagram of a conventional transmission process of starting to call a recording file list after a relay protection action in an embodiment of the recording file synchronous transmission method of the present invention;
[0024] Figure 3 A flowchart of checking whether a recording file is correctly transmitted in an embodiment of the recording file synchronous transmission method of the present invention;
[0025] Figure 4 It is a flowchart of judging whether a certain recording file is an untransmitted recording file in the embodiment of the recording file synchronous transmission method of the present invention;
[0026] Figure 5It is a flowchart of retransmitting a recording file that has been marked as failed in an embodiment of the recording file synchronous transmission method of the present invention. DETAILED DESCRIPTION
[0027] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention is further described in detail below with reference to the accompanying drawings and embodiments.
[0028] Embodiment of the synchronous transmission method of recording file
[0029] This embodiment provides a technical solution for a synchronous transmission method of a recording file. Through a recording file legitimacy detection strategy (whether the format is complete, whether the transmission is correct, etc.), the legitimacy detection of the file transmission range is increased. The files that meet the requirements are transferred according to the normal process. For files that do not meet the file transfer requirements or files that have errors during the file transfer process, a trigger file retransmission mechanism is added in a targeted manner to ensure the integrity of the recording file transmission while ensuring the efficiency of file transmission. Relevant control strategies are also set for network disconnection during the recording file transmission process and the failure of the recording file transmission due to unexpected reasons on both sides of the file transmission device to ensure the integrity of the recording file transmission. This method can effectively ensure that the recording file of the relay protection device is completely transmitted to the remote analysis device, deal with the situation where the file transmission is interrupted and cannot be retransmitted due to unexpected reasons, and improve the efficiency of users in handling accidents after power equipment failures occur.
[0030] Reference Figure 1 The method includes: for the untransmitted recording files, according to the formats of the untransmitted recording files and the corresponding fault numbers, judging whether the formats of the untransmitted recording files corresponding to the same fault number are complete; if they are complete, treating the untransmitted recording files corresponding to the fault number as recording files to be transmitted, and transmitting them in the synchronous transmission stage; otherwise, marking the untransmitted recording files corresponding to the fault number as failures and not transmitting them in the synchronous transmission stage; waiting until the retransmission processing stage, and then retransmitting the recording files marked as failures.
[0031] Specifically, the recording files to be transmitted in this embodiment are all recording fault files of the relay protection device based on 61850. In other embodiments, the recording fault files of other relay protection devices can also be transmitted according to demand. In this embodiment, after the relay protection device is actuated, the protection device generates a recording file of the fault number after the protection ends; according to the relevant provisions of the 61850 protocol, the relay protection device (server side) actively sends a REMODE message to the client; the main station starts the fault recording file list transmission service according to the fault report. The protection device responds to the fault file directory file transmission service request and reports all the recording files in the recording file directory at the current moment to the remote client device; the recording fault file transmission of the relay protection device based on 61850 mainly adopts file transmission, and the general logic is: after the relay protection is actuated, it actively sends a fault report to the remote client device, and the remote client device starts calling the recording file list according to the fault report. This is a conventional transmission process, as shown in the following example. Figure 2 As shown. Transmission in the synchronous transmission stage mainly refers to adding the file to be transmitted to the file transmission queue (which can be referred to as the transmission queue for short), and transmitting the recording file according to the file transmission queue. The recording file that is determined not to be transmitted in the synchronous transmission stage is deleted from the file transmission queue.
[0032] After analysis, it is found that the recording fault data is mainly stored in three file formats: dat, hdr and cfg. After the relay protection device is activated, especially when the relay protection device is continuously activated, the generation of these three formats of files is not strictly synchronized. For example, for a certain recording fault, there is a situation where the hdr file in the fault number has not been generated or has not been completely generated, but because the dat and cfg files have been generated, the corresponding fault file list already contains this file; at this time, if the recording file transmission is started directly according to the fault file list, the transmission will fail (because the hdr file has not been completely generated, resulting in the incomplete format of the recording fault file, which is equivalent to the fact that the file of the recording fault has not been completely generated as a whole). Therefore, the synchronous transmission method of recording files in this embodiment determines whether the formats of the untransmitted recording files corresponding to the same fault number are complete, thereby avoiding transmission failure caused by directly transmitting files for fault numbers for which the corresponding recording fault files are not completely generated during synchronous transmission of recording files. At the same time, a retransmission mechanism is combined to mark the recording fault files that are not completely generated for retransmission, which is equivalent to temporarily suspending all file transmissions of fault numbers for which the corresponding recording fault files are not completely generated in the synchronous transmission stage to wait for the recording fault files corresponding to the fault number to be completely generated, and then waiting until the retransmission processing stage to transmit these recording fault files, thereby ensuring that the recording fault files corresponding to the fault number can also be successfully transmitted. Therefore, it is possible to timely reflect whether the format integrity of each recording file meets the transmission requirements and transmit the recording fault files corresponding to the fault numbers that meet the requirements accordingly; at the same time, it waits until the retransmission stage to transmit the recording fault files corresponding to the fault numbers that do not meet the transmission requirements due to incomplete formats during the synchronous transmission stage, ensuring that the recording fault files corresponding to the fault numbers are all generated during the waiting period, so that these files can also meet the transmission requirements, thereby minimizing the situation where the recording data is still prone to abnormalities during the transmission process, resulting in transmission failures.
[0033] Specifically, the method for judging whether the format of the untransmitted recording file corresponding to the same fault number is complete includes: if the format of each untransmitted recording file corresponding to the same fault number contains the set format corresponding to the recording file, then the format of each untransmitted recording file corresponding to the fault number is judged to be complete, otherwise the format of each untransmitted recording file corresponding to the fault number is judged to be incomplete. For example, for the recording fault file of the relay protection device based on 61850, since the recording fault data is mainly stored in the three file formats of dat, hdr and cfg (files of other formats may be generated in different relay protection devices), the set format corresponding to the recording file is the three file formats of dat, hdr and cfg, that is, if the format of each untransmitted recording file corresponding to the same fault number contains the three file formats of dat, hdr and cfg, then the format of each untransmitted recording file corresponding to the fault number is judged to be complete, otherwise the format of each untransmitted recording file corresponding to the fault number is judged to be incomplete.
[0034] In this embodiment, before judging whether the formats of the untransmitted wave recording files corresponding to the same fault number are complete, different sets are first identified according to the fault number, and the untransmitted wave recording files corresponding to the same fault number are stored in the set corresponding to the same fault number; the judgment on whether the formats of the untransmitted wave recording files corresponding to the same fault number are complete is performed based on the data obtained from the set corresponding to the fault number. Thus, it is equivalent to classifying the untransmitted wave recording files according to the fault number, which is convenient for comprehensively searching whether the formats of the untransmitted wave recording files corresponding to the same fault number are complete, and it is also convenient for the untransmitted wave recording files corresponding to the same fault number to be sent uniformly. Specifically, the method of storing the untransmitted recording files corresponding to the same fault number in the collection corresponding to the same fault number can be: using the fault number as a unique identification object to form a linked list, so that different types of files with the same fault number are stored in the linked list node object corresponding to the same fault number; each linked list node protects the extension name and the recording file size corresponding to the same fault number; the extension name and the recording file size corresponding to the same fault number are both attributes of the recording file corresponding to the fault number. In other embodiments, each linked list node protects the attributes of the recording file corresponding to the same fault number, and the attributes of the recording file include file size, file extension name, and other flags in file transmission.
[0035] Reference Figure 3 The synchronous transmission method of the recording file of this embodiment also includes checking whether the recording file is correctly transmitted, specifically: after a recording file to be transmitted has been transmitted in the synchronous transmission stage (i.e. Figure 3If the judgment box of "Whether the transmission is successful" is "Y", continue to judge whether the recording file is transmitted correctly. If the transmission is correct, the transmission of the recording file is terminated. At the same time, a transmission success mark will be fed back for the transmission of the recording file. Otherwise, the recording file will be marked as a failure (i.e. Figure 3 "Set failure mark" in the text, and the time of the mark will also be recorded in this embodiment); after the transmission of the recording file is completed, continue to determine whether the recording transmission task of the fault number corresponding to the recording file should be completed; if it is determined that the recording transmission task of the fault number corresponding to the recording file should be completed, then the recording transmission task of the fault number corresponding to the recording file is completed, and the recording file corresponding to the fault number is no longer transmitted; otherwise, continue to transmit other recording files corresponding to the fault number. In this way, it can be ensured that the recording files that are not transmitted correctly are also retransmitted, and it is ensured that at least one file with no abnormal content is successfully transmitted in the end.
[0036] Specifically, Figure 3 As shown, the method for judging whether the recording file is correctly transmitted includes judging whether the recording file is correctly transmitted according to the actual size of the recording file that has been transmitted and the normal size of the recording file: if the actual size of the recording file that has been transmitted is consistent with the normal size of the recording file, then the recording file is judged to be correctly transmitted, otherwise it is judged that the recording file is not correctly transmitted. That is, the inspection of whether the transmission is correct is mainly carried out by judging whether the size of the transmitted file is normal. Since it is difficult to ensure that the size is completely consistent with the original file after the file content is abnormal, the inspection of the file size can not only find the situation that a single recording file is not completely transmitted, but also find some empty files or problems with abnormal file content.
[0037] In the process of synchronous transmission, the step of judging whether the recording transmission task of the fault number corresponding to the recording file should be ended (i.e. whether the synchronous transmission of the fault number corresponding to the recording file has been ended) is as follows: Figure 3 If it should be ended, then end the recording transmission task of the fault number corresponding to the recording file, and then select a file from the transmission list to start the transmission of the file. If it is not ended, directly select a file from the transmission list to start the transmission of the file. Figure 3 , the method of ending the recording transmission task of the fault number corresponding to the recording file includes: recording the fault number corresponding to the recording file and all the recording files corresponding to the fault number into the recording history, and clearing the set corresponding to the fault number of the recording file from the sets corresponding to each fault number. Combined with the recording history, refer to Figure 4 , the method for determining the untransmitted recording file (i.e., the method for determining whether a recording file is an untransmitted recording file) includes:
[0038] If a certain fault serial number has not been recorded in the recording history, it is determined that the recording files corresponding to the fault serial number are all untransmitted recording files; if the fault serial number corresponding to a recording file has been recorded in the recording history, it is further determined whether the recording file exists in the recording history; if the recording file exists in the recording history and the size of the recording file in the recording history is consistent with the actual size of the recording file, it is determined that the recording file is not an untransmitted recording file, otherwise, the recording file is determined to be an untransmitted recording file.
[0039] In summary, in the synchronous transmission stage, whenever a single file transmission is completed, the object file will be deleted from the file transmission queue; and, based on the transmission success flag fed back from the check on whether the recording file is correctly transmitted, a failure mark will be given to the recording file that is not transmitted correctly, so that the recording file retransmission strategy can be started in the subsequent retransmission processing stage to retransmit the file; for the recording file that is transmitted correctly, the actual size of the recording file that has been transmitted is further compared with the file size stored in the linked list node of the fault number corresponding to the recording file; if the two are consistent, it is determined that the transmission of the recording file is completed and successful, and it is continued to be determined whether other recording files of the fault number corresponding to the recording file are completed and successful. If all are completed and successful, it is directly marked in the historical database that the recording files corresponding to the fault number have been successfully transmitted, and the transmission operation of the recording file corresponding to the fault number will no longer be performed subsequently, thereby avoiding the repeated transmission of the recording file that has been transmitted in the subsequent transmission process.
[0040] Reference Figure 5 , the methods for retransmitting the recording files that have been marked as failed include:
[0041] In the retransmission processing stage, the recording file that has been marked as failed is retransmitted in accordance with the transmission method of the recording file that has not been transmitted in the synchronous transmission stage. If the recording file is not marked as a new failure during the first retransmission, the recording file will not be retransmitted, otherwise the next retransmission will be performed; if the number of retransmissions reaches the corresponding upper limit threshold, no retransmission will be performed. It can be seen that the number of retransmissions is limited in the synchronous transmission method of the recording file of this embodiment to avoid the situation where multiple invalid retransmissions lead to reduced retransmission efficiency and slow transmission progress. Specifically, before retransmission, it is necessary to add a device fault file list request command to the call recording file command queue and record the request time. Under normal circumstances, the request command for the device file list will be automatically triggered only when the protection device is automatically sent to REMODE after the action; therefore, before retransmission, it is necessary to actively add a device fault file list request command to the call recording file command queue to ensure that the recording file that has been marked as failed is sent in accordance with the normal file transmission method through the call recording file command queue to retransmit it. Among them, the summoning recording file command queue specifically refers to the summoning command corresponding to the set of file objects that need to be transmitted that is confirmed after logical judgment (i.e., the above-mentioned judgment on whether the format of the untransmitted recording file corresponding to the same fault number is complete).
[0042] Furthermore, if there is no time to re-summon the file list after the file transfer fails, and after the device protection action, when the action report REMODE is received, the file transfer error flag (i.e., the failure flag) is actively cleared, and the fault recording file list request summoning command is started to re-summon the file list; since each protection action (i.e., the protection device action) will trigger the start of the request device file list request operation (i.e., the device file list request command), the device file list request operation will reflect the previously summoned files (whether successful or not) in the file list. If the file transfer error flag is not actively cleared, the files that have failed to transfer (i.e., the recording files marked as failure) listed in the file list by the device file list request operation will trigger the request device file list request command, thereby increasing the number of useless device file list request commands sent, reducing the channel file transfer efficiency; actively clearing the file transfer error flag can minimize the number of times the trigger request device file list request command is sent, thereby improving the channel file transfer efficiency.
[0043] In addition, during the retransmission processing stage, if a new untransmitted recording file is generated, the new untransmitted recording file will be transmitted in accordance with the transmission method of the untransmitted recording file in the synchronous transmission stage; it can be seen that the retransmission process of the previous recording file with problems will not affect the normal transmission of the new recording file.
[0044] In addition, in this embodiment, relevant control strategies are set for network disconnection during the recording file transmission process and recording file transmission failure caused by unexpected reasons of both devices transmitting files, so as to ensure the integrity of the recording file transmission; specifically: if the synchronous transmission of the recording file is interrupted, then after the interruption is eliminated and the transmission is resumed, it is determined whether there is a transmission interruption for each recording file according to the actual size of each recording file that has been transmitted and the normal size of each recording file; if there is a transmission interruption for a certain recording file, the recording file is treated as an untransmitted recording file for corresponding transmission. Specifically, when the network connection between the device and the protection device is disconnected during the file transmission process, the transmission file is interrupted, then after the subsequent network is restored, the protection device actively pushes the REMAN command, and re-calls the fault recording file list operation, and determines whether there is a transmission interruption for each recording file according to the actual size of each recording file that has been transmitted and the normal size of each recording file, so that the transmission file object due to the unexpected transmission interruption can be identified, and the recording file whose transmission is interrupted can be restored.
[0045] Taking a certain protection device action as an example, the specific process of the recording file synchronous transmission method of this embodiment is as follows:
[0046] 1) After the protection device is activated, a recording file is generated and a fault report is sent to the client;
[0047] 2) The client sends a command to request a list of fault recording files, and the protection device responds to the call command and sends a list of fault recording files (transmission queue);
[0048] 3) The client receives the fault file list, and determines whether the format of the untransmitted recording file corresponding to the same fault sequence number is complete for the untransmitted recording file, and makes a next file transfer start request accordingly according to the determination result;
[0049] 4) The relay protection device performs file transmission according to the file reading service; the client receives the file transmission, and at the end of the transmission of a single transmission file, checks whether the recording file is correctly transmitted, and after processing according to the inspection result, transmits the next file accordingly; until the synchronous transmission of all the recording files in the current transmission queue is completed;
[0050] 5) Check whether there is a recording retransmission flag (i.e., a failure flag), and start retransmission of the recording file based on the conditions.
[0051] Embodiment of synchronous transmission system for recording files
[0052] This embodiment provides a technical solution for a recording file synchronous transmission system, including a processor, in which executable program instructions are stored. The executable program instructions are used to be executed to implement the recording file synchronous transmission method in the above-mentioned recording file synchronous transmission method embodiment.
[0053] Since the specific working process and principle of the recording file synchronous transmission system in this embodiment have been described in detail in the above-mentioned recording file synchronous transmission method embodiment, they will not be repeated here.
[0054] The present invention has the following characteristics:
[0055] ① By judging whether the formats of the untransmitted recording files corresponding to the same fault sequence number are complete, the transmission failure caused by directly transmitting the file for the fault sequence number in which the corresponding recording fault file is not completely generated during the synchronous transmission of the recording file is avoided. At the same time, the retransmission mechanism of marking the recording fault file that is not completely generated for retransmission is equivalent to temporarily putting on hold all file transmissions of the fault sequence number in which the corresponding recording fault file is not completely generated in the synchronous transmission stage to wait for the recording fault file corresponding to the fault sequence number to be completely generated, and then waiting until the retransmission processing stage to transmit these recording fault files, it can be ensured that the recording fault file corresponding to the fault sequence number can also be successfully transmitted. Therefore, it can timely reflect whether the format integrity of each recording file meets the transmission requirements and transmit the recording fault files corresponding to the fault sequence number that meets the requirements accordingly; at the same time, wait until the retransmission stage to transmit the recording fault files corresponding to the fault sequence number that does not meet the transmission requirements due to incomplete formats in the synchronous transmission stage, ensuring that the recording fault files corresponding to the fault sequence number are all generated during the waiting period, so that these files can also meet the transmission requirements, thereby trying to avoid the situation where the recording data is still prone to abnormalities during the transmission process, resulting in transmission failure.
[0056] ② Storing the untransmitted recording files corresponding to the same fault number in the set corresponding to the same fault number is equivalent to classifying the untransmitted recording files according to the fault number, which is convenient for comprehensively finding whether the formats of the untransmitted recording files corresponding to the same fault number are complete, and also convenient for sending the untransmitted recording files corresponding to the same fault number in a unified manner.
[0057] ③ By judging whether the size of the transferred file is normal, we can check whether it is transmitted correctly. This can not only detect the incomplete transmission of a single recording file, but also some empty files or abnormal file contents.
[0058] ④ The number of retransmissions is limited to avoid multiple invalid retransmissions that reduce retransmission efficiency and slow down transmission progress.
[0059] ⑤ Relevant control strategies are set up for the failure of recording file transmission caused by network disconnection during the recording file transmission process and unexpected reasons on both sides of the file transmission device to ensure the integrity of the recording file transmission.
[0060] It should be understood that the above specific embodiments of the present invention are only used to illustrate or explain the principles of the present invention, but do not constitute a limitation to the present invention.
Claims
1. A method for synchronous transmission of recording files, characterized in that: include: For the untransmitted recording files, determine whether the format of the untransmitted recording files corresponding to the same fault number is complete based on the format of the untransmitted recording files and the corresponding fault number; if complete, treat the untransmitted recording files corresponding to the fault number as recording files to be transmitted and transmit them in the synchronous transmission stage; otherwise, mark the untransmitted recording files corresponding to the fault number as failures and do not transmit them in the synchronous transmission stage; wait until the retransmission processing stage, and then retransmit the recording files marked as failures.
2. The method for synchronous transmission of recording files according to claim 1, characterized in that: The method for determining whether the formats of the untransmitted recording files corresponding to the same fault number are complete includes: if the formats of the untransmitted recording files corresponding to the same fault number include the set formats corresponding to the recording files, then it is determined that the formats of the untransmitted recording files corresponding to the fault number are complete; otherwise, it is determined that the formats of the untransmitted recording files corresponding to the fault number are incomplete.
3. The method for synchronous transmission of recording files according to claim 1, characterized in that: Also includes: After a recording file to be transmitted has been transmitted in the synchronous transmission stage, determine whether the recording file is transmitted correctly. If it is transmitted correctly, terminate the transmission of the recording file, otherwise mark the recording file as a failure; after terminating the transmission of the recording file, continue to determine whether other recording files corresponding to the same fault number as the recording file have also been transmitted in the synchronous transmission stage and transmitted correctly. If the other recording files have also been transmitted in the synchronous transmission stage and transmitted correctly, terminate the recording transmission task of the fault number corresponding to the recording file, and no longer transmit the recording file corresponding to the fault number; otherwise, continue to transmit other recording files corresponding to the fault number.
4. The method for synchronous transmission of recording files according to claim 3, characterized in that: The method for judging whether the recording file is transmitted correctly includes judging whether the recording file is transmitted correctly based on the actual size of the recording file that has been transmitted and the normal size of the recording file: if the actual size of the recording file that has been transmitted is consistent with the normal size of the recording file, then it is judged that the recording file is transmitted correctly; otherwise, it is judged that the recording file is not transmitted correctly.
5. The method for synchronous transmission of recording files according to claim 1, characterized in that: The methods for retransmitting the recording files marked as failed include: During the retransmission processing stage, the recording files that have been marked as failures are retransmitted in the same manner as the recording files that have not been transmitted in the synchronous transmission stage. If no new failure mark is given to the recording file during the first retransmission, the recording file will not be retransmitted, otherwise the next retransmission will be performed; if the number of retransmissions reaches the corresponding upper limit threshold, no retransmission will be performed.
6. The method for synchronous transmission of recording files according to claim 1 or 5, characterized in that: Also includes: In the retransmission processing stage, if a new untransmitted recording file is generated, the new untransmitted recording file is transmitted according to the transmission method of the untransmitted recording file in the synchronous transmission stage.
7. The method for synchronous transmission of recording files according to claim 1 or 2, characterized in that: Before determining whether the formats of the untransmitted recording files corresponding to the same fault number are complete, first identify different sets according to the fault number, and store the untransmitted recording files corresponding to the same fault number in the set corresponding to the same fault number; the determination of whether the formats of the untransmitted recording files corresponding to the same fault number are complete is performed based on the data obtained from the set corresponding to the fault number.
8. The method for synchronous transmission of recording files according to claim 3, characterized in that: The method of ending the recording transmission task of the fault number corresponding to the recording file includes: recording the fault number corresponding to the recording file and all recording files corresponding to the fault number into the recording history, and clearing the set corresponding to the fault number of the recording file from the sets corresponding to each fault number.
9. The method for synchronous transmission of recording files according to claim 8, characterized in that: Methods for determining the untransmitted recording files include: If a certain fault serial number has not been recorded in the recording history, it is determined that the recording files corresponding to the fault serial number are all untransmitted recording files; if the fault serial number corresponding to a recording file has been recorded in the recording history, it is further determined whether the recording file exists in the recording history; if the recording file exists in the recording history and the size of the recording file in the recording history is consistent with the actual size of the recording file, it is determined that the recording file is not an untransmitted recording file, otherwise, the recording file is determined to be an untransmitted recording file.
10. The method for synchronous transmission of recording files according to any one of claims 1 to 5, characterized in that: Also includes: If the synchronous transmission of recording files is interrupted, after the interruption is eliminated and the transmission is resumed, it is determined whether there is a transmission interruption for each recording file based on the actual size of each recording file that has been transmitted and the normal size of each recording file; if there is a transmission interruption for a recording file, the recording file will be treated as an untransmitted recording file and transmitted accordingly.
11. A synchronous transmission system for recording wave files, characterized in that: It comprises a processor, in which executable program instructions are stored, and the executable program instructions are used to be executed to implement the method for synchronous transmission of recording files according to any one of claims 1-10.
