A file transmission method and device, electronic equipment and readable storage medium
By adopting a cloud-native architecture and connecting the cluster with the query node of the management console in the distributed system, direct file transfer between application systems is achieved, which solves the problem of business processing complexity caused by centralized file processing, improves transmission efficiency, and supports independent upgrades.
Patent Information
- Application Number
- CN202211627655.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-16
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2042-12-16
AI Technical Summary
Existing distributed file storage systems use a centralized file processing approach when handling pending tasks, which leads to complex and inefficient business processing.
By adopting a cloud-native architecture in a distributed system, the transfer path of the target file can be determined by querying the cluster associated with the node in the management console. This enables direct file transfer from the transfer endpoint of the second application system to the transfer endpoint of the first application system, reducing the storage and distribution processes of intermediate systems.
It improves the efficiency of file transmission between application systems, simplifies business processing, reduces business complexity, and supports independent upgrades and deployments of application systems and transmission endpoints.
Smart Images

Figure CN116233107B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of communication, in particular to a file transmission method and device, electronic equipment and readable storage medium. BACKGROUND
[0002] With the continuous development of network technology, more and more enterprises rely on network systems to complete various business processing. At present, the distributed file storage system selected by enterprises adopts a centralized processing file mode to complete the processing of pending business; that is, when there is a need for coordinated processing of pending business, the department initiating the business processing uniformly sends and stores the files required for processing the pending business in the specified file storage location of the distributed system, and other cooperating departments download the corresponding files from the file storage location to complete the processing. In this way, the business processing process is relatively complex, and the processing efficiency of the pending business is low. SUMMARY
[0003] Therefore, the purpose of the present application is to provide a file transmission method and device, electronic equipment and readable storage medium, which can receive the target file sent by the second application system through the first transmission endpoint, realize direct file transmission through the endpoint to endpoint, reduce the process of unified distribution of the target file through other intermediate systems, so as to improve the transmission efficiency of the file between the application systems.
[0004] The present application provides a file transmission method applied to a distributed system, the distributed system having a cloud native architecture, the cloud native architecture including a plurality of independent running, deploying and portable containers, each container using a specific communication protocol for file transmission, and each application system and transmission endpoint being deployed for different containers, each application system having a plurality of transmission endpoints; the container deployed for each application system and the container deployed for the plurality of transmission endpoints of the application system constitute a container cluster; the file transmission method includes:
[0005] The management console in the distributed system determines a first application system receiving a target file requested by a file transmission event in response to triggering of the file transmission event by querying a node associated cluster set in the management console; wherein the first application system and a second application system sending the target file have a direct file subscription relationship;
[0006] The management console determines a first transmission endpoint on the first application system side for calling the target file by querying the node associated cluster;
[0007] The target file is sent to the first transmission endpoint by using a second transmission endpoint of the second application system for sending the target file, so as to realize the calling of the target file between the first application system and the second application system.
[0008] The application further provides a file transmission device, which is applied to a distributed system having a cloud native architecture, the cloud native architecture including a plurality of containers independently running, deploying and being portable, file transmission being performed between each container by using a specific communication protocol, an application system and a transmission endpoint being respectively deployed for different containers, each application system having a plurality of transmission endpoints; a container of each application system and a container in which the plurality of transmission endpoints of the application system are deployed constituting a container cluster; the file transmission device including:
[0009] A system determination module is configured to determine, by a console in the distributed system, a first application system receiving a target file requested to be transmitted according to a file transmission event, by querying a node associated cluster set in the console; the first application system and a second application system sending the target file having a direct file subscription relationship;
[0010] An endpoint determination module is configured to determine, by the console, a first transmission endpoint of the first application system for calling the target file, by querying the node associated cluster.
[0011] A file calling module is configured to send the target file to the first transmission endpoint by using a second transmission endpoint of the second application system for sending the target file, so as to realize the calling of the target file between the first application system and the second application system.
[0012] The application further provides an electronic device including a processor, a memory and a bus, the memory storing machine readable instructions executable by the processor, the processor and the memory communicating through the bus when the electronic device is running, the machine readable instructions being executed by the processor to perform the steps of the file transmission method as described above.
[0013] The application further provides a computer readable storage medium, the computer readable storage medium storing a computer program, the computer program being executed by the processor to perform the steps of the file transmission method as described above.
[0014] The file transmission method and device, the electronic device and the readable storage medium provided by the embodiments of the present application are applied to a distributed system; a management and control console in the distributed system determines a first application system of a target file to be transmitted in response to triggering of a file transmission event by querying a node associated cluster set in the management and control console; the management and control console determines a first transmission endpoint on the side of the first application system for calling the target file by querying the node associated cluster; and the target file is transmitted to the first transmission endpoint by using a second transmission endpoint on the side of a second application system for sending the target file, so as to realize calling of the target file between the first application system and the second application system. In this way, the target file sent by the second application system can be received through the first transmission endpoint, file transmission is realized directly through endpoint to endpoint, the process of unified distribution of the target file through other intermediate systems is reduced, and therefore, the process of obtaining the target file by the other intermediate systems is reduced, so that the transmission efficiency of the file between the application systems can be improved; meanwhile, the transmission endpoint and the application system are encapsulated in different containers running independently, so that the control and logic of the application system and the transmission endpoint can be upgraded and deployed separately, that is, the application system or the transmission endpoint can be upgraded respectively.
[0015] In order to make the above objectives, characteristics and advantages of the present application more apparent, clear and easy to understand, the following will describe the preferred embodiments in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF DRAWINGS
[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments. It should be understood that the following drawings only show some of the embodiments of the present application, and therefore should not be considered as a limitation to the scope. For those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.
[0017] Figure 1 A system architecture diagram of a distributed system provided by the embodiments of the present application;
[0018] Figure 2 A flowchart of a file transmission method provided by the embodiments of the present application;
[0019] Figure 3 A file transmission process schematic diagram provided by the embodiments of the present application;
[0020] Figure 4 A structural schematic diagram of a file transmission device provided by the embodiments of the present application;
[0021] Figure 5 A structural schematic diagram of a file transmission device provided by the embodiments of the present application;
[0022] Figure 6 A structural schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0023] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the following will be combined with the accompanying drawings of the embodiments of the present application to make a clear and complete description of the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the accompanying drawings can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments of the present application, every other embodiment obtained by a person skilled in the art without creative work falls within the scope of protection of the present application.
[0024] It is found through research that, at present, the distributed file storage system selected and used by an enterprise all adopts a centralized processing file mode to complete processing of a to-be-handled business; that is, when there is a demand for coordinated processing of a to-be-handled business, a department initiating handling of the business sends and stores files required for processing of the to-be-handled business in a designated file storage location in a distributed system, and other collaborative departments download corresponding files from the file storage location to complete processing, which makes the business handling process relatively complex and the processing efficiency of the to-be-handled business relatively low.
[0025] Cloud native is a modern approach to building and running software applications that takes advantage of the flexibility, scalability, and elasticity of cloud computing. Cloud native includes the various tools and technologies that today's software developers use to build applications for public clouds, rather than traditional architectures that fit in on-premises data centers. The Cloud Native Computing Foundation (CNCF) has a more narrow definition of cloud native, focusing on application containerization—breaking applications into microservices and packaging them in lightweight containers for deployment and orchestration across a variety of servers. Cloud native application development typically includes combining microservices, cloud platforms, containers, Kubernetes, immutable infrastructure, declarative APIs, and continuous delivery techniques with technologies such as devops and agile methodologies.
[0026] Based on this, the embodiments of the present application provide a file transmission method, which can reduce the acquisition process of a target file by other intermediate systems in the transmission process of the target file, so as to indirectly improve the handling efficiency of a business and reduce the complexity of the business handling process.
[0027] Please refer to Figure 1 , Figure 1A system architecture diagram of a distributed system provided by an embodiment of the present application is shown in FIG. 1. As shown in FIG. 1, the distributed system 100 includes a management console 110, a first container cluster 120, and a second container cluster 130. Figure 1
[0028] The management console 110 is provided with a node association cluster 111, which is used to manage and discover transmission endpoints of various application systems. The first container cluster 120 can include a plurality of first application systems 121, and the second container cluster 130 can include a plurality of second application systems 131. The first application systems 121 and the second application systems 131 cooperate to complete the handling of related businesses through transmission target files. The first application systems 121 and the second application systems 131 that can transmit target files have a direct file subscription relationship.
[0029] When transmitting a target file, the second application system 131 determines the first transmission endpoint to be called for transmitting the target file to the first application system 121 by querying the node association cluster 111, and transmits the target file to the first application system through the first transmission endpoint.
[0030] Further, a business personnel can customize the processing time of a related task through a terminal device. For example, the related task can include a file cleaning task, and the business personnel sets the execution time of the file cleaning task to clean the related files involved in the various application systems in the distributed system at regular intervals. Thus, a distributed system capable of processing a timing task is obtained. The related task can also include a file migration task, a file backup task, etc.
[0031] Here, the first application system and the first transmission endpoint are respectively encapsulated in different containers of the first container cluster, and correspondingly, the second application system and the second transmission endpoint are respectively encapsulated in different containers of the second container cluster.
[0032] Referring to FIG. 2, Figure 2 Figure 2 A flowchart of a file transmission method provided by an embodiment of the present application is shown in FIG. 2. The method is applied to a distributed system having a cloud-native architecture, which includes a plurality of containers that are independently run, deployed, and portable. Each container uses a specific communication protocol to transmit files. Application systems and transmission endpoints are respectively deployed for different containers, and each application system has a plurality of transmission endpoints. The container in which each application system is deployed and the containers in which the plurality of transmission endpoints of the application system are deployed constitute a container cluster.
[0033] Among the different containers, at least two application systems are deployed, such as a first application system and a second application system.
[0034] As Figure 2 The file transmission method provided by the embodiments of the present application includes the following steps.
[0035] S201, the management console in the distributed system determines a first application system that needs to receive a target file requested by a file transmission event in response to triggering of the file transmission event, by querying a node association cluster set in the management console.
[0036] S202, the management console determines a first transmission endpoint used by the first application system to call the target file, by querying the node association cluster.
[0037] S203, the target file is sent to the first transmission endpoint by using a second transmission endpoint used by a second application system to send the target file, so as to realize calling of the target file between the first application system and the second application system.
[0038] The file transmission method provided by the embodiments of the present application, in the case of triggering a file transmission event, the management console of a distributed system determines a first application system that needs to receive a target file requested by a file transmission event in response to triggering of the file transmission event, by querying a node association cluster set in the management console. The management console can determine a first transmission endpoint used by the first application system to receive the target file by querying the node association cluster. In order to facilitate subsequent maintenance of the application system, the first application system and the first transmission endpoint are respectively encapsulated in different containers. Therefore, even if there is a difference in language and operating system between the first application system and a second application system that sends the target file, the transmission of the target file can be realized through the first transmission endpoint, so that the file transmission between the two systems is not limited by language and technology. The second application system sends the target file to the first transmission endpoint through a second transmission endpoint, so as to complete the transmission of the target file between the second application system and the first application system. In this way, the file interaction between the second application system and the first application system can be realized without the need for other intermediate systems to store and distribute the target file. In this way, the storage and acquisition process of the target file by other intermediate systems can be reduced, so as to improve the transmission efficiency of the target file, and further improve the business handling efficiency.
[0039] Here, the node association cluster is specifically used to manage and discover the transmission endpoints of the application systems (including the first application system and the second application system) for file transmission; each transmission endpoint of the system needs to register the container port number of the encapsulated container in the visual console; the node association cluster records the container port number of the encapsulated container, the endpoint registration information of each transmission endpoint, and the file transmission relationship between each two transmission endpoints after registration; further, the node association cluster can manage the authorization and file subscription relationship between systems by managing the recorded file transmission relationship between each transmission endpoint; if the transmission endpoints of two systems have a file transmission relationship, it means that the two systems have a file subscription relationship; for example, the second application system 1 sends a target file using the second transmission endpoint A, and determines the first transmission endpoint B having a file transmission relationship with the second transmission endpoint A by querying the node association cluster, so the system to which the first transmission endpoint B belongs is the first application system.
[0040] Here, the visual console can display the endpoint registration information and the container port number of the encapsulated container of each transmission endpoint to be registered in the node association cluster to the business personnel, so that the business personnel can check the endpoint registration information and the container port number of the encapsulated container; for example, the unique endpoint identifier of each transmission endpoint, the system identifier of the associated application system, and the container port number of the encapsulated container are displayed in the visual console, so that the business personnel can check the above displayed information.
[0041] Each application system can store the target files generated by itself, and obtain other application systems subscribing to the target files generated by the application system through the console, and perform real-time distribution and pushing of the target files. In the pushing process, a load balancing mechanism can be used to rotate to different transmission endpoints for file transmission interaction, and controllable services can be provided to notify the business system of file in-place information in time, and the business system can process the file information in time after receiving the information.
[0042] In step S201, when there is a file transmission demand, the business personnel can trigger a file transmission event through the terminal device used to trigger the sending of the target file through the file transmission event; at this time, the console side can respond to the triggering of the file transmission event, and determine the first application system capable of or needing to receive the target file requested to be sent by the file transmission event by querying the node association cluster set in the console under the cloud native architecture.
[0043] Among them, the target file can only be transmitted between systems having a subscription relationship, therefore, the first application system should have a file subscription relationship with the second application system; that is, the first application system should have the ability to receive files from the second application system.
[0044] Here, the file subscription relationship can be a one-way subscription relationship or a two-way subscription relationship; when the file subscription relationship is a one-way subscription relationship, the first application system can only receive the file sent by the second application system; and when the file subscription relationship is a two-way subscription relationship, the first application system can both receive the file sent by the second application system and send a file to the second application system.
[0045] Here, when the application systems determine the file subscription relationship, the requestor of the file subscription relationship can send a file subscription request to the requestee through the application system used; the requestee can choose whether to establish a file subscription relationship with the requestor after receiving the file subscription request; if both parties determine to establish a file subscription relationship, the relevant information of the file subscription relationship established by both parties is sent to the management console to synchronize the file subscription relationship of both parties in the node association cluster set in the management console, for example, the system identification code of the application system used by both parties, the endpoint identification of the transmission endpoint used for transmitting the file, and the container port number of the container encapsulating the transmission endpoint.
[0046] In the scheme provided in the present application, the triggering of the file transmission event can be, for example, when the business personnel press the file transmission control through the terminal device used, the file transmission event can be triggered; or when the business personnel trigger a business handling event in the terminal device used, the file transmission event can be triggered; or after the business personnel upload the relevant files required for handling the business through the terminal device used, the file transmission event can be triggered; which can be determined according to the actual situation, and is not limited here.
[0047] Here, the node association cluster set in the management console records the file subscription relationship between each transmission endpoint, the system identification code of each application system, the endpoint identification of each transmission endpoint, and the container port number of the container encapsulating each transmission endpoint; wherein when two application systems have a file subscription relationship, the container port numbers of the transmission endpoints of the two application systems can be associated to represent the file subscription relationship of the application systems through the associated container port numbers; for example, the application system 1 and the application system 2 have a file subscription relationship; the application system 1 can transmit the target file to the transmission endpoint 21 of the application system 2 through the transmission endpoint 11; at this time, it indicates that the transmission endpoint 11 and the transmission endpoint 21 have a file transmission relationship, and the container port number of the container encapsulating the transmission endpoint 11 can be associated with the container port number of the container encapsulating the transmission endpoint 21.
[0048] When there is a file transmission requirement, the distributed system can determine the first container port number associated with the second container port number by reverse lookup of the node association cluster, i.e., determine the first transmission endpoint capable of having a file transmission relationship with the second transmission endpoint, and then determine the first application system having the requirement of receiving the target file by matching the system identification code to which the first container port number belongs and by reverse lookup.
[0049] In an embodiment, step S201 comprises:
[0050] Step S2011, the management console determines the second container port number of the container in which the second transmission endpoint used by the second application system for transmitting the target file is encapsulated, in response to triggering of the file transmission event.
[0051] In this step, the management console determines the second container port number of the container in which the second transmission endpoint selected by the business personnel for transmitting the target file is encapsulated, in response to triggering of the file transmission event by the business personnel through the terminal device.
[0052] Step S2012, the first container port number of the container in which the first transmission endpoint capable of having a file transmission relationship with the container in which the second transmission endpoint is encapsulated is determined by querying the node association cluster using the second container port number.
[0053] In this step, the management console determines the first container port number of the container in which the first transmission endpoint having a file transmission relationship with the second transmission endpoint is encapsulated by querying the node association cluster set in the management console using the determined second container port number.
[0054] Here, if the first transmission endpoint has a file transmission relationship with the second transmission endpoint, the first container port number of the first transmission endpoint is associated with the second container port number of the second transmission endpoint in the node association cluster. On the premise of determining the second container port number, the first container port number having an association relationship with the second container port number can be determined. On this basis, the first transmission endpoint encapsulated in the container corresponding to the first container port number can be determined as the first transmission endpoint having a file transmission relationship with the second transmission endpoint.
[0055] Step S2013, determine the system identification code to which the first container port number belongs.
[0056] In this step, on the premise that the first transmission end point is encapsulated by the first container port number of the container, the management console can query the node association cluster by using the first container port number, and can obtain the system identification code of the system to which the first container port number belongs.
[0057] In step S2014, the application system corresponding to the system identification code is determined as the first application system.
[0058] In this step, each application system has a unique system identification code, and even the application systems in the same system cluster have different system identification codes. Therefore, the first application system receiving the target file can be deduced reversely according to the determined system identification code.
[0059] For example, there are two system clusters, and the system cluster 1 includes three application systems. For the three application systems in the system cluster 1, the system identification code of the first application system is 011, the system identification code of the second application system is 012, and the system identification code of the third application system is 013. The system cluster 2 also includes three application systems. For the three application systems in the system cluster 2, the system identification code of the first application system is 021, the system identification code of the second application system is 022, and the system identification code of the third application system is 023. If it is determined that the system identification code to which the first container port number belongs is 022, it can be determined that the first application system receiving the target file is the second application system in the system cluster 2.
[0060] Here, the first application system side can be provided with multiple candidate transmission end points for receiving files. In order to balance the data load of each transmission end point, the first transmission end point most suitable for file transmission can be selected from the multiple candidate transmission end points when sending the target file.
[0061] In step S202, the management console determines the first transmission end point most suitable for receiving the target file from the multiple candidate transmission end points set by the first application system side by querying the node association cluster, so as to realize the transmission of the target file by using the container information of the container encapsulating the first transmission end point in the subsequent process. At the same time, the data load of each candidate transmission end point can be balanced to make the load of each transmission end point more balanced.
[0062] In an embodiment, step S202 includes: determining, by using the node association cluster, multiple candidate transmission end points registered by the first application system for receiving files; and determining, from the multiple candidate transmission end points, the candidate transmission end point with the smallest data load as the first transmission end point based on the data load of each candidate transmission end point.
[0063] In this step, the node association cluster is queried to determine a plurality of candidate transmission endpoints registered by the first application system for receiving files and recorded in the node association cluster; a first transmission endpoint with the smallest data load is selected from the plurality of candidate transmission endpoints as the first transmission endpoint for transmitting the target file according to the data load of each candidate transmission endpoint at this time; and container information of the container in which the first transmission endpoint is encapsulated is determined.
[0064] In this way, the candidate transmission endpoint with the smallest data load can be selected for transmitting the target file, so that the transmission efficiency of the target file between the second application system and the first application system can be improved.
[0065] Alternatively, the first transmission endpoint in an idle state is determined from the plurality of candidate transmission endpoints based on the data load of each candidate transmission endpoint.
[0066] In this step, a candidate transmission endpoint in an idle state is selected from the plurality of candidate transmission endpoints as the first transmission endpoint for transmitting the target file according to the data load of each candidate transmission endpoint at this time, and container information of the container in which the first transmission endpoint is encapsulated is determined.
[0067] In this way, the candidate transmission endpoint in an idle state can be selected to timely complete the transmission of the target file, and the transmission efficiency of the target file between the second application system and the first application system can be further improved.
[0068] Alternatively, the first transmission endpoint is determined from the plurality of candidate transmission endpoints by using a preset routing algorithm based on the data load of each candidate transmission endpoint.
[0069] In this step, the first transmission endpoint for transmitting the target file is selected from the plurality of candidate transmission endpoints by using a preset routing algorithm according to the data load of each candidate transmission endpoint at this time, and container information of the container in which the first transmission endpoint is encapsulated is determined.
[0070] Here, the first transmission endpoint determined by using the preset routing algorithm can be a transmission endpoint in an idle state; in the case where there is no candidate transmission endpoint in an idle state, the first transmission endpoint can be a candidate transmission endpoint with the smallest data load.
[0071] In this way, the first transmission endpoint suitable for transmitting the target file is selected by using the data load of each candidate transmission endpoint in the above manner, and the data load borne by each candidate transmission endpoint can be balanced to achieve the effect of load balancing.
[0072] If the first transmission endpoint applicable to the transmission of the target file cannot be determined at present, the first transmission endpoint for the transmission of the target file can be added if the condition permits, so that the horizontal expansion of the file transmission bandwidth and transmission capacity can be realized by directly adding the transmission endpoint.
[0073] In an embodiment, if the first transmission endpoint does not exist in the plurality of candidate transmission endpoints, the file transmission method further comprises: in response to an endpoint adding operation, adding, by the management console, a candidate transmission endpoint for receiving files for the first application system; determining the added candidate transmission endpoint as the first transmission endpoint, so that the second application system sends the target file to the first system according to the container information of the container in which the first transmission endpoint is encapsulated.
[0074] In this step, in the case that the business personnel applies an endpoint adding operation, a candidate transmission endpoint for receiving files for the first application system is added by the management console in response to the endpoint adding operation; and the added candidate transmission endpoint is determined as the first transmission endpoint for the first application system to transmit the target file; at the same time, the container port number of the container in which the added candidate first transmission endpoint is encapsulated is determined, so that the second application system sends the target file to the first system according to the container information (for example, the container port number) of the container in which the first transmission endpoint is encapsulated.
[0075] In the scheme provided in the present application, the application mode of the endpoint adding operation in response can be that when the business personnel presses the endpoint adding control, it can be considered that the business personnel actively applies the endpoint adding operation; or in the case that the first transmission endpoint cannot be determined from the plurality of candidate transmission endpoints of the first application system, the endpoint adding operation can be automatically applied, so that the expansion of the transmission endpoint can be realized without the operation of the business personnel; the application mode of the endpoint adding operation actually selected and used can be determined according to the actual situation, which is not limited herein.
[0076] Here, the node association cluster is specifically used to manage and discover the transmission endpoints of the systems (including the first application system and the second application system) that can be used for file transmission, and each transmission endpoint of the system needs to register the container port number of the container encapsulated by itself and the port registration information of itself in the visual management console, and then the node association cluster can manage the authorization and file subscription relationship between the systems through the container port number.
[0077] Therefore, when the application system starts all its transmission endpoints, the container port number of the container encapsulating the transmission endpoint is automatically registered in the node association cluster under the system identification code corresponding to the system, and the container port number of the container encapsulating each transmission endpoint is registered under the system identification code of the system, representing the belonging relationship between the system and the transmission endpoint.
[0078] In this way, for a system, a file transmission cluster for transmitting files can be obtained, that is, each system has multiple transmission endpoints that can be used to transmit files, and the container port number of the container encapsulating each transmission endpoint and the endpoint registration information of each transmission endpoint are also recorded in the node association cluster; when the node association cluster determines the available first transmission endpoint, the container port number of the container encapsulating the first transmission endpoint and / or the endpoint registration information of the first transmission endpoint can be synchronously obtained.
[0079] In an embodiment, the plurality of first transmission endpoints for receiving files possessed by the first application system are obtained by the following steps:
[0080] In response to the start of the first transmission endpoint, the first container port number of the container encapsulating the first transmission endpoint is recorded in the system identification code of the first application system recorded in the node association cluster;
[0081] In this step, in response to the first start of the first transmission endpoint for receiving files of the first application system, the management and control console determines the recording position of the first application system in the node association cluster by querying the system identification code of the first application system to which the first transmission endpoint belongs, and records the first container port number of the container encapsulating the first transmission endpoint under the system identification code of the first application system; that is, the first container port number of the container encapsulating the first transmission endpoint is recorded in the recording position corresponding to the first application system.
[0082] Alternatively, in response to the start of the first transmission endpoint, the first container port number of the container encapsulating the first transmission endpoint is associated with the system identification code of the first application system recorded in the node association cluster.
[0083] In this step, in response to the first start of the first transmission endpoint for receiving files of the first application system, the management and control console determines the system identification code of the first application system to which the first transmission endpoint belongs by querying the node association cluster, and associates the first container port number of the container encapsulating the first transmission endpoint with the system identification code of the first application system.
[0084] Correspondingly, if the first application system has a large number of candidate transmission endpoints in an idle state, the number of candidate transmission endpoints possessed by the first application system can also be appropriately reduced; specifically:
[0085] In response to the endpoint reduction operation, the distributed system determines a to-be-deleted endpoint from a plurality of candidate transmission endpoints possessed by the first application system; and deletes the to-be-deleted endpoint through the management console and deletes the container port number of the container in which the to-be-deleted endpoint is encapsulated in the node association cluster.
[0086] In this step, in the case that the business personnel applies an endpoint reduction operation through the terminal device, the distributed system determines a to-be-deleted endpoint from a plurality of candidate transmission endpoints possessed by the first application system for transmitting files in response to the endpoint reduction operation; here, the to-be-deleted endpoint determined can be selected by the business personnel through the endpoint reduction operation; or can be a transmission endpoint that has not been used for a long time for file transmission, which is determined by the business system according to the use of each candidate transmission endpoint, which can be determined according to actual conditions.
[0087] The distributed system deletes the selected to-be-deleted endpoint through the management console; at the same time, deletes the container port number of the container in which the to-be-deleted endpoint is encapsulated in the node association cluster.
[0088] In the scheme provided in the present application, the application mode of the endpoint reduction operation in response to the endpoint reduction operation can be that when the business personnel presses the endpoint reduction control through the terminal device, it can be considered that the business personnel actively applies the endpoint reduction operation; or in the case that the first application system has a plurality of candidate transmission endpoints that have been in an idle state for a long time, the distributed system can automatically apply the endpoint reduction operation, so that the capacity of the transmission endpoint can be reduced without the operation of the business personnel; the application mode of the actually selected endpoint reduction operation can be determined according to actual conditions, which is not limited herein.
[0089] In addition, for the newly added candidate transmission endpoint temporarily used for transmitting files, after the transmission of the target file is completed by using the newly added candidate transmission endpoint, the processing mode of the newly added candidate transmission endpoint can be further selected.
[0090] Here, the processing mode includes:
[0091] Mode one: associate the newly added candidate transmission endpoint with the first application system to be used as a candidate transmission endpoint for transmitting files by the first application system for a long time; in this case, the container port number of the container in which the newly added candidate transmission endpoint is encapsulated needs to be recorded under the system identification code of the first application system recorded in the node association cluster; or the container port number of the container in which the newly added candidate transmission endpoint is encapsulated can also be associated with the system identification code of the first application system recorded in the node association cluster.
[0092] Mode two: delete the newly added candidate transmission endpoint.
[0093] In step S203, in order to avoid the problem that the target file cannot be transmitted due to the differences between the development languages and operating systems of the systems, in the transmission process of the target file, the first application system and the second application system need to transmit the file through the file transmission endpoints possessed by them respectively; that is, the first application system and the second application system need to realize the transmission through the transmission endpoints when the file is generated or received.
[0094] Therefore, the transmission endpoints and the application systems actually provide services in a “sidecar” mode, which has no invasiveness to the internal application systems and is not limited by the development languages and operating systems of the application systems, and can separate the control and logic of the application systems for upgrading and deployment, and can upgrade the application systems or the transmission endpoints respectively.
[0095] In the transmission of the target file, the second transmission endpoint for sending the target file of the second application system sends the target file to the first transmission endpoint, so as to realize the call of the target file between the first application system and the second application system.
[0096] Here, for the cloud native architecture, there are various communication modes between the containers, for example, the containers in the same local area network can use the local area network to transmit the file; and the containers in different local area networks can use the network of the host computer to transmit the file.
[0097] In an embodiment, step S203 comprises:
[0098] S2031, sending the target file from the second application system to the second transmission endpoint by using the second local area network configured for the second container cluster to which the second application system belongs.
[0099] In this step, when the file needs to be transmitted between the second application system and the second transmission endpoint which belong to the same second container cluster, the second local area network configured for the second container cluster can be used to complete the transmission of the target file between the second application system and the second transmission endpoint, and the target file is sent from the second transmission endpoint to the second application system.
[0100] Here, since the second application system and the second transmission endpoint belong to the same container cluster and are located in the coverage of the same local area network, the internal communication protocol needs to be used to complete the transmission of the target file between the second application system and the second transmission endpoint when the file transmission demand is required.
[0101] In an embodiment, step S2031 comprises:
[0102] S20311, determine, based on the cluster configuration information of the second container cluster, a first transmission path and an internal communication protocol for file transmission between containers in the second container cluster.
[0103] In this step, according to the cluster configuration information of the second container cluster, the internal communication protocol required for file transmission between containers in the second container cluster is determined; and the first transmission path for the target transmission file between the second application system and the second transmission endpoint.
[0104] The cluster configuration information of the second container cluster can include the preset transmission path between the containers in the cluster, the container information of each container (such as container name, container port number, and container IP address, etc.), and the internal communication protocol used for file transmission between the containers in the second container cluster.
[0105] S20312, in the second local area network configured for the second container cluster, the target file is sent from the second application system to the second transmission endpoint according to the first transmission path and the internal communication protocol.
[0106] In this step, by means of the internal communication of the local area network, the target file is sent from the second application system to the second transmission endpoint through the first transmission path between the second application system and the second transmission endpoint by using the internal communication protocol for transmission between the containers in the second container cluster.
[0107] S2032, obtain the container information of the container in which the first transmission endpoint is encapsulated.
[0108] In this step, since the second transmission endpoint and the first transmission endpoint are deployed in different containers, in order to complete the file transmission between the second transmission endpoint and the first transmission endpoint, the container information of the container in which the first transmission endpoint is encapsulated needs to be determined before the second transmission endpoint performs file transmission, so that the second transmission endpoint can determine the "location" of the first transmission endpoint through the container information.
[0109] The container information can include container port number, container name, and container IP address, etc.
[0110] S2033, based on the container information, control the second transmission endpoint to send the target file to the first transmission endpoint.
[0111] In this step, according to the container information of the container in which the first transmission endpoint is encapsulated, the "location" of the first transmission endpoint is determined, and the second transmission endpoint is controlled to send the target file to the first transmission endpoint.
[0112] Here, there is a possibility of cross-service domain and network domain between the second transmission end point and the first transmission end point, so in the case where the first transmission end point and the second transmission end point belong to the same local area network, the transmission path between them can still be used to complete the transmission of the target file under the local area network;
[0113] In the case where the first transmission end point and the second transmission end point do not belong to the same local area network, the second transmission end point can complete the transmission of the target file by means of the host network.
[0114] In an embodiment, step S2033 comprises:
[0115] S20331, determining the second file transmission path and the external communication protocol between the second transmission end point and the first transmission end point for file transmission based on the container information.
[0116] In this step, according to the container information of the container in which the first transmission end point is encapsulated, the internal communication protocol required by the first transmission end point and the second transmission end point when performing file transmission is determined, and the second transmission path between the first transmission end point and the second transmission end point for transmitting files.
[0117] S20332, controlling the second transmission end point to send the target file to the first transmission end point by means of the network of the associated host according to the second file transmission path and the external communication protocol.
[0118] In this step, the target file is sent from the second transmission end point to the first transmission end point by means of the first transmission path between the first transmission end point and the second transmission end point using the external communication protocol required by the second transmission end point to transmit files to the external network container by means of the network of the associated host, in a cross-network communication manner.
[0119] Wherein, the host is used to carry the container in which the second transmission end point is encapsulated.
[0120] Here, the first transmission end point can also receive the target file sent by the second transmission end point by means of the network of the associated host.
[0121] S2034, sending the target file from the first transmission end point to the first application system by using the first local area network configured for the first container cluster to which the first application system belongs.
[0122] In this step, when file transmission needs to be performed between the first application system and the first transmission endpoint, which belong to the first container cluster, the first local area network configured for the first container cluster is used to complete the transmission of the target file between the first application system and the first transmission endpoint, and the target file is sent from the first transmission endpoint to the first application system.
[0123] In an embodiment, step S2034 comprises:
[0124] S20341, based on the cluster configuration information of the first container cluster, determining a second transmission path and an internal communication protocol used for file transmission between containers in the first container cluster.
[0125] In this step, according to the cluster configuration information of the first container cluster, an internal communication protocol used for file transmission between containers in the first container cluster is determined, and a second transmission path used for the target transmission file between the first application system and the first transmission endpoint is determined.
[0126] The cluster configuration information of the first container cluster can include a preset transmission path between containers in the cluster, container information (such as container name, container port number, and container IP address, etc.), and an internal communication protocol used for file transmission between containers in the first container cluster.
[0127] S20342, in the first local area network configured for the first container cluster, the target file is sent from the first transmission endpoint to the first application system according to the second transmission path and the internal communication protocol of the first container cluster.
[0128] In this step, by using the internal communication of the local area network, the target file is sent from the first transmission endpoint to the first application system through the second transmission path between the first application system and the first transmission endpoint by using the internal communication protocol used for transmission between containers in the first container cluster.
[0129] Here, in order to timely inform the business personnel on the first application system side that the target file has been completed, so that the business personnel can process the target file as soon as possible, after the transmission of the target file is completed, a file reception completion notification can be sent to the first application system.
[0130] In an embodiment, after the transmission of the target file is completed, the file transmission method further comprises: sending a file reception completion notification to the first application system to complete processing of the target file.
[0131] In this step, after the first application system completes the reception of the target file through the first transmission endpoint, a file reception completion notification is sent to the first application system so that the first application system can display the completion notification to the relevant processing personnel, so that the relevant processing personnel can complete the processing of the target file in a timely manner.
[0132] Here, since the transmission endpoint and the application system are encapsulated in different containers, when there is an update requirement, only the data in a portion of the containers needs to be updated, without having to update both the transmission endpoint and the application system simultaneously, thus speeding up the update process.
[0133] In one embodiment, the file transfer method further includes: updating the data of the application system or transfer endpoint encapsulated in the target container indicated by the data update instruction in response to a data update instruction.
[0134] In this step, in response to the data update instruction, the data of the application system or transmission endpoint encapsulated in the target container indicated by the data update instruction is updated specifically. Here, the content encapsulated in the target container can be either an application system or a transmission endpoint. When the target container encapsulates an application system, only the data related to the application system needs to be updated, and the data related to the transmission endpoint does not need to be updated. When the target container encapsulates a transmission endpoint, only the data related to the transmission endpoint needs to be updated, and the data related to the application system does not need to be updated.
[0135] Please see Figure 3 , Figure 3 This is a schematic diagram illustrating a file transfer process provided in an embodiment of this application. Figure 3 As shown, the distributed system 3a includes a control console 3b, a second container cluster 3c, and a first container cluster 3d. The control console 3b contains a node-associated cluster 3b-1. The node-associated cluster 3b-1 manages and discovers the file subscription relationship between the second container cluster 3c and the first application system cluster 3d. The second application system cluster 3c includes a second application system 3c-1 and a second transmission endpoint 3c-2. The first container cluster 3d includes a first application system 3d-1 and a first transmission endpoint 3d-2. When the second application system 3c-1 generates a target file, it queries the control console 3b for the existence of a node-associated cluster 3b-1 to determine the first application system 3d-1 that needs to receive the target file. The second application system 3c-1 sends the target file to the first transmission endpoint 3d-2 of the first application system 3d-1 through the second transmission endpoint 3c-2, enabling the first application system 3d-1 to receive the target file.
[0136] The file transmission method provided by the embodiment of the application, the management console in the distributed system determines a first application system receiving a target file requested to be transmitted by the file transmission event by querying a node associated cluster set in the management console in response to triggering of the file transmission event; the management console determines a first transmission endpoint on the first application system side for calling the target file by querying the node associated cluster; and the target file is sent to the first transmission endpoint by using a second transmission endpoint on the second application system side for sending the target file, so as to realize calling of the target file between the first application system and the second application system. In this way, the target file sent by the second application system can be received by the first transmission endpoint, file transmission is realized directly through the endpoint-to-endpoint, the process of unified distribution of the target file through other intermediate systems is reduced, and therefore, the process of obtaining the target file by other intermediate systems is reduced, so as to indirectly improve the efficiency of business handling and reduce the complexity of the business handling process. Meanwhile, the transmission endpoint and the application system are encapsulated in different containers running independently, so that the control and logic of the application system and the transmission endpoint can be upgraded and deployed separately, that is, the application system or the transmission endpoint can be upgraded respectively.
[0137] Please refer to Figure 4 、 Figure 5 , Figure 4 Figure 1 is a structural schematic diagram of a file transmission device provided by an embodiment of the application, Figure 5 Figure 2 is another structural schematic diagram of a file transmission device provided by an embodiment of the application. The file transmission device is applied to a distributed system, the distributed system has a cloud native architecture, the cloud native architecture includes a plurality of containers running, deploying and being portable independently, file transmission is performed between each container using a specific communication protocol, an application system and a transmission endpoint are deployed for different containers respectively, each application system has a plurality of transmission endpoints; a container in which each application system is deployed and a container in which the plurality of transmission endpoints of the application system are deployed constitute a container cluster; as shown in Figure 4 The file transmission device 400 includes:
[0138] A system determination module 410 is configured to determine, by a management console in the distributed system, a first application system receiving a target file requested to be transmitted by a file transmission event by querying a node associated cluster set in the management console in response to triggering of the file transmission event; wherein the first application system and a second application system sending the target file have a direct file subscription relationship;
[0139] An endpoint determination module 420 is configured to determine, by the management console, a first transmission endpoint on the first application system side for calling the target file by querying the node associated cluster;
[0140] The file calling module 430 is configured to send the target file to the first transmission endpoint by using a second transmission endpoint of the second application system side for sending the target file, so as to realize the calling of the target file between the first application system and the second application system.
[0141] Further, when the file calling module 430 is configured to send the target file to the first transmission endpoint by using a second transmission endpoint of the second application system side for sending the target file, so as to realize the calling of the target file between the first application system and the second application system, the file calling module 430 is configured to:
[0142] send the target file from the second application system to the second transmission endpoint by using a second local area network configured for a second container cluster to which the second application system belongs;
[0143] obtain container information of an encapsulated container of the first transmission endpoint;
[0144] based on the container information, control the second transmission endpoint to send the target file to the first transmission endpoint;
[0145] send the target file from the first transmission endpoint to the first application system by using a first local area network configured for a first container cluster to which the first application system belongs.
[0146] Further, when the file calling module 430 is configured to send the target file from the second application system to the second transmission endpoint by using a second local area network configured for a second container cluster to which the second application system belongs, the file calling module 430 is configured to:
[0147] determine, based on cluster configuration information of the second container cluster, a first transmission path and an internal communication protocol between containers in the second container cluster for file transmission;
[0148] in the second local area network configured for the second container cluster, send the target file from the second application system to the second transmission endpoint according to the first transmission path and the internal communication protocol.
[0149] Further, when the file calling module 430 is configured to control the second transmission endpoint to send the target file to the first transmission endpoint based on the container information, the file calling module 430 is configured to:
[0150] determine, based on the container information, a second file transmission path and an external communication protocol between the second transmission endpoint and the first transmission endpoint for file transmission;
[0151] controlling the second transmission end point to send the target file to the first transmission end point by means of a network of an associated host computer according to the second file transmission path and the external communication protocol; wherein the host computer is configured to carry the container in which the second transmission end point is encapsulated.
[0152] Further, as shown in Figure 5 The file transmission device 400 further comprises an end point registration module 440 configured to obtain a plurality of first transmission end points of the first application system for receiving files by the following steps:
[0153] In response to the start of the first transmission end point, recording the first container port number of the container in which the first transmission end point is encapsulated under the system identification code of the first application system recorded in the node association cluster; or,
[0154] In response to the start of the first transmission end point, associating the first container port number of the container in which the first transmission end point is encapsulated with the system identification code of the first application system recorded in the node association cluster.
[0155] Further, as shown in Figure 5 The file transmission device 400 further comprises an update module 450 configured to:
[0156] In response to a data update instruction, updating the data of the application system or the transmission end point encapsulated in the target container indicated by the data update instruction.
[0157] Further, the system determination module 410 is configured to, in response to the triggering of the file transmission event by the management console in the distributed system, determine the first application system receiving the target file requested to be transmitted by querying the node association cluster set in the management console, and the system determination module 410 is configured to:
[0158] The management console determines the second container port number of the container in which the second transmission end point of the second application system for transmitting the target file is encapsulated in response to the triggering of the file transmission event.
[0159] Using the second container port number, the first container port number of the container in which the first transmission end point capable of file transmission with the container in which the second transmission end point is encapsulated is determined by querying the node association cluster.
[0160] Determine the system identification code to which the first container port number belongs.
[0161] Determine the application system corresponding to the system identification code as the first application system.
[0162] The file transmission device provided by the embodiment of the application is applied to a distributed system. In response to triggering of a file transmission event, a management and control console in the distributed system determines a first application system of a target file receiving a file transmission event request for transmission by querying a node association cluster set in the management and control console. The management and control console determines a first transmission endpoint on the side of the first application system for calling the target file by querying the node association cluster. The target file is sent to the first transmission endpoint by using a second transmission endpoint on the side of a second application system for sending the target file, so as to realize calling of the target file between the first application system and the second application system. In this way, the target file sent by the second application system can be received through the first transmission endpoint, file transmission is realized directly through an endpoint to an endpoint, a process of unified distribution of the target file through other intermediate systems is reduced, and therefore, a process of obtaining the target file by the other intermediate systems is reduced. In this way, the efficiency of business handling can be indirectly improved, and the complexity of the process of business handling is reduced. Meanwhile, the transmission endpoint and the application system are encapsulated in different containers running independently, so that the control and logic of the application system and the transmission endpoint can be upgraded and deployed separately, that is, the application system or the transmission endpoint can be upgraded separately.
[0163] Please refer to Figure 6 , Figure 6 The structure of the electronic device provided by the embodiment of the application is shown in FIG. 6. Figure 6 As shown in FIG. 6, the electronic device 600 includes a processor 610, a memory 620 and a bus 630.
[0164] The memory 620 stores machine readable instructions executable by the processor 610. When the electronic device 600 is running, the processor 610 and the memory 620 communicate through the bus 630. When the machine readable instructions are executed by the processor 610, the steps of the file transmission method in the method embodiment shown in the above description can be performed. For specific implementation, please refer to the method embodiment, which will not be described here. Figure 2
[0165] The embodiment of the application further provides a computer readable storage medium, which stores a computer program. When the computer program is run by a processor, the steps of the file transmission method in the method embodiment shown in the above description can be performed. For specific implementation, please refer to the method embodiment, which will not be described here. Figure 2
[0166] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system, device and unit described above can refer to the corresponding process in the foregoing method embodiment, which will not be described here.
[0167] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other manners. The described device embodiments are merely schematic, for example, the division of the units is only a logical function division, and there can be another division manner in actual implementation, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections between different units, or the among different units, can be indirect couplings or communication connections through some interfaces, devices or units, and can be in electrical, mechanical or other forms.
[0168] The units described as separated components can or can not be physically separated, and the components displayed as units can or can not be physical units, i.e., can be located in one place, or can be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purposes of the embodiments of the present application.
[0169] In addition, each functional unit in the embodiments of the present application can be integrated in one processing unit, or each unit can exist physically as a separate unit, or two or more units can be integrated in one unit.
[0170] If the functions are implemented in the form of software function units and sold or used as independent products, they can be stored in a non-volatile computer readable storage medium executable by a processor. Based on this understanding, the technical solutions of the present application or the part of the technical solutions that make essential contributions to the prior art can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0171] Finally, it should be noted that the above-described embodiments are merely specific embodiments of the present application, which are used to illustrate the technical solutions of the present application, but not to limit the same. The protection scope of the present application is not limited thereto. Although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those skilled in the art that any skilled person in the art can still modify or easily think of changes to the technical solutions recorded in the foregoing embodiments, or make equivalent replacements to some of the technical features, within the technical scope disclosed by the present application. The modifications, changes or replacements do not make the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A file transfer method, characterized in that, This is applied to a distributed system with a cloud-native architecture, which includes multiple independently running, deployed, and portable containers. Each container uses a specific communication protocol for file transfer. Application systems and transmission endpoints are deployed separately for different containers, and each application system has multiple transmission endpoints. The containers deployed by each application system and the containers deployed by the multiple transmission endpoints of that application system constitute a container cluster. The file transfer method includes: In response to a file transfer event, the control console in the distributed system queries the node association cluster set in the control console to determine the first application system that receives the target file requested for transfer by the file transfer event. The first application system and the second application system that sent the target file have a direct file subscription relationship. The node association cluster records the file transfer relationship between every two transmission endpoints, and manages the file subscription relationship between each system by managing the recorded file transfer relationship between each transmission endpoint. The control console determines the first transmission endpoint used by the first application system to call the target file by querying the cluster associated with the node; The target file is sent to the first transmission endpoint using the second transmission endpoint on the second application system side, so as to realize the calling of the target file between the first application system and the second application system; If no suitable first transmission endpoint exists for transferring the target file, the file transfer method further includes: In response to the endpoint addition operation, a candidate transmission endpoint for receiving files is added to the first application system through the control console; the newly added candidate transmission endpoint is determined as the first transmission endpoint, so that the second application system sends the target file to the first system according to the container information of the container to which the first transmission endpoint is encapsulated; the endpoint addition operation is applied manually or automatically.
2. The file transfer method according to claim 1, characterized in that, The step of using the second transmission endpoint on the second application system side to send the target file to the first transmission endpoint, so as to realize the access of the target file between the first application system and the second application system, includes: The target file is sent from the second application system to the second transmission endpoint using the second local area network configured for the second container cluster to which the second application system belongs; Obtain the container information of the container encapsulated by the first transmission endpoint; Based on the container information, control the second transmission endpoint to send the target file to the first transmission endpoint; The target file is sent from the first transmission endpoint to the first application system using the first local area network configured for the first container cluster to which the first application system belongs.
3. The file transfer method according to claim 2, characterized in that, The step of using the second local area network configured for the second container cluster to which the second application system belongs to send the target file from the second application system to the second transmission endpoint includes: Based on the cluster configuration information of the second container cluster, the first transmission path and internal communication protocol used for file transfer between containers in the second container cluster are determined. In the second local area network configured for the second container cluster, the target file is sent from the second application system to the second transmission endpoint according to the first transmission path and the internal communication protocol.
4. The file transfer method according to claim 2, characterized in that, The step of controlling the second transmission endpoint to send the target file to the first transmission endpoint based on the container information includes: Based on the container information, determine the second file transfer path and external communication protocol used for file transfer between the second and first transmission endpoints; The second transmission endpoint is controlled to send the target file to the first transmission endpoint via the network of the associated host machine, according to the second file transfer path and the external communication protocol; wherein the host machine is used to carry the container to which the second transmission endpoint is encapsulated.
5. The file transfer method according to claim 1, characterized in that, The first application system obtains multiple first transmission endpoints for receiving files through the following steps: In response to the startup of the first transmission endpoint, the first container port number of the container encapsulated by the first transmission endpoint is recorded under the system identification code of the first application system recorded in the node-associated cluster; or, In response to the startup of the first transmission endpoint, the first container port number of the container encapsulated by the first transmission endpoint is associated with the system identification code of the first application system recorded in the node-associated cluster.
6. The file transfer method according to claim 1, characterized in that, The file transfer method further includes: In response to a data update command, the data of the application system or transmission endpoint encapsulated in the target container indicated by the data update command is updated.
7. The file transfer method according to claim 1, characterized in that, In response to a file transfer event, the control console in the distributed system queries the cluster associated with the nodes set in the control console to determine the first application system that receives the target file requested for transfer by the file transfer event, including: In response to the triggering of a file transfer event, the control console determines the second container port number of the container encapsulated by the second transfer endpoint used by the second application system to transfer the target file; Using the second container port number, the first container port number of the container encapsulated by the first transmission endpoint that can perform file transfer with the container encapsulated by the second transmission endpoint is determined by querying the cluster associated with the node. Determine the system identifier to which the first container port number belongs; The application system corresponding to the system identification code is identified as the first application system.
8. A file transfer device, characterized in that, This is applied to a distributed system with a cloud-native architecture, which includes multiple independently running, deployed, and portable containers. Each container uses a specific communication protocol for file transfer. Application systems and transmission endpoints are deployed separately for different containers, and each application system has multiple transmission endpoints. The containers deployed by each application system and the containers deployed by the multiple transmission endpoints of that application system constitute a container cluster. The file transfer device includes: The system determination module is used by the control console in the distributed system to respond to the triggering of a file transfer event, and to determine the first application system that receives the target file requested for transfer by querying the node association cluster set in the control console; wherein, the first application system and the second application system that sent the target file have a direct file subscription relationship; the node association cluster records the file transfer relationship between every two transmission endpoints, and manages the file subscription relationship between each system by managing the recorded file transfer relationship between each transmission endpoint; The endpoint determination module is used by the control console to determine the first transmission endpoint used by the first application system to call the target file by querying the cluster associated with the node. The file retrieval module is used to send the target file to the first transmission endpoint using the second transmission endpoint on the second application system side, so as to realize the retrieval of the target file between the first application system and the second application system; If no suitable first transmission endpoint exists for transferring the target file, the file transfer device is further configured to: In response to the endpoint addition operation, a candidate transmission endpoint for receiving files is added to the first application system through the control console; the newly added candidate transmission endpoint is determined as the first transmission endpoint, so that the second application system sends the target file to the first system according to the container information of the container to which the first transmission endpoint is encapsulated; the endpoint addition operation is applied manually or automatically.
9. An electronic device, characterized in that, include: The device includes a processor, a memory, and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the memory via the bus, and the machine-readable instructions are executed by the processor to perform the steps of the file transfer method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the file transfer method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Message transmission method and device, electronic equipment and readable storage medium
CN111866092A
File transmission method and device, electronic equipment and readable storage medium
CN114338650A