CN115242778B - File transmission method and device, electronic equipment and readable storage medium - Google Patents

File transmission method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN115242778B
CN115242778B CN202210863770.3A CN202210863770A CN115242778B CN 115242778 B CN115242778 B CN 115242778B CN 202210863770 A CN202210863770 A CN 202210863770A CN 115242778 B CN115242778 B CN 115242778B
Authority
CN
China
Prior art keywords
transmission
file
executed
stage
transmitted
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210863770.3A
Other languages
Chinese (zh)
Other versions
CN115242778A (en
Inventor
高亚龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhongdian Jinxin Software Co Ltd
Original Assignee
Zhongdian Jinxin Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhongdian Jinxin Software Co Ltd filed Critical Zhongdian Jinxin Software Co Ltd
Priority to CN202210863770.3A priority Critical patent/CN115242778B/en
Publication of CN115242778A publication Critical patent/CN115242778A/en
Application granted granted Critical
Publication of CN115242778B publication Critical patent/CN115242778B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/079Root cause analysis, i.e. error or fault diagnosis
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0677Localisation of faults
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application provides a file transmission method, a file transmission device, electronic equipment and a readable storage medium, wherein whether a file transmission system indicated by a file transmission instruction has file transmission permission for transmitting a file to a file receiving system is determined based on a stored transmission subscription relation in response to the file transmission instruction issued for the file to be transmitted; if the file has the file transmission authority, transmitting the file to be transmitted to each file receiving system one by one; in the process of file transmission, sequentially executing the transmission tasks related to each transmission stage to be executed, and recording the transmission tracking data of each executed target transmission stage which indicates the completion condition of the transmission tasks; the transmission tracking data of each target transmission stage is reported to the file transmission platform, so that tracking of the file transmission process is realized, and when the file transmission process has an abnormal condition, the abnormal problem can be rapidly determined according to the transmission tracking data, and the purpose of diagnosing the abnormal problem is improved.

Description

File transmission method and device, electronic equipment and readable storage medium
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a file transmission method, a device, an electronic apparatus, and a readable storage medium.
Background
In the distributed architecture, a distributed system is often provided with a plurality of application systems, and the transmission and sharing of files can be realized between different application systems according to the existing transmission subscription relationship. Because of the large number of application systems in a distributed system, if errors or anomalies occur during file transfer, it is difficult to locate the location where the error or anomaly occurred in a timely manner.
In the existing distributed system, if errors or anomalies occur in the file transmission process, a manual checking mode is adopted to check the problems existing in the file transmission process step by step; firstly, checking whether an application system can normally run or not; then, whether an instance port of the received file is down and offline or not needs to be determined, and whether a network used by the instance port is normal or not; finally, it is determined which files were transferred successfully during the transfer, which files failed, what the cause of the failure was, etc. The manual checking mode consumes high time cost and labor cost, and the problems existing in the file transmission process are difficult to determine in time.
Disclosure of Invention
In view of this, an object of the present application is to provide a file transmission method, apparatus, electronic device, and readable storage medium, which can record, in real time, transmission tracking data representing the completion condition of a transmission task in each transmission stage in a file transmission process, and implement tracking recording of the file transmission process, so that when there is an abnormality in file transmission, the abnormality problem can be quickly located according to the transmission tracking data in each transmission stage, thereby improving the diagnosis efficiency of the abnormality problem, and reducing the time cost required for searching the abnormality problem.
The embodiment of the application provides a file transmission method, which comprises the following steps:
responding to a file transmission instruction issued for a file to be transmitted, and determining whether a file transmission system indicated by the file transmission instruction has file transmission authority for transmitting the file to a file receiving system based on a stored transmission subscription relation;
if so, determining a plurality of transmission stages to be executed, which are involved in transmitting the file to be transmitted to the file receiving system, aiming at each file receiving system;
according to the execution sequence of the plurality of transmission stages to be executed, the transmission tasks related to each transmission stage to be executed are executed in sequence, and transmission tracking data of the executed target transmission stage are generated; the transmission tracking data represent transmission condition description information of a transmission task related to the target transmission stage;
And reporting the transmission tracking data of each target transmission stage to a file transmission platform so as to complete tracking of the file transmission process to be transmitted.
In one possible embodiment, the method further comprises:
determining an abnormal transmission stage with abnormal data transmission from a plurality of target transmission stages by analyzing each transmission tracking data;
for each abnormal transmission stage, determining a transmission failure reason of the file to be transmitted in the transmission process of the abnormal transmission stage based on the abnormal mark data carried by the transmission tracking data of the abnormal transmission stage; the transmission failure reasons comprise at least one of transmission permission abnormality, instance port abnormality and server abnormality;
determining the data transmission performance of the abnormal transmission stage based on the time consumption of the transmission tracking data carried by the transmission tracking data of the abnormal transmission stage; wherein, the data transmission performance and the data transmission time consumption have a negative correlation.
In one possible implementation manner, the sequentially executing the transmission tasks related to each transmission stage to be executed according to the execution sequence of the multiple transmission stages to be executed, and generating the transmission tracking data of the executed target transmission stage, includes:
According to the execution sequence of the plurality of transmission stages to be executed, the transmission tasks related to each transmission stage to be executed are executed in sequence, and after the transmission tasks related to the current transmission stage to be executed or the transmission tasks related to the current transmission stage to be executed are failed to be executed, the current transmission stage to be executed is determined as a target transmission stage;
generating transmission tracking data of the target transmission stage based on the stage information of the target transmission stage and the completion condition of the transmission task related to the target transmission stage; the transmission tracking data includes one or more of a first system identification of a file transmission system, a system identification of a target receiving system, a file transmission path, a file to be transmitted, a file size, an instance internet protocol address of a transmission service, an instance process code number, an instance port number, a transmission protocol, a phase identification, a phase start time, a phase reception time, a phase state, and anomaly information.
In one possible embodiment, the method further comprises:
after all transmission tasks related to the transmission stage to be executed are completed, generating transmission success information; or alternatively, the first and second heat exchangers may be,
and when the transmission task of any transmission stage to be executed fails to execute, generating transmission failure information, wherein the transmission failure information is reference information for adjusting the transmission mode of the file to be transmitted.
In one possible implementation manner, the determining, based on the stored transmission subscription relationship, whether the file transmission system indicated by the file transmission instruction has a file transmission authority for transmitting the file to the file receiving system includes:
for each file receiving system, determining a first system identifier of the file transmitting system and a second system identifier of the file receiving system according to file transmitting information carried by the file transmitting instruction;
determining whether a file subscription relationship exists between the file transmission system and the file receiving system by querying a stored transmission subscription relationship in the file transmission platform by using the first system identifier and the second system identifier;
if a file subscription relationship exists between the file transmission system and the file receiving system, the file subscription relationship indicates that the file transmission system authorizes the file transmission to the file receiving system, and the file transmission system is determined to have the file transmission authority for transmitting the file to the file receiving system.
In one possible implementation manner, when the files to be transmitted are plural, the determining, for each file receiving system, plural stages to be performed involved in transmitting the files to be transmitted to the file receiving system includes:
For each file receiving system, determining at least one instance port for receiving the file to be transmitted in a server corresponding to the file receiving system;
for each file to be transmitted, determining a target instance port for receiving the file to be transmitted according to the load capacity of each instance port, and determining a plurality of transmission stages to be executed, which are involved in transmitting the file to be transmitted to the target instance port.
In one possible implementation manner, if the transmission task related to the current transmission stage to be performed fails to perform, the method further includes:
repeatedly executing the transmission task related to the current transmission stage to be executed until the transmission task related to the current transmission stage to be executed is completed, and then executing the transmission task related to the next transmission stage to be executed corresponding to the current transmission stage to be executed; or alternatively, the first and second heat exchangers may be,
and repeatedly executing the transmission task related to the current transmission stage to be executed until the repeated times reach the preset execution times, and generating transmission failure information.
The embodiment of the application also provides a file transmission device, which comprises:
the permission authentication module is used for responding to a file transmission instruction issued for a file to be transmitted, and determining whether a file transmission system indicated by the file transmission instruction has file transmission permission for transmitting the file to a file receiving system based on a stored transmission subscription relation;
The stage determining module is used for determining a plurality of transmission stages to be executed, which are involved in transmitting the files to be transmitted to the file receiving system, aiming at each file receiving system if the files to be transmitted are transmitted to the file receiving system;
the data generation module is used for sequentially executing the transmission tasks related to each transmission stage to be executed according to the execution sequence of the plurality of transmission stages to be executed and generating transmission tracking data of the executed target transmission stage; the transmission tracking data represent transmission condition description information of a transmission task related to the target transmission stage;
and the data uploading module is used for reporting the transmission tracking data of each target transmission stage to the file transmission platform so as to complete tracking of the file transmission process to be transmitted.
In one possible embodiment, the apparatus further comprises an anomaly diagnosis module for:
determining an abnormal transmission stage with abnormal data transmission from a plurality of target transmission stages by analyzing each transmission tracking data;
for each abnormal transmission stage, determining a transmission failure reason of the file to be transmitted in the transmission process of the abnormal transmission stage based on the abnormal mark data carried by the transmission tracking data of the abnormal transmission stage; the transmission failure reasons comprise at least one of transmission permission abnormality, instance port abnormality and server abnormality;
Determining the data transmission performance of the abnormal transmission stage based on the time consumption of the transmission tracking data carried by the transmission tracking data of the abnormal transmission stage; wherein, the data transmission performance and the data transmission time consumption have a negative correlation.
In one possible implementation manner, the data generating module is configured to, when configured to sequentially execute, according to an execution order of the plurality of transmission phases to be executed, a transmission task involved in each transmission phase to be executed, and generate transmission tracking data of an executed target transmission phase, when the data generating module is configured to:
according to the execution sequence of the plurality of transmission stages to be executed, the transmission tasks related to each transmission stage to be executed are executed in sequence, and after the transmission tasks related to the current transmission stage to be executed or the transmission tasks related to the current transmission stage to be executed are failed to be executed, the current transmission stage to be executed is determined as a target transmission stage;
generating transmission tracking data of the target transmission stage based on the stage information of the target transmission stage and the completion condition of the transmission task related to the target transmission stage; the transmission tracking data includes one or more of a first system identification of a file transmission system, a system identification of a target receiving system, a file transmission path, a file to be transmitted, a file size, an instance internet protocol address of a transmission service, an instance process code number, an instance port number, a transmission protocol, a phase identification, a phase start time, a phase reception time, a phase state, and anomaly information.
In a possible implementation manner, the apparatus further includes an information generating module, where the information generating module is configured to:
after all transmission tasks related to the transmission stage to be executed are completed, generating transmission success information; or alternatively, the first and second heat exchangers may be,
and when the transmission task of any transmission stage to be executed fails to execute, generating transmission failure information, wherein the transmission failure information is reference information for adjusting the transmission mode of the file to be transmitted.
In one possible implementation manner, the permission authentication module is used for determining whether the file transmission system indicated by the file transmission instruction has a file transmission right for transmitting the file to the file receiving system based on the stored transmission subscription relationship, where the permission authentication module is used for:
for each file receiving system, determining a first system identifier of the file transmitting system and a second system identifier of the file receiving system according to file transmitting information carried by the file transmitting instruction;
determining whether a file subscription relationship exists between the file transmission system and the file receiving system by querying a stored transmission subscription relationship in the file transmission platform by using the first system identifier and the second system identifier;
If a file subscription relationship exists between the file transmission system and the file receiving system, the file subscription relationship indicates that the file transmission system authorizes the file transmission to the file receiving system, and the file transmission system is determined to have the file transmission authority for transmitting the file to the file receiving system.
In a possible implementation manner, when the files to be transmitted are plural, the stage determining module is configured to, for each file receiving system, determine plural stages to be executed involved in transmitting the files to be transmitted to the file receiving system, where the stage determining module is configured to:
for each file receiving system, determining at least one instance port for receiving the file to be transmitted in a server corresponding to the file receiving system;
for each file to be transmitted, determining a target instance port for receiving the file to be transmitted according to the load capacity of each instance port, and determining a plurality of transmission stages to be executed, which are involved in transmitting the file to be transmitted to the target instance port.
In one possible implementation manner, if the transmission task related to the current transmission stage to be performed fails to perform, the apparatus further includes a repeated execution module, where the repeated execution module is configured to:
Repeatedly executing the transmission task related to the current transmission stage to be executed until the transmission task related to the current transmission stage to be executed is completed, and then executing the transmission task related to the next transmission stage to be executed corresponding to the current transmission stage to be executed; or alternatively, the first and second heat exchangers may be,
and repeatedly executing the transmission task related to the current transmission stage to be executed until the repeated times reach the preset execution times, and generating transmission failure information.
The embodiment of the application also provides electronic equipment, which comprises: a processor, a memory and a bus, said memory storing machine readable instructions executable by said processor, said processor and said memory communicating over the bus when the electronic device is running, said machine readable instructions when executed by said processor performing the steps of the file transfer method as described above.
Embodiments of the present application also provide a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of a file transfer method as described above.
In response to a file transmission instruction issued for a file to be transmitted, determining whether a file transmission system indicated by the file transmission instruction has file transmission authority for transmitting the file to a file receiving system based on a stored transmission subscription relationship; if the file transmission system has the file transmission authority for transmitting the file to be transmitted to the file receiving systems, the file to be transmitted can be transmitted to each file receiving system one by one; in the process of file transmission, sequentially executing the transmission tasks related to each transmission stage to be executed, and recording the transmission tracking data of each executed target transmission stage which indicates the completion condition of the transmission tasks; therefore, tracking of the file transmission process is realized, so that when the file transmission process has an abnormal condition, the abnormal problem can be rapidly determined according to the transmission tracking data, and the purpose of improving the diagnosis of the abnormal problem is further achieved.
In order to make the above objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered limiting the scope, and that other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a distributed system according to an embodiment of the present application;
FIG. 2 is a flowchart of a method for transmitting files according to an embodiment of the present disclosure;
fig. 3 is a schematic diagram of a transmission right determining process according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a file transfer tracking process according to an embodiment of the present disclosure;
FIG. 5 is a schematic structural diagram of a document transmission device according to an embodiment of the present disclosure;
FIG. 6 is a second schematic diagram of a document transporting apparatus according to the embodiment of the present disclosure;
Fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, but not all embodiments. The components of the embodiments of the present application, which are generally described and illustrated in the figures herein, may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, as provided in the accompanying drawings, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. Based on the embodiments of the present application, every other embodiment that a person skilled in the art would obtain without making any inventive effort is within the scope of protection of the present application.
Referring to fig. 1, fig. 1 is a schematic diagram of a distributed system according to an embodiment of the present application. As shown in fig. 1, the distributed system 100 referred to in the present application includes a file transfer system 110 (i.e., a file producer), a first file receiving system 120-a (i.e., a file consumer), a second file receiving system 120-b (i.e., a file consumer), and a file transfer platform 130; the file transfer system 110, the first file receiving system 120-a, and the second file receiving system 120-b all need to be registered in the registry 131 of the file transfer platform 130; the file transmission system 110 side is provided with a first start-up container 111, the first file receiving system 120-a side is provided with a second start-up container 121-a, and the second file receiving system 120-b side is provided with a third start-up container 121-b; when the file transfer system 110 wants to transfer the file to be transferred to the first file receiving system 120-a and the second file receiving system 120-b, the first start-up container 111 needs to query the file subscription relationship between the file transfer system 110 and the first file receiving system 120-a and the second file receiving system 120-b, respectively, through the management center 132 in the file transfer platform 130; and in the process of transmitting the file to be transmitted to the first file receiving system 120-a and the second file receiving system 120-b, the transmission tracking data generated in different transmission stages to be executed are reported to the management and control center 132 in the file transmission platform 130.
According to research, in the existing distributed system, if errors or anomalies occur in the file transmission process, a manual checking mode is adopted to check the problems existing in the file transmission process step by step; firstly, checking whether an application system can normally run or not; then, whether an instance port of the received file is down and offline or not needs to be determined, and whether a network used by the instance port is normal or not; finally, it is determined which files were transferred successfully during the transfer, which files failed, what the cause of the failure was, etc. The manual checking mode consumes high time cost and labor cost, and the problems existing in the file transmission process are difficult to determine in time.
Based on this, the embodiment of the application provides a file transmission method, which can improve the diagnosis efficiency of the abnormal result in the file transmission process and reduce the time cost and the labor cost required for searching the abnormal problem.
Referring to fig. 2, fig. 2 is a flowchart of a file transmission method according to an embodiment of the present application. As shown in fig. 2, the file transmission method provided in the embodiment of the present application includes:
s201, responding to a file transmission instruction issued for a file to be transmitted, and determining whether a file transmission system indicated by the file transmission instruction has file transmission permission for transmitting the file to a file receiving system based on a stored transmission subscription relation.
S202, if so, determining a plurality of transmission stages to be executed, which are involved in transmitting the file to be transmitted to each file receiving system.
S203, according to the execution sequence of the plurality of transmission phases to be executed, the transmission tasks related to each transmission phase to be executed are executed in turn, and transmission tracking data of the executed target transmission phase is generated.
S204, the transmission tracking data of each target transmission stage are reported to a file transmission platform so as to complete tracking of the file transmission process to be transmitted.
In the file transmission method provided by the embodiment of the application, in response to a file transmission instruction issued for a file to be transmitted, according to a stored transmission subscription relationship, determining whether a file transmission system indicated by the file transmission instruction has file transmission authority for transmitting the file to a file receiving system; if the file transmission system has the file transmission authority for transmitting the file to be transmitted to the file receiving systems, the file to be transmitted can be transmitted to each file receiving system one by one; in the process of file transmission, sequentially executing the transmission tasks related to each transmission stage to be executed, and recording the transmission tracking data of each executed target transmission stage which indicates the completion condition of the transmission tasks; the transmission tracking data of each target transmission stage is reported to the file transmission platform, so that tracking of the file transmission process is realized, and when an abnormal condition exists in the file transmission process, the abnormal problem can be rapidly determined according to the transmission tracking data, and the purpose of improving the diagnosis of the abnormal problem is further achieved.
Here, for a distributed system, if a file subscription relationship exists among a plurality of application systems arranged in the distributed system, sending and/or receiving of the file can be implemented according to the file subscription relationship; however, for application systems that do not have a file subscription relationship, the file subscription relationship is not capable of sending and/or receiving files between them; therefore, before allowing transmission of files between application systems, it is necessary to determine whether or not a file transmission system that transmits a file to be transmitted has file transmission authority to transmit the file to a file reception system that receives the file to be transmitted.
The transmission subscription relationship can indicate a file transmission relationship between two application systems, for example, the distributed system includes two application systems, an application system a and an application system B, the application system a initiates sending a file to the application system B, where the application system a is considered as a file transmission system, the application system B is considered as a file receiving system, the subscription relationship between the application system a and the application system B needs to be queried before file transmission, and whether the application system a has file transmission permission to send a file to the application system B and/or whether the application system B has file transmission permission to receive a file sent by the application system a are determined according to the subscription relationship.
In step S201, in response to a file transmission instruction issued for a file to be transmitted, based on a transmission subscription relationship stored in the file transmission platform, determining whether a corresponding file subscription relationship exists between a file transmission system for transmitting the file to be transmitted and a file receiving system for receiving the file to be transmitted, which is indicated by the file transmission instruction; that is, it is determined whether the file transfer system has file transfer authority to send the file to be transferred to the file receiving system.
In the scheme provided by the application, the response to the file transmission instruction issued for the file to be transmitted can be specifically that when the user presses the file transmission control, the issued file transmission instruction can be triggered; the user can issue a file transmission instruction through a file transmission control and/or a preset combination key; specifically, the player can transfer the control through the touch file such as fingers, a mouse and the like; or through preset combination keys in the keyboard, for example, ctrl keys, alt keys, a keys and other keys in the keyboard, the preset keys can be set manually according to the requirements of users.
For a distributed system, each application system arranged in the distributed system, whether a file transmission system for transmitting a file or a file receiving system for receiving the file, has a unique system identification, and different transmission subscription relations can be established with other application systems through the unique system identification during registration.
In an embodiment, referring to fig. 3, fig. 3 is a schematic diagram illustrating a transmission right determining process provided in the embodiment of the present application. As shown in fig. 3, the determining, based on the stored transmission subscription relationship, whether the file transmission system indicated by the file transmission instruction has a file transmission authority for transmitting the file to the file receiving system includes:
step S301, for each file receiving system, determining a first system identifier of the file transmitting system and a second system identifier of the file receiving system according to the file transmitting information carried by the file transmitting instruction.
In this step, the transmission subscription relationship between the file receiving system and the file transmitting system needs to be determined for each file receiving system, so that, for each file receiving system, according to the file transmitting information carried by the received file transmitting instruction, the first system identifier of the file transmitting system and the second system identifier of the file receiving system are determined.
Here, the file transfer information includes one or more of a first system identification of the file transfer system, a second system identification of each file receiving system, a phase identification, a processing time, a phase processing result, an instance internet protocol address (instance ip) of a transfer service, an instance process code number (instance pid), an instance port number, a transfer protocol, a file transfer path, a file to be transferred, and a file size.
In the distributed system, the transmission subscription relationship between different application systems is stored in the file transmission platform, so that the file subscription relationship between the file transmission system and the file receiving system is obtained by querying the file transmission platform.
Step S302, determining whether a file subscription relationship exists between the file transmission system and the file receiving system by querying a stored transmission subscription relationship in the file transmission platform by using the first system identifier and the second system identifier.
In the step, a first system identifier of the file transmission system and a second system identifier of the file receiving system are utilized to inquire a transmission subscription relation stored in the file transmission platform, and whether a file subscription relation indicating the file transmission system and the file receiving system exists in the stored transmission subscription relation of the file transmission platform is determined.
Step S303, if a file subscription relationship exists between the file transmission system and the file receiving system, and the file subscription relationship indicates that the file transmission system authorizes the file transmission to the file receiving system, it is determined that the file transmission system has a file transmission authority for transmitting the file to the file receiving system.
In the step, if a file subscription relationship exists between the file transmission system and the file receiving system, at this time, it is further determined whether the file subscription relationship means that the file transmission system can send the file to be sent to the file receiving system; if a file subscription relationship exists between the file transmission system and the file receiving system, and the subscription relationship indicates that the file transmission system authorizes the file transmission to the file receiving system, the file transmission system can be considered to have the file transmission authority for transmitting the file to the file receiving system, and the file transmission system is allowed to transmit the file to be transmitted to the file receiving system.
Step S304, otherwise, determining that the file transmission system does not have the file transmission authority for transmitting the file to the file receiving system.
In the step, if no file subscription relation exists between the file transmission system and the file receiving system, or the file subscription relation exists between the file receiving system and the file subscription system, the file subscription relation indicates that the file transmission system is not authorized to send the file to be transmitted to the file receiving system; at this time, it is considered that the file transfer system does not have the file transfer authority to transfer the file to the file receiving system, and the file transfer system is not allowed to send the file to be transferred to the file receiving system.
For a file to be transmitted, at least one file transmission stage is required to be performed in the process of transmitting the file to be transmitted to the file receiving system, and corresponding transmission tasks are performed in different file transmission stages so as to complete the transmission of the file to be transmitted.
In step S202, if the file transfer system has the file transfer authority for transferring the file to be transferred to the file receiving system, a plurality of transmission stages to be performed, which are required to be undergone for transferring the file to be transferred to the file receiving system, are determined for each file receiving system.
The file to be transmitted may be in a folder form, that is, the description may simultaneously transmit a plurality of files to be transmitted to the file receiving system, and in this case, considering that a plurality of instance ports for receiving the files to be transmitted exist in a server corresponding to the file receiving system, in order to make loads of the respective instance ports balanced, the instance ports for receiving each file to be transmitted need to be reasonably planned before the files to be transmitted are transmitted.
In one embodiment, when the files to be transmitted are plural, step S202 includes: for each file receiving system, determining at least one instance port for receiving the file to be transmitted in a server corresponding to the file receiving system; for each file to be transmitted, determining a target instance port for receiving the file to be transmitted according to the load capacity of each instance port, and determining a plurality of transmission stages to be executed, which are involved in transmitting the file to be transmitted to the target instance port.
In the step, when a plurality of files to be transmitted are transmitted from the file transmission system to the file receiving system, a target instance port most suitable for receiving the files to be transmitted is allocated to each file to be transmitted according to the load of the instance port; specifically, for each file receiving system for receiving the file to be transmitted, determining at least one instance port which can be used for receiving the file to be transmitted in a server corresponding to the file receiving system; comprehensively considering the load capacity of each instance port, so that a target instance port with relatively small load capacity is allocated to the file to be transmitted, and a plurality of transmission stages to be executed, which are involved in transmitting the file to be transmitted to the target instance port, are determined, so that the file to be transmitted is more rapidly transmitted; meanwhile, the load of each instance port at the server side can be balanced.
Here, for the determined multiple transmission phases to be executed, a certain execution sequence is actually provided, and after the transmission task related to the previous transmission phase to be executed is executed, the transmission task related to the next generation transmission phase to be executed can be executed according to the execution sequence, and so on.
In step S203, according to the execution sequence of the multiple transmission stages to be executed, the transmission tasks to be executed in each transmission stage to be executed are executed in turn, and in the process of completing the transmission of the file to be transmitted according to the execution sequence of each transmission stage to be executed, the transmission tracking data of each executed target transmission stage is recorded in real time.
Here, the executed target transmission phase may be a transmission phase to be executed which completes execution successfully, or may be a transmission phase to be executed which fails execution; that is, for a transmission stage to be executed, whether the execution is successful or the execution is failed, the transmission tracking data of the transmission stage to be executed is recorded; the transmission tracking data represent transmission condition description information of a transmission task related to the target transmission stage; the transmission condition description information can clearly describe the transmission condition of the file to be transmitted, for example, the file to be transmitted has completed transmission in the current transmission stage, or the file to be transmitted fails in the current transmission stage, and the failure reasons are abnormal example ports required to be called in the current transmission stage.
In one embodiment, step S203 includes: according to the execution sequence of the plurality of transmission stages to be executed, the transmission tasks related to each transmission stage to be executed are executed in sequence, and after the transmission tasks related to the current transmission stage to be executed or the transmission tasks related to the current transmission stage to be executed are failed to be executed, the current transmission stage to be executed is determined as a target transmission stage; and generating transmission tracking data of the target transmission stage based on the stage information of the target transmission stage and the completion condition of the transmission task related to the target transmission stage.
In the step, according to the execution sequence of a plurality of transmission stages to be executed for completing the transmission of the file to be transmitted, the transmission task related to each transmission stage to be executed is sequentially executed until all the transmission tasks related to the current transmission stage to be executed are completed, and the current transmission stage to be executed after the completion of the execution is determined as a target transmission stage;
or determining the current transmission stage to be executed which is executed but not executed as the target transmission stage until the transmission task in the current transmission stage to be executed fails to execute the subsequent transmission stage to be executed of the file to be transmitted.
For example, 3 transmission stages to be executed need to be completed when the file to be transmitted is completed, the transmission stage to be executed 1, the transmission stage to be executed 2, and the transmission stage to be executed 3, where the execution sequence of the 3 transmission stages to be executed is as follows: the transmission stage 1> to be executed performs the transmission stage 2> to perform the transmission stage 3; according to the execution sequence of the 3 transmission phases to be executed, firstly executing the transmission phase 1 to be executed, and after the transmission task related to the transmission phase 1 to be executed is successfully completed, determining the transmission phase 1 to be executed as an executed target transmission phase; next, according to the execution sequence, executing the transmission stage 2 to be executed, if the transmission task related to the transmission stage 2 to be executed fails to execute, the subsequent transmission stage 3 to be executed cannot be executed again, and at this time, determining the transmission stage 2 to be executed, which fails to execute the transmission task, as the executed target transmission stage; accordingly, since the transmission stage 3 to be executed is not executed, the transmission stage 3 to be executed cannot be determined as the target transmission stage that has been executed.
After determining the executed target transmission stage, generating transmission tracking data of the target transmission stage according to stage information of the executed target transmission stage, such as stage identification, stage starting time, stage receiving time, stage state and the like, which characterize stage details of the target transmission stage, and the completion condition of the transmission task related to the target transmission stage, so that a user can know file transmission condition of the target transmission stage according to the transmission tracking data of the target transmission stage.
Here, the transmission trace data includes one or more of a first system identification of a file transmission system, a system identification of a target receiving system, a file transmission path, a file to be transmitted, a file size, an instance internet protocol address (instance ip) of a transmission service, an instance process code number (instance pid), an instance port number, a transmission protocol, a phase identification, a phase start time, a phase reception time, a phase state, and anomaly information.
In one embodiment, the transmission task related to the current transmission stage to be performed fails to perform, and the file transmission method further includes:
and repeatedly executing the transmission task related to the current transmission stage to be executed until the transmission task related to the current transmission stage to be executed is completed, and then executing the transmission task related to the next transmission stage to be executed corresponding to the current transmission stage to be executed.
In this step, if the transmission task related to the current transmission stage to be executed fails to execute, the transmission task related to the current transmission stage to be executed is repeatedly executed until the transmission task related to the current transmission stage to be executed is executed successfully, that is, until the transmission task related to the current transmission stage to be executed is executed, it is determined that the transmission task related to the next transmission stage to be executed corresponding to the current transmission stage to be executed can be executed continuously.
Or repeatedly executing the transmission task related to the current transmission stage to be executed until the repetition times reach the preset execution times, and generating transmission failure information.
In this step, if the transmission task related to the current transmission stage to be executed fails to execute, the transmission task related to the current transmission stage to be executed is repeatedly executed until the number of times of repeating the transmission task related to the current transmission stage to be executed reaches the preset number of times of executing, it is determined that the subsequent transmission stage to be executed cannot be continuously executed, and transmission failure information including the reason of transmission failure can be generated, so that the user knows information such as the reason of failure of the transmission task execution failure of the current transmission stage to be executed according to the transmission failure information, and further, the user timely adjusts the transmission mode or the transmission strategy of the file to be transmitted according to the transmission failure information.
In one embodiment, the file transfer method further includes: and generating transmission success information when all transmission tasks related to the transmission stage to be executed are completed.
In this step, in order to timely inform the user that the transmission of the file to be transmitted has been completed, after the transmission tasks related to all the transmission stages to be performed are completed, transmission success information is generated, so that the user is informed that the file to be transmitted has been successfully transmitted to each file receiving system through the transmission success information.
Or when the transmission task of any transmission stage to be executed fails to execute, generating transmission failure information, wherein the transmission failure information is reference information for adjusting the transmission mode of the file to be transmitted.
In the step, in order to enable a user to clearly know abnormal conditions encountered in the transmission process, so that the user can timely adjust the transmission mode of the file to be transmitted, after the transmission task of any transmission stage to be executed fails to execute, transmission failure information comprising failure reasons can be generated; the transmission failure information is reference information for adjusting the file to be transmitted, so that a user knows information such as failure reasons of failure in execution of a transmission task in any transmission stage to be executed according to the transmission failure information, and further, a transmission mode or a transmission strategy of the file to be transmitted is timely adjusted.
In step S204, the transmission tracking data of each target transmission stage is reported to the file transmission platform, so as to complete tracking of the file transmission process to be transmitted.
Here, the transmission stage to be undergone by transmitting one file to be transmitted includes a reception request stage, a right judgment stage, a file scanning stage, an instance information acquisition stage, a transmission connection stage, a file transmission stage, and a transmission end stage.
The receiving of the transmission tracking data corresponding to the request phase comprises: a system identification (e.g., a first system identification of a file transfer system, a system identification of a target receiving system), a file (or folder) to be transferred, a phase identification of a receiving request phase, a phase start time, a phase receiving time, a phase status, a phase processing result, and a processing time.
The transmission tracking data corresponding to the authority authentication stage comprises: one or more of a system identification (e.g., a first system identification of a file transfer system, a system identification of a target receiving system), a file (or folder) to be transferred, a phase identification of a permission determination phase, a phase start time, a phase reception time, a phase state, a phase processing result, a processing time, a local folder permission, and a server folder permission of the target receiving system.
The transmission tracking data corresponding to the file scanning stage comprises: a system identification (e.g., a first system identification of a file transfer system, a system identification of a target receiving system), a file (or folder) to be transferred, a phase identification of a file scanning phase, a phase start time, a phase reception time, a phase state, a phase processing result, a processing time, a list of files to be transferred, and a transfer protocol.
The transmission tracking data corresponding to the example information acquisition stage comprises: the system identification (e.g., a first system identification of a file transfer system, a system identification of a target receiving system), a file (or folder) to be transferred, a phase identification of an instance information acquisition phase, a phase start time, a phase reception time, a phase state, a phase processing result, a processing time, an instance ip of a transfer service, an instance pid, and an instance port number.
The transmission tracking data corresponding to the transmission connection stage comprises: a system identification (e.g., a first system identification of a file transfer system, a system identification of a target receiving system), a file (or folder) to be transferred, a phase identification of a transfer connection phase, a phase start time, a phase reception time, a phase state, a phase processing result, a processing time, an instance ip of a transfer service, an instance pid, an instance port number, and a connection state.
The transmission tracking data corresponding to the file transmission stage comprises: system identification (e.g., first system identification of file transfer system, system identification of target receiving system), file (or folder) to be transferred, phase identification of file transfer phase, phase start time, phase reception time, phase state, phase processing result, processing time, instance ip of transfer service, instance pid, instance port number, file in transfer, target path, and file size.
The transmission tracking data corresponding to the transmission ending stage includes: system identification (e.g., first system identification of file transfer system, system identification of target receiving system), file (or folder) to be transferred, stage identification of end stage of transfer, stage start time, stage receive time, stage state, stage processing result, processing time, instance ip of transfer service, instance pid, instance port number, file in transfer, target path, and file size.
In order to assist a user in timely determining the reason of failure in transmission of a file to be transmitted, accurate positioning of an abnormal transmission stage can be achieved by analyzing transmission tracking data; and the data transmission performance of the abnormal transmission stage can be determined by analyzing the transmission tracking data of the abnormal transmission stage.
In one embodiment, the method further comprises: and step 1, determining an abnormal transmission stage with abnormal data transmission from a plurality of target transmission stages by analyzing each transmission tracking data.
In the step, the generated transmission tracking data is analyzed, and an abnormal transmission stage which fails to complete the transmission of the file to be transmitted, namely an abnormal transmission stage of data transmission abnormality, is determined from the executed target transmission stages.
Specifically, for each target transmission stage, whether the target transmission stage is an abnormal transmission stage can be determined according to an abnormal tag which is carried in the transmission tracking data of the target transmission stage and indicates whether the target transmission stage has abnormal data transmission; if the transmission tracking data of the target transmission stage carries an abnormal tag, the target transmission stage can be determined to be an abnormal transmission stage.
Or, whether the target transmission stage is an abnormal transmission stage can be determined according to whether the transmission tracking data of the target transmission stage carries a completion tag representing that the file to be transmitted is completed to be transmitted; if the transmission tracking data of the target transmission stage does not carry the completion tag, the target transmission stage can be determined to be an abnormal transmission stage.
And 2, determining the transmission failure reason of the file to be transmitted in the transmission process of the abnormal transmission stage based on the abnormal marking data carried by the transmission tracking data of the abnormal transmission stage aiming at each abnormal transmission stage.
Here, the information characterizing the transmission condition of the file to be transmitted is recorded in the transmission trace data in the form of data during the target transmission phase, and thus, when there is a need to determine the cause of transmission failure in the abnormal transmission phase, specific analysis can be performed by means of the transmission trace data.
In the step, for each abnormal transmission stage, the transmission failure reason of the transmission failure of the file to be transmitted, which is represented by the abnormal marking data, in the abnormal transmission stage is determined by analyzing the abnormal marking data carried in the transmission tracking data of the abnormal transmission stage.
For example, fixed abnormality flag data may be configured in advance for each transmission failure cause, for example, the abnormality flag data that is preconfigured when the transmission failure cause is transmission authority abnormality is "1", the abnormality flag data that is preconfigured when the transmission failure cause is instance port abnormality is "2", and the abnormality flag data that is preconfigured when the transmission failure cause is server abnormality is "3".
When determining the transmission failure reason of the abnormal transmission stage, if the abnormal marking data carried by the transmission tracking data of the abnormal transmission stage is 2, determining that the transmission failure reason of the file to be transmitted in the abnormal transmission stage is an example port abnormality.
The transmission failure reasons comprise at least one of transmission permission abnormality, instance port abnormality and server abnormality.
And step 3, determining the data transmission performance of the abnormal transmission stage based on the time consumption of the transmission tracking data carried by the transmission tracking data of the abnormal transmission stage.
Here, for a target transmission stage, if the time consumed for data transmission of the file to be transmitted in the target transmission stage is shorter, it may be indicated that the data transmission performance of the target transmission stage is better; conversely, if the data transmission time of the file to be transmitted in the target transmission stage is longer, it may be indicated that the data transmission performance in the target transmission stage is poorer.
In the step, the data transmission performance of the abnormal transmission stage is further determined by referring to the time consumption of transmitting the data of the file to be transmitted in the abnormal transmission stage; specifically, based on the time consumption of data transmission carried in the transmission tracking data of the abnormal transmission stage, the data transmission performance, such as the transmission speed, the transmission rate and the like, of the abnormal transmission stage when the file to be transmitted is determined.
If the data transmission time consumption of the file to be transmitted in the abnormal transmission stage is greater than a preset time consumption threshold, determining that the data transmission performance in the abnormal transmission stage is lower; conversely, if the data transmission time consumption of the file to be transmitted in the abnormal transmission stage is smaller than the preset time consumption threshold, the data transmission performance in the abnormal transmission stage can be determined to be higher; that is, there is a negative correlation between the data transfer performance and the data transfer time consumption. As an example, referring to fig. 4, fig. 4 is a schematic diagram of a file transfer tracking process according to an embodiment of the present application. As shown in fig. 4, the file transmission system initiates transmission of a file to be transmitted, and sends a file transmission instruction to a start container arranged in the same terminal equipment as the file transmission system; the method comprises the steps that a starting container responds to a file transmission instruction, enters a receiving request stage, receives the file transmission instruction sent by a file transmission system, generates transmission tracking data corresponding to the receiving request stage, and reports the transmission tracking data corresponding to the receiving request stage to a file transmission platform; after the starting container successfully receives the file transmission instruction, entering an authority authentication stage, judging whether a file transmission system has file transmission authority for transmitting files to a file receiving system, generating transmission tracking data corresponding to the authority authentication stage, and reporting the transmission tracking data corresponding to the authority authentication stage to the file transmission platform; after the startup container completes the authentication of the file transmission permission, entering a file scanning stage, scanning a file to be transmitted, generating transmission tracking data corresponding to the file scanning stage, and reporting the transmission tracking data corresponding to the file scanning stage to a file transmission platform; after the scanning of the file to be transmitted is completed, an instance information acquisition stage is entered, the instance information of an instance port, corresponding to the file receiving system, for receiving the file is acquired, a target instance port for receiving the file to be transmitted is determined, transmission tracking data corresponding to the instance information acquisition stage is generated, and the transmission tracking data corresponding to the instance information acquisition stage is reported to the file transmission platform; after the acquisition of the instance port information is completed, entering a transmission connection stage, establishing connection with a target instance port for receiving a file to be transmitted in a server corresponding to a file receiving system, generating transmission tracking data corresponding to the transmission connection stage, and reporting the transmission tracking data corresponding to the transmission connection stage to a file transmission platform; after establishing connection with a target instance port, entering a file transmission stage, transmitting a file to be transmitted to a file receiving system, generating transmission tracking data corresponding to the file transmission stage, and reporting the transmission tracking data corresponding to the file transmission stage to a file transmission platform; after the transmission of the file to be transmitted is completed, entering a transmission ending stage, determining that the file to be transmitted is successfully transmitted to a file receiving system, generating transmission tracking data corresponding to the transmission ending stage, and reporting the transmission tracking data corresponding to the transmission ending stage to a file transmission platform; meanwhile, transmission success information is generated to inform the user that the file to be transmitted is successfully transmitted to the file receiving system through the transmission success information.
According to the file transmission method provided by the embodiment of the application, whether a file transmission system indicated by a file transmission instruction has file transmission permission for transmitting a file to a file receiving system is determined based on a stored transmission subscription relation in response to the file transmission instruction issued for the file to be transmitted; if so, determining a plurality of transmission stages to be executed, which are involved in transmitting the file to be transmitted to the file receiving system, aiming at each file receiving system; according to the execution sequence of the plurality of transmission stages to be executed, the transmission tasks related to each transmission stage to be executed are executed in sequence, and transmission tracking data of the executed target transmission stage are generated; and reporting the transmission tracking data of each target transmission stage to a file transmission platform so as to complete tracking of the file transmission process to be transmitted. Therefore, the transmission tracking data representing the completion condition of the transmission task in each transmission stage can be recorded in real time in the file transmission process, the tracking record of the file transmission process is realized, and further, when the file transmission is abnormal, the abnormal problem can be rapidly positioned according to the transmission tracking data in each transmission stage, the diagnosis efficiency of the abnormal problem is improved, and the time cost required for searching the abnormal problem is reduced.
Referring to fig. 5 and 6, fig. 5 is a schematic structural diagram of a document transporting apparatus according to an embodiment of the present application, and fig. 6 is a schematic structural diagram of a second document transporting apparatus according to an embodiment of the present application. As shown in fig. 5, the file transfer device 500 includes:
the permission authentication module 510 is configured to determine, based on a stored transmission subscription relationship, whether a file transmission system indicated by the file transmission instruction has a file transmission permission for transmitting a file to the file receiving system, in response to a file transmission instruction issued for a file to be transmitted;
a stage determining module 520, configured to determine, for each file receiving system, a plurality of transmission stages to be performed involved in transmitting the file to be transmitted to the file receiving system;
a data generating module 530, configured to sequentially execute the transmission tasks related to each transmission stage to be executed according to the execution sequence of the multiple transmission stages to be executed, and generate transmission tracking data of the executed target transmission stage; the transmission tracking data represent transmission condition description information of a transmission task related to the target transmission stage;
the data uploading module 540 is configured to report the transmission tracking data of each target transmission stage to the file transmission platform, so as to complete tracking of the file transmission process to be transmitted.
Further, as shown in fig. 6, the apparatus further includes an abnormality diagnosis module 550, where the abnormality diagnosis module 550 is configured to:
determining an abnormal transmission stage with abnormal data transmission from a plurality of target transmission stages by analyzing each transmission tracking data;
for each abnormal transmission stage, determining a transmission failure reason of the file to be transmitted in the transmission process of the abnormal transmission stage based on the abnormal mark data carried by the transmission tracking data of the abnormal transmission stage; the transmission failure reasons comprise at least one of transmission permission abnormality, instance port abnormality and server abnormality;
determining the data transmission performance of the abnormal transmission stage based on the time consumption of the transmission tracking data carried by the transmission tracking data of the abnormal transmission stage; wherein, the data transmission performance and the data transmission time consumption have a negative correlation.
Further, when the data generating module 530 is configured to sequentially execute the transmission tasks related to each transmission stage to be executed according to the execution sequence of the multiple transmission stages to be executed, and generate the transmission tracking data of the executed target transmission stage, the data generating module 530 is configured to:
According to the execution sequence of the plurality of transmission stages to be executed, the transmission tasks related to each transmission stage to be executed are executed in sequence, and after the transmission tasks related to the current transmission stage to be executed or the transmission tasks related to the current transmission stage to be executed are failed to be executed, the current transmission stage to be executed is determined as a target transmission stage;
generating transmission tracking data of the target transmission stage based on the stage information of the target transmission stage and the completion condition of the transmission task related to the target transmission stage; the transmission tracking data includes one or more of a first system identification of a file transmission system, a system identification of a target receiving system, a file transmission path, a file to be transmitted, a file size, an instance internet protocol address of a transmission service, an instance process code number, an instance port number, a transmission protocol, a phase identification, a phase start time, a phase reception time, a phase state, and anomaly information.
Further, as shown in fig. 6, the apparatus further includes an information generating module 560, where the information generating module 560 is configured to:
after all transmission tasks related to the transmission stage to be executed are completed, generating transmission success information; or alternatively, the first and second heat exchangers may be,
And when the transmission task of any transmission stage to be executed fails to execute, generating transmission failure information, wherein the transmission failure information is reference information for adjusting the transmission mode of the file to be transmitted.
Further, when the authority authentication module 510 is configured to determine, based on the stored transmission subscription relationship, whether the file transmission system indicated by the file transmission instruction has a file transmission right for transmitting the file to the file receiving system, the authority authentication module 510 is configured to:
for each file receiving system, determining a first system identifier of the file transmitting system and a second system identifier of the file receiving system according to file transmitting information carried by the file transmitting instruction;
determining whether a file subscription relationship exists between the file transmission system and the file receiving system by querying a stored transmission subscription relationship in the file transmission platform by using the first system identifier and the second system identifier;
if a file subscription relationship exists between the file transmission system and the file receiving system, the file subscription relationship indicates that the file transmission system authorizes the file transmission to the file receiving system, and the file transmission system is determined to have the file transmission authority for transmitting the file to the file receiving system.
Further, when the file to be transferred is plural, the stage determining module 520 is configured to, for each file receiving system, determine plural stages to be executed involved in transferring the file to be transferred to the file receiving system, where the stage determining module 520 is configured to:
for each file receiving system, determining at least one instance port for receiving the file to be transmitted in a server corresponding to the file receiving system;
for each file to be transmitted, determining a target instance port for receiving the file to be transmitted according to the load capacity of each instance port, and determining a plurality of transmission stages to be executed, which are involved in transmitting the file to be transmitted to the target instance port.
Further, as shown in fig. 6, if the transmission task related to the current transmission stage to be performed fails to be performed, the apparatus further includes a repeated execution module 570, where the repeated execution module 570 is configured to:
repeatedly executing the transmission task related to the current transmission stage to be executed until the transmission task related to the current transmission stage to be executed is completed, and then executing the transmission task related to the next transmission stage to be executed corresponding to the current transmission stage to be executed; or alternatively, the first and second heat exchangers may be,
And repeatedly executing the transmission task related to the current transmission stage to be executed until the repeated times reach the preset execution times, and generating transmission failure information.
In the file transmission device provided by the embodiment of the application, whether the file transmission system indicated by the file transmission instruction has the file transmission authority for transmitting the file to the file receiving system is determined based on the stored transmission subscription relationship in response to the file transmission instruction issued for the file to be transmitted; if so, determining a plurality of transmission stages to be executed, which are involved in transmitting the file to be transmitted to the file receiving system, aiming at each file receiving system; according to the execution sequence of the plurality of transmission stages to be executed, the transmission tasks related to each transmission stage to be executed are executed in sequence, and transmission tracking data of the executed target transmission stage are generated; and reporting the transmission tracking data of each target transmission stage to a file transmission platform so as to complete tracking of the file transmission process to be transmitted. Therefore, the transmission tracking data representing the completion condition of the transmission task in each transmission stage can be recorded in real time in the file transmission process, the tracking record of the file transmission process is realized, and further, when the file transmission is abnormal, the abnormal problem can be rapidly positioned according to the transmission tracking data in each transmission stage, the diagnosis efficiency of the abnormal problem is improved, and the time cost required for searching the abnormal problem is reduced.
Referring to fig. 7, fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 7, the electronic device 700 includes a processor 710, a memory 720, and a bus 730.
The memory 720 stores machine-readable instructions executable by the processor 710, when the electronic device 700 is running, the processor 710 communicates with the memory 720 through the bus 730, and when the machine-readable instructions are executed by the processor 710, the steps of the file transfer method in the method embodiment shown in fig. 1 can be executed, and the specific implementation can be referred to the method embodiment and will not be described herein.
The embodiment of the present application further provides a computer readable storage medium, where a computer program is stored on the computer readable storage medium, and when the computer program is executed by a processor, the steps of the file transmission method in the embodiment of the method shown in fig. 1 may be executed, and a specific implementation manner may refer to the embodiment of the method and will not be described herein.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, and are not repeated herein.
In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. The above-described apparatus embodiments are merely illustrative, for example, the division of the units is merely a logical function division, and there may be other manners of division in actual implementation, and for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some communication interface, device or unit indirect coupling or communication connection, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer readable storage medium executable by a processor. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Finally, it should be noted that: the foregoing examples are merely specific embodiments of the present application, and are not intended to limit the scope of the present application, but the present application is not limited thereto, and those skilled in the art will appreciate that while the foregoing examples are described in detail, the present application is not limited thereto. Any person skilled in the art may modify or easily conceive of the technical solution described in the foregoing embodiments, or make equivalent substitutions for some of the technical features within the technical scope of the disclosure of the present application; such modifications, changes or substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (9)

1. A method of file transfer, the method comprising:
responding to a file transmission instruction issued for a file to be transmitted, and determining whether a file transmission system indicated by the file transmission instruction has file transmission authority for transmitting the file to a file receiving system based on a stored transmission subscription relation;
if so, determining a plurality of transmission stages to be executed, which are involved in transmitting the file to be transmitted to the file receiving system, aiming at each file receiving system;
according to the execution sequence of the plurality of transmission stages to be executed, the transmission tasks related to each transmission stage to be executed are executed in sequence, and transmission tracking data of the executed target transmission stage are generated; the transmission tracking data represent transmission condition description information of a transmission task related to the target transmission stage;
reporting the transmission tracking data of each target transmission stage to a file transmission platform so as to complete tracking of the file transmission process to be transmitted;
the step of sequentially executing the transmission tasks related to each transmission stage to be executed according to the execution sequence of the plurality of transmission stages to be executed and generating the transmission tracking data of the executed target transmission stage comprises the following steps:
According to the execution sequence of the plurality of transmission stages to be executed, the transmission tasks related to each transmission stage to be executed are executed in sequence, and after the transmission tasks related to the current transmission stage to be executed or the transmission tasks related to the current transmission stage to be executed are failed to be executed, the current transmission stage to be executed is determined as a target transmission stage;
generating transmission tracking data of the target transmission stage based on the stage information of the target transmission stage and the completion condition of the transmission task related to the target transmission stage; the transmission tracking data includes one or more of a first system identification of a file transmission system, a system identification of a target receiving system, a file transmission path, a file to be transmitted, a file size, an instance internet protocol address of a transmission service, an instance process code number, an instance port number, a transmission protocol, a phase identification, a phase start time, a phase reception time, a phase state, and anomaly information.
2. The file transfer method according to claim 1, characterized in that the method further comprises:
determining an abnormal transmission stage with abnormal data transmission from a plurality of target transmission stages by analyzing each transmission tracking data;
For each abnormal transmission stage, determining a transmission failure reason of the file to be transmitted in the transmission process of the abnormal transmission stage based on the abnormal mark data carried by the transmission tracking data of the abnormal transmission stage; the transmission failure reasons comprise at least one of transmission permission abnormality, instance port abnormality and server abnormality;
determining the data transmission performance of the abnormal transmission stage based on the time consumption of the transmission tracking data carried by the transmission tracking data of the abnormal transmission stage; wherein, the data transmission performance and the data transmission time consumption have a negative correlation.
3. The file transfer method according to claim 1, characterized in that the method further comprises:
after all transmission tasks related to the transmission stage to be executed are completed, generating transmission success information; or alternatively, the first and second heat exchangers may be,
and when the transmission task of any transmission stage to be executed fails to execute, generating transmission failure information, wherein the transmission failure information is reference information for adjusting the transmission mode of the file to be transmitted.
4. The file transfer method according to claim 1, wherein the determining whether the file transfer system indicated by the file transfer instruction has file transfer authority to transfer the file to the file receiving system based on the stored transfer subscription relationship includes:
For each file receiving system, determining a first system identifier of the file transmitting system and a second system identifier of the file receiving system according to file transmitting information carried by the file transmitting instruction;
determining whether a file subscription relationship exists between the file transmission system and the file receiving system by querying a stored transmission subscription relationship in the file transmission platform by using the first system identifier and the second system identifier;
if a file subscription relationship exists between the file transmission system and the file receiving system, the file subscription relationship indicates that the file transmission system authorizes the file transmission to the file receiving system, and the file transmission system is determined to have the file transmission authority for transmitting the file to the file receiving system.
5. The file transfer method according to claim 1, wherein when the file to be transferred is plural, the determining, for each file receiving system, plural stages of transfer to be performed, which are involved in transferring the file to be transferred to the file receiving system, includes:
for each file receiving system, determining at least one instance port for receiving the file to be transmitted in a server corresponding to the file receiving system;
For each file to be transmitted, determining a target instance port for receiving the file to be transmitted according to the load capacity of each instance port, and determining a plurality of transmission stages to be executed, which are involved in transmitting the file to be transmitted to the target instance port.
6. The file transfer method according to claim 1, wherein if the transfer task related to the current transfer stage to be performed fails to be performed, the method further comprises:
repeatedly executing the transmission task related to the current transmission stage to be executed until the transmission task related to the current transmission stage to be executed is completed, and then executing the transmission task related to the next transmission stage to be executed corresponding to the current transmission stage to be executed; or alternatively, the first and second heat exchangers may be,
and repeatedly executing the transmission task related to the current transmission stage to be executed until the repeated times reach the preset execution times, and generating transmission failure information.
7. A document transfer apparatus, the apparatus comprising:
the permission authentication module is used for responding to a file transmission instruction issued for a file to be transmitted, and determining whether a file transmission system indicated by the file transmission instruction has file transmission permission for transmitting the file to a file receiving system based on a stored transmission subscription relation;
The stage determining module is used for determining a plurality of transmission stages to be executed, which are involved in transmitting the files to be transmitted to the file receiving system, aiming at each file receiving system if the files to be transmitted are transmitted to the file receiving system;
the data generation module is used for sequentially executing the transmission tasks related to each transmission stage to be executed according to the execution sequence of the plurality of transmission stages to be executed and generating transmission tracking data of the executed target transmission stage; the transmission tracking data represent transmission condition description information of a transmission task related to the target transmission stage;
the data uploading module is used for reporting the transmission tracking data of each target transmission stage to the file transmission platform so as to complete tracking of the file transmission process to be transmitted;
the data generating module is used for sequentially executing the transmission tasks related to each transmission stage to be executed according to the execution sequence of the transmission stages to be executed and generating the transmission tracking data of the executed target transmission stage, and the data generating module is used for:
according to the execution sequence of the plurality of transmission stages to be executed, the transmission tasks related to each transmission stage to be executed are executed in sequence, and after the transmission tasks related to the current transmission stage to be executed or the transmission tasks related to the current transmission stage to be executed are failed to be executed, the current transmission stage to be executed is determined as a target transmission stage;
Generating transmission tracking data of the target transmission stage based on the stage information of the target transmission stage and the completion condition of the transmission task related to the target transmission stage; the transmission tracking data includes one or more of a first system identification of a file transmission system, a system identification of a target receiving system, a file transmission path, a file to be transmitted, a file size, an instance internet protocol address of a transmission service, an instance process code number, an instance port number, a transmission protocol, a phase identification, a phase start time, a phase reception time, a phase state, and anomaly information.
8. An electronic device, comprising: a processor, a memory and a bus, said memory storing machine readable instructions executable by said processor, said processor and said memory communicating via said bus when the electronic device is running, said machine readable instructions when executed by said processor performing the steps of the file transfer method according to any of claims 1 to 6.
9. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a computer program which, when executed by a processor, performs the steps of the file transfer method according to any of claims 1 to 6.
CN202210863770.3A 2022-07-21 2022-07-21 File transmission method and device, electronic equipment and readable storage medium Active CN115242778B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210863770.3A CN115242778B (en) 2022-07-21 2022-07-21 File transmission method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210863770.3A CN115242778B (en) 2022-07-21 2022-07-21 File transmission method and device, electronic equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN115242778A CN115242778A (en) 2022-10-25
CN115242778B true CN115242778B (en) 2023-06-27

Family

ID=83676223

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210863770.3A Active CN115242778B (en) 2022-07-21 2022-07-21 File transmission method and device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN115242778B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116016489A (en) * 2022-12-16 2023-04-25 中电金信软件有限公司 File transmission method and device, electronic equipment and readable storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111970332A (en) * 2020-07-28 2020-11-20 苏州浪潮智能科技有限公司 File uploading method and system of web application
CN113868096A (en) * 2021-10-15 2021-12-31 中国建设银行股份有限公司 Asynchronous data transmission monitoring method and device, electronic equipment and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6119535B2 (en) * 2013-09-30 2017-04-26 富士通株式会社 Trace method, processing program, and information processing apparatus
CN113746883B (en) * 2020-05-29 2023-05-19 华为技术有限公司 Link tracking method and system
CN112600928A (en) * 2020-12-17 2021-04-02 北京锐安科技有限公司 File transmission method and device, electronic equipment and medium
CN113986504A (en) * 2021-10-29 2022-01-28 上海商汤临港智能科技有限公司 Point cloud data processing method and device, electronic equipment and storage medium
CN114338650A (en) * 2021-12-23 2022-04-12 中电金信软件有限公司 File transmission method and device, electronic equipment and readable storage medium
CN114338651A (en) * 2021-12-27 2022-04-12 中电金信软件有限公司 File transmission method and device, electronic equipment and readable storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111970332A (en) * 2020-07-28 2020-11-20 苏州浪潮智能科技有限公司 File uploading method and system of web application
CN113868096A (en) * 2021-10-15 2021-12-31 中国建设银行股份有限公司 Asynchronous data transmission monitoring method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN115242778A (en) 2022-10-25

Similar Documents

Publication Publication Date Title
US7756971B2 (en) Method and system for managing programs in data-processing system
WO2011008284A1 (en) Management of an instant message session
CN115242778B (en) File transmission method and device, electronic equipment and readable storage medium
CN110619022B (en) Node detection method, device, equipment and storage medium based on block chain network
US8085422B2 (en) Printing system, printing apparatus, and printing method
US20090271171A1 (en) Emulator device, and a method for testing a test target device
JPWO2006057061A1 (en) Distributed transaction processing method, apparatus, and program
US6966014B2 (en) Method for system obstacle correspondence support
CN115150391B (en) File transmission method and device, electronic equipment and readable storage medium
US20080178182A1 (en) Work state returning apparatus, work state returning method, and computer product
JP2007200134A (en) Log information management device, log information management method, log information management program, and recording medium
CN111131397B (en) Application management method and system, gateway platform, server and storage medium
US8117257B2 (en) Device management using event
CN113778834A (en) System performance testing method and device of application software and computing equipment
CN115687223A (en) Method and device for serial port communication of embedded equipment, embedded equipment and storage medium
US20150142960A1 (en) Information processing apparatus, information processing method and information processing system
CN112130783B (en) File printing method and device
CN117453257B (en) Upgrading method based on hierarchical management, terminal equipment and readable storage medium
CN113193987B (en) Equipment control method and device
CN112165406B (en) Interface message testing method and device, computer equipment and storage medium
CN112737812B (en) Data transmission method and device
US20230297298A1 (en) Information processing apparatus, information processing system, information processing method, image forming apparatus, and image forming system
CN109684353B (en) Numerical value transfer request processing method, device, server and storage medium
JP2022090266A (en) Information processing apparatus, information processing system, information processing method, and program
CN113836040A (en) Application program testing method and device, computer storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant