CN116233118A - Service file transmission method, device, equipment and computer readable storage medium - Google Patents

Service file transmission method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN116233118A
CN116233118A CN202310404584.8A CN202310404584A CN116233118A CN 116233118 A CN116233118 A CN 116233118A CN 202310404584 A CN202310404584 A CN 202310404584A CN 116233118 A CN116233118 A CN 116233118A
Authority
CN
China
Prior art keywords
file
data
receiving end
transmitted
file data
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.)
Pending
Application number
CN202310404584.8A
Other languages
Chinese (zh)
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.)
Ping An Bank Co Ltd
Original Assignee
Ping An Bank 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 Ping An Bank Co Ltd filed Critical Ping An Bank Co Ltd
Priority to CN202310404584.8A priority Critical patent/CN116233118A/en
Publication of CN116233118A publication Critical patent/CN116233118A/en
Pending legal-status Critical Current

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]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/08Protocols for interworking; Protocol conversion

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application discloses a service file transmission method, a device, equipment and a computer readable storage medium, wherein the service file transmission method is applied to a gateway and comprises the following steps: acquiring a file transmission request sent by a file receiving end, wherein the file transmission request comprises a service identification code which is determined by the file receiving end from an interface rule downloaded by a gateway; determining file data to be transmitted from a file receiving end based on configuration data corresponding to the service identification code; and distributing the service identification code to obtain a target interface so that the file receiving end calls the target interface to transmit the file data to be transmitted. According to the scheme, the target interface is determined through the service identification code distributed by the gateway, so that the file receiving end or the file providing end can realize the transmission of file data by calling the target interface, and the problem of cost increase caused by the fact that the file providing end needs to develop too many interfaces according to the scene of the file receiving end is avoided.

Description

Service file transmission method, device, equipment and computer readable storage medium
Technical Field
The present invention relates to the field of interface technologies, and in particular, to a service file transmission method, apparatus, device, and computer readable storage medium.
Background
When the physical file data interaction is carried out between the simple service systems, the file stream is generally directly obtained by adopting an interface calling mode, and because the protocol of the file interface is commonly agreed by the file providing end or the file providing end and the file receiving end, the data transmission quantity and the data use situation of the single interface are always in the range agreed by the two parties. In large business systems, such as shopping platforms of electronic commerce, credit card core systems of banks and the like, large data transmission such as order data, statement and the like can be faced when the large data transmission is carried out with internal or even external business systems, the interface-based file transmission can gradually generate performance bottlenecks, and when business data has a plurality of file receiving ends, the use scenes of different file receiving ends for the file data are different, and a file providing end customizes and develops interfaces one by one in order to adapt to the business scenes, so that the cost is increased.
Disclosure of Invention
The application provides at least one service file transmission method, device, equipment and computer readable storage medium.
The first aspect of the present application provides a service file transmission method, including: acquiring a file transmission request sent by a file receiving end, wherein the file transmission request comprises a service identification code which is determined by the file receiving end from an interface rule downloaded by the gateway; determining file data to be transmitted from the file receiving end based on configuration data corresponding to the service identification code; and distributing the service identification code to obtain a target interface so that the file receiving end calls the target interface to transmit the file data to be transmitted.
In an embodiment, the configuration data includes a file storage directory and a target file data name, and the step of determining file data to be transmitted from the file receiving end based on the configuration data corresponding to the service identification code includes: acquiring the file storage directory and the target file data name; and determining the file data to be transmitted based on the file storage directory and the target file data name.
In an embodiment, the step of determining the file data to be transferred based on the file storage directory and the target file data name includes: matching the names of the file data contained in the file storage directory with the names of the target file data to obtain a matching result; and determining the file data with the matching result larger than a matching threshold value as the file data to be transmitted.
In an embodiment, before the step of obtaining the file transmission request sent by the file receiving end, the method further includes: receiving an interface rule uploaded by a file providing end, wherein the interface rule is obtained by the file providing end after data processing according to a preset interface rule set by the gateway; performing information conversion processing on the interface rule to obtain configuration information, wherein the configuration information comprises a file storage catalog and the file data to be transmitted; and storing the file data to be transmitted into a file storage catalog of the file receiving end.
In an embodiment, the step of storing the file data to be transmitted in the file storage directory includes: comparing the file data contained in the file storage directory with the file data to be transmitted; and if the file data which is the same as the file data to be transmitted exists in the file storage directory, replacing the corresponding file data into the file data to be transmitted.
In an embodiment, the method further comprises: continuously detecting the uploading progress of a preset interface rule uploaded by the file providing end; if the uploading progress is detected to reach the progress threshold, feeding back a successful uploading notification of the file providing end.
In an embodiment, the method further comprises: if the uploading progress is not detected to reach the progress threshold in the preset time, feeding back an uploading abnormal notification of the file providing end; and comparing the uploading abnormal notification with the historical uploading abnormal notification, and feeding back a solution suggestion of the uploading abnormal notification to the file providing end.
A second aspect of the present application provides a service file transmission device, including: the acquisition module is used for acquiring a file transmission request sent by a file receiving end, wherein the file transmission request comprises a service identification code which is determined by the file receiving end from an interface rule downloaded by the gateway; the determining module is used for determining file data to be transmitted from the file receiving end based on the configuration data corresponding to the service identification code; and the transmission module is used for obtaining a target interface based on the service identification code distribution so that the file receiving end calls the target interface to transmit the file data to be transmitted.
A third aspect of the present application provides an electronic device, including a memory and a processor, where the processor is configured to execute program instructions stored in the memory, so as to implement the service file transmission method described above.
A fourth aspect of the present application provides a computer readable storage medium having stored thereon program instructions which, when executed by a processor, implement the above-described service file transmission method.
According to the scheme, the file transmission request sent by the file receiving end is obtained, the file transmission request comprises the service identification code, and the service identification code is determined by the file receiving end from the interface rule downloaded by the gateway; determining file data to be transmitted from the file receiving end based on configuration data corresponding to the service identification code; and distributing the service identification code to obtain a target interface so that the file receiving end calls the target interface to transmit the file data to be transmitted. Therefore, the target interface can be determined through the service identification code distributed by the gateway, so that the file receiving end or the file providing end can realize the transmission of file data by calling the target interface, and the problem of cost increase caused by the fact that the file providing end develops too many interfaces according to the scene of the file receiving end is avoided.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and, together with the description, serve to explain the technical aspects of the application.
FIG. 1 is a schematic diagram of an exemplary embodiment illustrating an implementation environment of a business file transfer method;
FIG. 2 is a flow chart illustrating a business file transmission method according to an exemplary embodiment of the present application;
FIG. 3 is a schematic diagram of configuration data in a service file transmission method according to an exemplary embodiment of the present application;
FIG. 4 is a flowchart of an exemplary embodiment of step S220 in the business file transmission method shown in FIG. 2;
FIG. 5 is a flowchart illustrating an exemplary embodiment of the business file transmission method shown in FIG. 2 before step S210;
fig. 6 is a schematic diagram of a gateway after performing conversion processing on an interface protocol uploaded by a file providing end in a service file transmission method according to an exemplary embodiment of the present application;
FIG. 7 is a schematic diagram of a message notifier in a service file transmission method according to an exemplary embodiment of the present application;
fig. 8 is a schematic diagram of a gateway after performing conversion processing on an interface protocol downloaded by a file receiving end in a service file transmission method according to an exemplary embodiment of the present application;
FIG. 9 is a block diagram of a business file transmission device shown in an exemplary embodiment of the present application;
FIG. 10 is a schematic diagram of an embodiment of an electronic device of the present application;
FIG. 11 is a schematic diagram of an embodiment of a computer-readable storage medium of the present application.
Detailed Description
The following describes the embodiments of the present application in detail with reference to the drawings.
In the following description, for purposes of explanation and not limitation, specific details are set forth such as the particular system architecture, interfaces, techniques, etc., in order to provide a thorough understanding of the present application.
The term "and/or" is herein merely an association relationship describing an associated object, meaning that there may be three relationships, e.g., a and/or B, may represent: a exists alone, A and B exist together, and B exists alone. In addition, the character "/" herein generally indicates that the front and rear associated objects are an "or" relationship. Further, "a plurality" herein means two or more than two. In addition, the term "at least one" herein means any one of a plurality or any combination of at least two of a plurality, for example, including at least one of A, B, C, and may mean including any one or more elements selected from the group consisting of A, B and C.
Firstly, it should be noted that when physical file data interaction is performed between simple service systems, the file stream is generally obtained directly by adopting an interface calling mode, and because the protocol of the file interface is agreed by the file providing end or the file receiving end together, the data transmission quantity and the data use situation of the single interface are always in the range agreed by both parties. In large business systems, such as shopping platforms of electronic commerce, credit card core systems of banks and the like, large data transmission such as order data, statement and the like can be faced when the large data transmission is carried out with internal or even external business systems, the interface-based file transmission can gradually generate performance bottlenecks, and when business data has a plurality of file receiving ends, the use scenes of different file receiving ends for the file data are different, and a file providing end customizes and develops interfaces one by one in order to adapt to the business scenes, so that the cost is increased.
Based on this, the embodiment of the application proposes a service file transmission method, which specifically includes: the method comprises the steps that a file transmission request sent by a file receiving end is obtained, wherein the file transmission request comprises a service identification code which is determined by the file receiving end from an interface rule downloaded by a gateway; determining file data to be transmitted from a file receiving end based on configuration data corresponding to the service identification code; and distributing the service identification code to obtain a target interface so that the file receiving end calls the target interface to transmit the file data to be transmitted. Therefore, the target interface can be determined through the service identification code distributed by the gateway, so that the file receiving end or the file providing end can realize the transmission of file data by calling the target interface, and the problem of cost increase caused by the fact that the file providing end develops too many interfaces according to the scene of the file receiving end is avoided.
Fig. 1 is a schematic diagram of an implementation environment of a service file transmission method according to an exemplary embodiment. The implementation environment includes a gateway 110, a file receiving end 120 and a file providing end 130, and the gateway 110 establishes a wired or wireless network connection with the file receiving end 120 and the file providing end 130 in advance, respectively.
As shown in fig. 1, in the service file transmission process, the file providing end 130 uploads the file data according to the interface protocol provided by the gateway 110, and the file receiving end 120 downloads the file data according to the interface protocol provided by the gateway 110, so as to achieve unification of the uploading, downloading and transmission specifications of the file data. Then, the gateway 110 receives a file transmission request sent by the file receiving end 120, the file transmission request includes a service identification code, the service identification code is determined by an interface rule downloaded by the file receiving end 120 from the gateway 110, the gateway 110 determines file data to be transmitted from the file receiving end 120 based on configuration data corresponding to the service identification code, then the gateway 110 obtains a target interface based on service identification code distribution, and the file receiving end 120 invokes the target interface to transmit the file data to be transmitted.
The file providing end 130 or the file receiving end 120 shown in fig. 1 may be any terminal device supporting file data transmission, such as a smart phone, a vehicle-mounted computer, a tablet computer, a notebook computer, or a wearable device, but is not limited thereto. Gateway (Gateway) is also called Gateway and protocol converter. The gateway realizes network interconnection above the network layer, is a complex network interconnection device, and is only used for network interconnection with two different higher-layer protocols. The gateway may be used for both wide area network and local area network interconnections. In other embodiments, the gateway 110 may be a server, for example, an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs (Content Delivery Network, content distribution networks), and basic cloud computing services such as big data and artificial intelligence platforms, which are not limited herein. The gateway 110 in fig. 1 may communicate with the file receiving end 120 and the file providing end 130 through wireless networks such as 3G (third generation mobile information technology), 4G (fourth generation mobile information technology), 5G (fifth generation mobile information technology), and the like, which is not limited herein.
Referring to fig. 2, fig. 2 is a flowchart illustrating a service file transmission method according to an exemplary embodiment of the present application. The method may be applied to the implementation environment shown in fig. 1 and is specifically performed by gateway 110 in the implementation environment. It should be understood that the method may be adapted to other exemplary implementation environments and be specifically executed by devices in other implementation environments, and the implementation environments to which the method is adapted are not limited by the present embodiment.
The service file transmission method provided in the embodiment of the present application is described in detail below with the gateway as a specific execution body.
As shown in fig. 2, in an exemplary embodiment, the service file transmission method at least includes steps S210 to S230, which are described in detail as follows:
step S210, a file transmission request sent by a file receiving end is obtained.
The file transfer request is a file interaction instruction directed to the gateway. Wherein, the file transmission request comprises a service identification code. The service identification code (sceneNo) is a service scene ID uniformly distributed by the gateway and is used for searching configuration data by the gateway, and the service identification code (sceneNo) is obtained by the file receiving end when the file is downloaded based on an interface protocol provided by the gateway, namely, the file receiving end is determined when the download interaction specification is uniform. It should be noted that, the file transmission request may be sent to the gateway by the file receiving end. In other embodiments, the file transfer request may also be sent to the gateway by the file provider, which is not limited in this embodiment of the present application.
In the embodiment of the application, the gateway receives a file transmission instruction sent by the file receiving end.
Step S220, determining the file data to be transmitted from the file receiving end based on the configuration data corresponding to the service identification code.
The service identifier allocated by the gateway corresponds to configuration data, and the configuration data may include, for example, a source file data type, a storage address of the source file data, a specific file directory in which the file data is stored in the opposite server, and the like. The details of the configuration data corresponding to the service identifier can be seen in fig. 3, and the configuration data protocol, username, ipAddress, password, port, networkPolicy is shown in fig. 3. The protocol describes Sftp/ftp/http, the type corresponding to the protocol is a reference type String, and the example value corresponding to the protocol can be Sftp; the usernames describe login account numbers, and the type corresponding to the usernames is a reference type String; the description of the ipAddress is a file service address, the ipAddress is an interface address when the porprotocol is http, other types are ip addresses, the type corresponding to the ipAddress is a reference type String, and the example value corresponding to the ipAddress can be 192.168.0.1; the password described by the password is a password for logging in the file server, and can be an RSA key, the type corresponding to the password is a reference type String, and the example value corresponding to the password can be pwd@123; port describes an interface for logging in a file server, the type corresponding to the port is a reference type String, and an example value corresponding to the port can be 22; networkPolicy describes WLAN/leased_line, where WLAN represents public network transmission and leased_line represents private LINE transmission, which is distinguished because there is a difference when proxy access is involved in network transmission, the type corresponding to networkPolicy is a reference type String, and the example value corresponding to networkPolicy may be WLAN.
The file data to be transmitted refers to data which is required by the file receiving end to request the gateway distribution interface to transmit.
In the embodiment of the application, the file providing end stores the file data to be transmitted to the opposite server, namely the file receiving end, through the gateway in advance. Therefore, the gateway needs to determine the file data to be transmitted from the file receiving end according to the configuration data corresponding to the service identification code.
Step S230, a target interface is obtained based on the service identification code distribution, so that the file receiving end calls the target interface to transmit the file data to be transmitted.
The target interface is an interface allocated by the gateway according to the service identification code. The interface is developed by the gateway, so that the file providing end does not receive and customize according to the requirement of the file receiving end, and the file receiving end focuses on the business processing after the file data is acquired.
The gateway allocates interfaces according to the service identification codes to obtain target interfaces, so that the file receiving end can directly call the target interfaces to transmit file data. The service identifier in this case corresponds to the interface identifier.
It can be seen that, in the service file transmission method of the embodiment of the present application, by obtaining a file transmission request sent by a file receiving end, where the file transmission request includes a service identification code, where the service identification code is determined by an interface rule downloaded by the file receiving end from a gateway; determining file data to be transmitted from a file receiving end based on configuration data corresponding to the service identification code; and distributing the service identification code to obtain a target interface so that the file receiving end calls the target interface to transmit the file data to be transmitted. Therefore, the target interface can be determined through the service identification code distributed by the gateway, so that the file receiving end or the file providing end can realize the transmission of file data by calling the target interface, and the problem of cost increase caused by the fact that the file providing end develops too many interfaces according to the scene of the file receiving end is avoided.
On the basis of the above embodiments, referring to fig. 4, fig. 4 is a flowchart of an exemplary embodiment of step S220 in the service file transmission method shown in fig. 2. Specifically, the process of determining the file data to be transmitted from the file receiving end in step S220 based on the configuration data corresponding to the service identification code further includes the following steps:
step S410, a file storage directory and a target file data name are acquired.
The file storage directory is used to locate which directory the file provider is uploading to the file receiver through the gateway.
The target file data name is used to determine which file the file provider uploaded to the file receiver through the gateway.
The gateway determines a file storage directory and a destination file data name in the configuration data. It should be noted that, the file storage directory may be represented by a filePath, and the file data name may be represented by a fileName.
Step S420, determining file data to be transmitted based on the file storage directory and the target file data name.
The gateway matches the name of the file data in the file storage directory with the name of the target file data to obtain a matching result, judges whether the matching result is larger than a matching threshold value, and if so, determines that the corresponding file data is the file data to be transmitted, namely the file data required to be transmitted by the file receiving end.
It can be seen that, according to the service file transmission method of the embodiment of the present application, the file data to be transmitted is determined according to the matching result between the name of the file data and the name of the target file data included in the file storage directory, so that the file data to be transmitted can be accurately determined.
On the basis of the above embodiments, the gateway according to the embodiments of the present application unifies interface protocols of the file providing end and the file receiving end. For the file provider, the gateway unifies a standard file upload protocol, which may be an interface or a file server, so that the file provider does not provide interface customization for the requirements of the file receiver. For the file receiving end, the standard file downloading protocol provided by the docking gateway enables the file receiving end to focus on how to perform service processing after acquisition, even automatically extracts and converts structurable file data, and then directly stores the structuralized service data into a service database of the file receiving end. Therefore, the gateway serves as an intermediate layer and accepts a non-business processing function of file interaction between the file providing end and the file receiving end.
Referring to fig. 5 for details, fig. 5 is a schematic flow chart of an exemplary embodiment before step S210 in the service file transmission method shown in fig. 2. Specifically, before the file transmission request sent by the file receiving end is obtained in step S210, the service file transmission method in the embodiment of the present application further includes the following steps:
step S510, receiving an interface rule uploaded by a file providing end, wherein the interface rule is obtained after the file providing end performs data processing according to a preset interface rule set by a gateway.
Considering that the file transmission is bidirectional, the gateway provides the file providing terminal with the uploaded standard protocol, and provides the file receiving terminal with the downloaded standard protocol, so that the file providing terminal uploads the file data according to the preset interface rule set by the gateway, namely the file providing terminal uploads the file data according to the standard protocol provided by the gateway, and then the gateway receives the interface rule uploaded by the file providing terminal and performs conversion processing on the file data in the received interface rule. It should be noted that, at this time, the interface rule received by the gateway is a rule that the file providing end performs data filling according to a standard protocol.
For example, referring to fig. 6, a field name, a type, whether to fill, describe and an example value after the gateway converts an interface protocol uploaded by the file provider are shown in fig. 6. Wherein, the app ID represents a service ID or a merchant application ID, the type corresponding to the app ID is a reference type String, the example value corresponding to the app ID may be a nok1ds27qf, and the app ID is a mandatory item; sceneNo represents a scene identification code, is uniformly distributed by a gateway and is used for the gateway to search configuration information, the type corresponding to the sceneNo is a reference type String, the example value corresponding to the appId can be S001, and the appId is a mandatory item; the requetId represents a request ID, has uniqueness, and corresponds to the type of the requetId as a reference type String, and the appId as a mandatory item; the sourceFileType represents source file source types, namely source types of file data uploaded by a file providing end, and the source file source types can be http, wefiles or udmp, the type corresponding to the sourceFileType is a reference type String, the example value corresponding to the sourceFileType can be wefiles, and the sourceFileType is a mandatory item; the filePath represents a target file directory, namely a file storage directory, the type corresponding to the filePath is a reference type String, and the filePath is an unnecessary filling item; fileName represents the name of the target file, the type corresponding to fileName is the reference type String, the example value corresponding to fileName can be readme.txt, and sourcefileType is the necessary padding item; isNotice represents whether to cover or not, and when the file providing end is judged to store the uploaded file data to the file receiving end through the gateway, the file data contained in the file storage directory and the file data to be transmitted are compared, if the file data which is the same as the file data to be transmitted exists in the file storage directory, the corresponding file data is replaced to be the file data to be transmitted, namely, the covering operation is performed, at the moment, isNotice is 1, if the file data which is different from the file data to be transmitted exists in the file storage directory, the covering operation is not performed, at the moment, isNotice is 0, and in addition, the type corresponding to isNotice is a reference type String, and isNotice is an unnecessary filling item; the notcheTag is a tag used for filtering in the notification topic, the type corresponding to the notcheTag is a reference type String, and the notcheTag is a non-mandatory item. The notification message body may refer to fig. 7, and specifically includes a status code, a description and a request code, where a field name of the status code is a responseCode, a type corresponding to the responseCode is a reference type String, and an example value corresponding to the responseCode may be 000000; the field name is responsmsg, the type corresponding to the responsmsg is the reference type String, and the example value corresponding to the responsmsg can be successful; the field name of the request code is the requestId, and the type corresponding to the requestId is the reference type String.
In addition, it should be noted that, when the file providing end uploads the file data, in order to reduce the waiting time of the file providing end during uploading, in this embodiment of the present application, a thread pool asynchronous uploading mode is used, that is, the file providing end can operate the other after the file data to be uploaded is given to the gateway, the gateway continuously detects the uploading progress of the preset interface rule uploaded by the file providing end, and if the uploading progress is detected to reach the progress threshold, the notification of success of uploading by the file providing end is fed back. That is, after the asynchronous uploading is successful by using the thread pool, the gateway sends a notification of successful uploading by the RocketMQ. If the progress of uploading is not detected to reach the progress threshold in the lasting preset time, uploading abnormal notification by the feedback file providing end, wherein the uploading abnormal notification can be caused by network failure or service unavailability, at the moment, the gateway can record file transmission abnormality through the service identification code and compare the uploading abnormal notification with the historical uploading abnormal notification so as to trace back the abnormality problem, and then the feedback file providing end uploads the solution suggestion of the abnormal notification, or the file receiving end or the gateway carries out compensation processing, namely retry processing, wherein the compensation processing is actively processed by the file receiving end and the gateway.
For the file receiving end, the file receiving end can subscribe to the RocketMQ through the gateway, after the file providing end uploads successfully, the gateway can mark the corresponding uploading success notice according to the non-nettag label of the file receiving end and correspondingly send the uploading success notice to the file receiving end. Wherein, the messageId is identified by the notctieTag_RequestId, and when the notctieTag is empty, the appId_RequestId is used for notification.
With continued reference to fig. 8, fig. 8 shows a field name, a type, whether to fill, describe, and an exemplary value determined by the file receiving end after the downloading process according to the interface protocol provided by the gateway.
And step 520, performing information conversion processing on the interface rule to obtain configuration information, wherein the configuration information comprises a file storage directory and file data to be transmitted.
The gateway performs information conversion processing on the acquired interface rule to obtain configuration data, where the configuration data may be each field name in fig. 7 or fig. 8, file data corresponding to the field name, and the like.
And step 530, storing the file data to be transmitted into a file storage directory of the file receiving end.
The gateway stores the file data to be transmitted uploaded by the file providing end to the opposite server, namely, the file data is stored in a file storage catalog of the file receiving end.
It can be seen that, in the service file transmission method of the embodiment of the present application, the file receiving end and the file providing end perform interface call through the standard protocol provided by the gateway, transmit the unique service identification code allocated by the gateway, after the gateway determines the configuration data in the file service according to the service identification code, upload and download the file according to the pre-configured file interaction protocol, and then only need to add the service scenario at the gateway layer when the service scenarios of both sides are added.
Fig. 9 is a block diagram of a service file transmission apparatus according to an exemplary embodiment of the present application. As shown in fig. 9, the exemplary service file transmission apparatus 900 includes: an acquisition module 910, a determination module 920, and a transmission module 930. Specifically:
the obtaining module 910 is configured to obtain a file transmission request sent by the file receiving end, where the file transmission request includes a service identifier, and the service identifier is determined by an interface rule downloaded by the file receiving end from the gateway.
The determining module 920 is configured to determine file data to be transmitted from the file receiving end based on the configuration data corresponding to the service identification code.
And the transmission module 930 is configured to obtain a target interface based on the service identifier, so that the file receiving end invokes the target interface to perform transmission processing on the file data to be transmitted.
In the exemplary service file transmission device, a file transmission request sent by a file receiving end is obtained, wherein the file transmission request comprises a service identification code which is determined by an interface rule downloaded by the file receiving end from a gateway; determining file data to be transmitted from a file receiving end based on configuration data corresponding to the service identification code; and distributing the service identification code to obtain a target interface so that the file receiving end calls the target interface to transmit the file data to be transmitted. Therefore, the target interface can be determined through the service identification code distributed by the gateway, so that the file receiving end or the file providing end can realize the transmission of file data by calling the target interface, and the problem of cost increase caused by the fact that the file providing end develops too many interfaces according to the scene of the file receiving end is avoided.
The functions of each module may be described in the embodiments of the service file transmission method, which is not described herein.
Referring to fig. 10, fig. 10 is a schematic structural diagram of an embodiment of an electronic device of the present application. The electronic device 100 comprises a memory 101 and a processor 102, the processor 102 being configured to execute program instructions stored in the memory 101 to implement the steps of any of the above-described embodiments of the method for transferring a business file. In one particular implementation scenario, electronic device 100 may include, but is not limited to: the electronic device 100 may also include mobile devices such as a notebook computer and a tablet computer, and is not limited herein.
In particular, the processor 102 is configured to control itself and the memory 101 to implement the steps of any of the business file transmission method embodiments described above. The processor 102 may also be referred to as a CPU (Central Processing Unit ). The processor 102 may be an integrated circuit chip having signal processing capabilities. The processor 102 may also be a general purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a Field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. In addition, the processor 102 may be commonly implemented by an integrated circuit chip.
According to the scheme, the file transmission request sent by the file receiving end is obtained, the file transmission request comprises the service identification code, and the service identification code is determined by the interface rule downloaded by the file receiving end from the gateway; determining file data to be transmitted from a file receiving end based on configuration data corresponding to the service identification code; and distributing the service identification code to obtain a target interface so that the file receiving end calls the target interface to transmit the file data to be transmitted. Therefore, the target interface can be determined through the service identification code distributed by the gateway, so that the file receiving end or the file providing end can realize the transmission of file data by calling the target interface, and the problem of cost increase caused by the fact that the file providing end develops too many interfaces according to the scene of the file receiving end is avoided.
Referring to fig. 11, fig. 11 is a schematic structural diagram of an embodiment of a computer readable storage medium of the present application. The computer readable storage medium 110 stores program instructions 111 that can be executed by a processor, where the program instructions 111 are configured to implement the steps in any of the above-described embodiments of a service file transmission method.
According to the scheme, the file transmission request sent by the file receiving end is obtained, the file transmission request comprises the service identification code, and the service identification code is determined by the interface rule downloaded by the file receiving end from the gateway; determining file data to be transmitted from a file receiving end based on configuration data corresponding to the service identification code; and distributing the service identification code to obtain a target interface so that the file receiving end calls the target interface to transmit the file data to be transmitted. Therefore, the target interface can be determined through the service identification code distributed by the gateway, so that the file receiving end or the file providing end can realize the transmission of file data by calling the target interface, and the problem of cost increase caused by the fact that the file providing end develops too many interfaces according to the scene of the file receiving end is avoided.
In some embodiments, functions or modules included in an apparatus provided by the embodiments of the present disclosure may be used to perform a method described in the foregoing method embodiments, and specific implementations thereof may refer to descriptions of the foregoing method embodiments, which are not repeated herein for brevity.
The foregoing description of various embodiments is intended to highlight differences between the various embodiments, which may be the same or similar to each other by reference, and is not repeated herein for the sake of brevity.
In the several embodiments provided in the present application, it should be understood that the disclosed methods and apparatus may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of modules or units is merely a logical functional division, and there may be additional divisions of actual implementation, e.g., 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 an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical, or other forms.
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 integrated units may be implemented in hardware or in software functional units. The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in part or all or part of the technical solution contributing to the prior art or in the form of a software product stored in a storage medium, including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform all or part of the steps of the methods of 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 (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.

Claims (10)

1. A method for transmitting a service file, wherein the method is applied to a gateway, and the method comprises:
acquiring a file transmission request sent by a file receiving end, wherein the file transmission request comprises a service identification code which is determined by the file receiving end from an interface rule downloaded by the gateway;
determining file data to be transmitted from the file receiving end based on configuration data corresponding to the service identification code;
and distributing the service identification code to obtain a target interface so that the file receiving end calls the target interface to transmit the file data to be transmitted.
2. The method according to claim 1, wherein the configuration data includes a file storage directory and a destination file data name, and the step of determining file data to be transmitted from the file receiving end based on the configuration data corresponding to the service identification code includes:
acquiring the file storage directory and the target file data name;
and determining the file data to be transmitted based on the file storage directory and the target file data name.
3. The method of claim 2, wherein the step of determining the file data to be transferred based on the file storage directory and the target file data name comprises:
matching the names of the file data contained in the file storage directory with the names of the target file data to obtain a matching result;
and determining the file data with the matching result larger than a matching threshold value as the file data to be transmitted.
4. The method of claim 1, wherein prior to the step of obtaining the file transfer request sent by the file receiving terminal, the method further comprises:
receiving an interface rule uploaded by a file providing end, wherein the interface rule is obtained by the file providing end after data processing according to a preset interface rule set by the gateway;
performing information conversion processing on the interface rule to obtain configuration information, wherein the configuration information comprises a file storage catalog and the file data to be transmitted;
and storing the file data to be transmitted into a file storage catalog of the file receiving end.
5. The method of claim 4, wherein the step of storing the file data to be transferred into the file storage directory comprises:
comparing the file data contained in the file storage directory with the file data to be transmitted;
and if the file data which is the same as the file data to be transmitted exists in the file storage directory, replacing the corresponding file data into the file data to be transmitted.
6. The method according to claim 4, wherein the method further comprises:
continuously detecting the uploading progress of a preset interface rule uploaded by the file providing end;
if the uploading progress is detected to reach the progress threshold, feeding back a successful uploading notification of the file providing end.
7. The method of claim 6, wherein the method further comprises:
if the uploading progress is not detected to reach the progress threshold in the preset time, feeding back an uploading abnormal notification of the file providing end;
and comparing the uploading abnormal notification with the historical uploading abnormal notification, and feeding back a solution suggestion of the uploading abnormal notification to the file providing end.
8. A service file transmission device, the device comprising:
the acquisition module is used for acquiring a file transmission request sent by a file receiving end, wherein the file transmission request comprises a service identification code which is determined by the file receiving end from an interface rule downloaded by the gateway;
the determining module is used for determining file data to be transmitted from the file receiving end based on the configuration data corresponding to the service identification code;
and the transmission module is used for obtaining a target interface based on the service identification code distribution so that the file receiving end calls the target interface to transmit the file data to be transmitted.
9. An electronic device comprising a memory and a processor for executing program instructions stored in the memory to implement the method of any one of claims 1 to 7.
10. A computer readable storage medium having stored thereon program instructions, which when executed by a processor, implement the method of any of claims 1 to 7.
CN202310404584.8A 2023-04-12 2023-04-12 Service file transmission method, device, equipment and computer readable storage medium Pending CN116233118A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310404584.8A CN116233118A (en) 2023-04-12 2023-04-12 Service file transmission method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310404584.8A CN116233118A (en) 2023-04-12 2023-04-12 Service file transmission method, device, equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN116233118A true CN116233118A (en) 2023-06-06

Family

ID=86582807

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310404584.8A Pending CN116233118A (en) 2023-04-12 2023-04-12 Service file transmission method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN116233118A (en)

Similar Documents

Publication Publication Date Title
CN110311983B (en) Service request processing method, device and system, electronic equipment and storage medium
EP3253023A1 (en) Method for accessing cloud service and access device
CN111163130B (en) Network service system and data transmission method thereof
CN108810123B (en) Method and apparatus for provisioning mobile cellular network services
CN101729491B (en) Method, device and system for enhancing application reliability of script-based business
CN111818158B (en) Gateway control method, device, electronic equipment and storage medium
CN110719221B (en) Instant messaging method, device, equipment and storage medium
US20100199333A1 (en) System and method for providing device management service to electronic device having no broadband communication module
CN111245918A (en) Service request transmission method and device
CN111491037A (en) Communication method with object storage server through SFTP data stream
CN113423120A (en) Data distribution processing method and device based on private network terminal and electronic equipment
CN112217845B (en) Data transmission method based on Netconf protocol and related equipment
CN111262779A (en) Method, device, server and system for acquiring data in instant messaging
CN114979144B (en) Cloud edge communication method and device and electronic equipment
CN116233118A (en) Service file transmission method, device, equipment and computer readable storage medium
CN110943975B (en) Service registration method, device, computer equipment and storage medium
EP1641201B1 (en) Electronic mail charging system and method
CN112383617B (en) Method, device, terminal equipment and medium for performing long connection
CN114048028A (en) Service calling method and device, storage medium and electronic equipment
CN114915508A (en) Apparatus, method and computer program for network apparatus
CN112714068A (en) Method, device and system for processing coded image, storage medium and electronic device
CN110636114A (en) Customer service access method, access system, service system and cloud platform
CN114500302B (en) ICE service arrangement method, ICE service arrangement device, terminal equipment and storage medium
CN111512612A (en) Method for remote management of devices connected to a residential gateway
CN114285658B (en) System mutual jump login-free method based on WeChat authorization login

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