CN108733805B - File interaction method, system, computer equipment and storage medium - Google Patents

File interaction method, system, computer equipment and storage medium Download PDF

Info

Publication number
CN108733805B
CN108733805B CN201810482360.8A CN201810482360A CN108733805B CN 108733805 B CN108733805 B CN 108733805B CN 201810482360 A CN201810482360 A CN 201810482360A CN 108733805 B CN108733805 B CN 108733805B
Authority
CN
China
Prior art keywords
platform
interaction
file
interactive
interface
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810482360.8A
Other languages
Chinese (zh)
Other versions
CN108733805A (en
Inventor
怀立德
王永乐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CMB Yunchuang Information Technology Co Ltd
Original Assignee
Mbcloud Shenzhen Information Technology 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 Mbcloud Shenzhen Information Technology Co ltd filed Critical Mbcloud Shenzhen Information Technology Co ltd
Priority to CN201810482360.8A priority Critical patent/CN108733805B/en
Publication of CN108733805A publication Critical patent/CN108733805A/en
Application granted granted Critical
Publication of CN108733805B publication Critical patent/CN108733805B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4535Network directories; Name-to-address mapping using an address exchange platform which sets up a session between two nodes, e.g. rendezvous servers, session initiation protocols [SIP] registrars or H.323 gatekeepers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/566Grouping or aggregating service requests, e.g. for unified processing

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to a file interaction method, a file interaction system, computer equipment and a storage medium, and belongs to the technical field of networks. The method comprises the following steps: receiving an interface calling instruction sent by a first interactive platform; the interface is compatible with a plurality of first interaction platforms; determining a second interaction platform corresponding to the first interaction platform according to the interface calling instruction; returning the connection address of the second interactive platform to the first interactive platform; and establishing connection between the first interactive platform and the second interactive platform according to the connection address, and performing file interaction through the connection. By the technical scheme, the problem of low file interaction efficiency among a plurality of platforms is solved, and the file interaction efficiency among the platforms can be improved.

Description

File interaction method, system, computer equipment and storage medium
Technical Field
The present invention relates to the field of network technologies, and in particular, to a file interaction method, system, computer device, and storage medium.
Background
With the development of network technology, data transmission, information interaction and the like through file interaction between platforms are very necessary. File interaction among multiple platforms has also become an important part of the rapidly developing network technology. In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art: the file interaction process between platforms is usually single-node working; and the configuration, language, etc. of each platform may have differences, which may result in different file interaction operations for different platforms when performing file interaction between multiple platforms. Therefore, the current file interaction mode causes low file interaction efficiency among a plurality of platforms.
Disclosure of Invention
Based on the method, the system, the computer equipment and the storage medium, the file interaction efficiency between platforms can be improved.
The content of the embodiment of the invention is as follows:
a file interaction method comprises the following steps: receiving an interface calling instruction sent by a first interactive platform; the interface is compatible with a plurality of first interaction platforms; determining a second interaction platform corresponding to the first interaction platform according to the interface calling instruction; returning the connection address of the second interactive platform to the first interactive platform; and establishing connection between the first interactive platform and the second interactive platform according to the connection address, and performing file interaction through the connection.
In one embodiment, the second interactive platform comprises a plurality of storage servers; the interface comprises a file writing interface and a file reading interface; after the step of returning the connection address of the second interactive platform to the first interactive platform, the method further includes: determining file information of the first interaction platform; if the interface is a file writing interface, sending a first file storage instruction to each storage server of the second interactive platform; the first file storage instruction causes the storage servers to store the file information.
In one embodiment, after the step of returning the connection address of the second interactive platform to the first interactive platform, the method further includes: determining metadata information according to the second interactive platform and the file information; sending a metadata storage instruction to the attribute management server; the metadata storage instruction causes the attribute management server to store the metadata information in a key-value pair manner.
In one embodiment, the step of determining a second interaction platform corresponding to the first interaction platform includes: if the interface is a file reading interface, acquiring corresponding metadata information from the attribute management server according to the file information of the first interactive platform; determining a corresponding second interactive platform according to the corresponding metadata information; after the step of returning the connection address of the second interactive platform to the first interactive platform, the method further includes: determining an online storage server in the second interactive platform, and controlling the first interactive platform to establish connection with the online storage server; and enabling the first interaction platform to read the corresponding file from the online storage server.
In one embodiment, the step of determining a second interaction platform corresponding to the first interaction platform includes: determining an interaction platform with sufficient capacity from a plurality of interaction platforms according to a preset routing rule, and using the interaction platform as a second interaction platform corresponding to the first interaction platform; if the capacity of the interaction platforms is found to be insufficient, receiving information of a new interaction platform sent by a management server, and using the new interaction platform as a second interaction platform corresponding to the first interaction platform according to the information; the information is obtained after the management server registers for a new interaction platform when finding the new interaction platform.
In one embodiment, after the step of returning the connection address of the second interactive platform to the first interactive platform, the method further includes: acquiring interaction information when the first interaction platform and the second interaction platform perform file interaction, and sending the interaction information to a file service database; and enabling the file service database to store the interaction information.
In one embodiment, before the step of receiving the interface call instruction sent by the first interaction platform, the method further includes: a REST interface compatible with a plurality of first interaction platforms is provided.
Correspondingly, an embodiment of the present invention provides a file interaction system, including: the system comprises a first interaction platform, a second interaction platform and a file management platform; the first interactive platform is used for sending an interface calling instruction to the file management platform; the interface is compatible with a plurality of first interaction platforms; the file management platform is used for determining a second interaction platform corresponding to the first interaction platform according to the interface calling instruction; returning the connection address of the second interactive platform to the first interactive platform; and the first interactive platform and the second interactive platform are used for establishing connection according to the connection address and carrying out file interaction through the connection.
According to the file interaction method and the file interaction system, the first interaction platform sends the interface calling instruction to the file management platform, the file management platform determines the second interaction platform corresponding to the first interaction platform according to the interface calling instruction, and establishes connection between the first interaction platform and the second interaction platform, so that the first interaction platform and the second interaction platform can perform file interaction. Through the centralized management of the first interactive platform and the second interactive platform, the first interactive platform is not required to finish specific file service when interaction is carried out between the platforms, the first interactive platform can be compatible with different first interactive platforms, and the file interaction efficiency between the platforms is effectively improved.
A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program: receiving an interface calling instruction sent by a first interactive platform; the interface is compatible with a plurality of first interaction platforms; determining a second interaction platform corresponding to the first interaction platform according to the interface calling instruction; returning the connection address of the second interactive platform to the first interactive platform; and establishing connection between the first interactive platform and the second interactive platform according to the connection address, and performing file interaction through the connection.
According to the computer equipment, through centralized management of the first interaction platform and the second interaction platform, the first interaction platform is not required to finish specific file services when interaction is carried out between the platforms, the computer equipment can be compatible with different first interaction platforms, and the file interaction efficiency between the platforms is effectively improved.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of: receiving an interface calling instruction sent by a first interactive platform; the interface is compatible with a plurality of first interaction platforms; determining a second interaction platform corresponding to the first interaction platform according to the interface calling instruction; returning the connection address of the second interactive platform to the first interactive platform; and establishing connection between the first interactive platform and the second interactive platform according to the connection address, and performing file interaction through the connection.
According to the computer-readable storage medium, through centralized management of the first interactive platform and the second interactive platform, the first interactive platform is not required to finish specific file services when interaction is carried out between the platforms, the first interactive platform can be compatible with different first interactive platforms, and the file interaction efficiency between the platforms is effectively improved.
Drawings
FIG. 1 is a diagram of an application environment of a file interaction method in one embodiment;
FIG. 2 is a flowchart illustrating a file interaction method according to an embodiment;
FIG. 3 is a flowchart illustrating a file interaction method according to another embodiment;
FIG. 4 is a block diagram of a file interaction system in one embodiment;
FIG. 5 is a block diagram showing the construction of a file interaction system in another embodiment;
FIG. 6 shows an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The embodiment of the invention provides a file interaction method, a file interaction system, computer equipment and a storage medium. The following are detailed below.
The file interaction method provided by the present application can be applied to an application environment as shown in fig. 1, where the application environment includes at least one client 101 (3 clients are shown), a file management platform 102, and at least one storage server 103 (3 storage servers are shown). The file management platform may be a server, and the client 101 implements the ordered communication with the storage server 103 through the file management platform, thereby implementing the file interaction among multiple platforms. The client can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers and portable wearable devices, and the server (including the file management platform and the storage server) can be implemented by an independent server or a server cluster formed by a plurality of servers.
In one embodiment, as shown in FIG. 2, a file interaction method is provided. The method is described by taking the file management platform end in fig. 1 as an example, and comprises the following steps:
s201, receiving an interface calling instruction sent by a first interaction platform; the interface is compatible with a plurality of first interaction platforms.
In this step, the first interaction platform sends an interface call instruction to the file management platform, and the file management platform receives the interface call instruction, that is, receives the interaction request of the first interaction platform.
Where an interface refers to a type of reference that defines an agreement, similar to a class. The interface may contain methods, attributes, indexers, and events as members. Therefore, after the first interaction platform sends the interface calling instruction, the file management platform can determine the corresponding interface according to the instruction and can determine the relevant information of the first interaction platform for file interaction according to the corresponding interface, such as: when the first interactive platform wants to download certain data, the second interactive platform can determine the information such as the identification of the data according to the interface calling instruction.
In one embodiment, the first interaction platform may refer to a client.
S202, according to the interface calling instruction, determining a second interactive platform corresponding to the first interactive platform.
In this step, since the relevant information of the first interaction platform for performing the file interaction can be determined according to the interface call instruction, a suitable interaction platform can be found according to the relevant information and used as a second interaction platform corresponding to the first interaction platform. For example: the first interaction platform wants to download a certain scientific and technical document, and the scientific and technical document is stored in the interaction platform a managed by the file management platform, so that the interaction platform a can be determined as a second interaction platform corresponding to the first interaction platform.
In one embodiment, the second interactive platform is mainly used for storing the files uploaded by the first interactive platform and completing tasks related to file management. Thus, the second interactive platform can be considered as a storage node (storage).
In one embodiment, the first interactive platform, the second interactive platform and the file management platform can be servers and can be composed of one or more servers.
S203, returning a connection address of the second interactive platform to the first interactive platform; and establishing connection between the first interactive platform and the second interactive platform according to the connection address, and performing file interaction through the connection.
In this step, a connection address of the second interaction platform is returned to the first interaction platform, and the first interaction platform and the second interaction platform can establish a connection relationship according to the connection address and can perform operations such as file storage, file synchronization, file access (file upload, file download) and the like through the connection relationship. The connection establishment between the first interactive platform and the second interactive platform can be performed in a common manner, and the connection establishment is not limited in the embodiment of the present invention.
In the embodiment, through the centralized management of the first interactive platform and the second interactive platform, the first interactive platform is not required to finish specific file services when interaction is carried out between the platforms, the first interactive platforms are compatible with different platforms, the file interaction efficiency between the platforms is effectively improved, and meanwhile, equal services can be provided for each first interactive platform and each second interactive platform.
In one embodiment, the second interactive platform comprises a plurality of storage servers; the interface comprises a file writing interface and a file reading interface; after the step of returning the connection address of the second interactive platform to the first interactive platform, the method further includes: determining file information of the first interaction platform; if the interface is a file writing interface, sending a first file storage instruction to each storage server of the second interactive platform; the first file storage instruction causes the storage servers to store the file information.
In one embodiment, file writing refers to operations such as file storage, file synchronization, file uploading, and file reading refers to processes such as file downloading. The corresponding interfaces may be referred to as a file write interface and a file read interface.
In one embodiment, the number of the interactive platforms (which may be referred to as a volume) managed by the file management platform is at least one, and the files between the interactive platforms are independent from each other, and the accumulation of the file capacity of each interactive platform is the file capacity in the whole storage system. Compared with a mode of storing files through a single storage server, the embodiment of the invention can realize large-capacity storage.
In one embodiment, after each storage server stores the corresponding file information, the file management platform may determine an ID of the corresponding file according to the stored file, name the corresponding file according to a predetermined rule, and generate a corresponding file link (URL) for the file. Therefore, after each storage server stores the file information, the file management platform may further perform the following steps: and returning the ID, the file name and/or the file link of the file to the first interactive platform.
For a plurality of storage servers in an interactive platform, the embodiment enables the files stored by the storage servers to be consistent. Therefore, a plurality of storage servers in one interactive platform can play roles of redundant backup and load balancing, and when one storage server is offline, corresponding work can be completed through other storage servers.
In one embodiment, after the step of returning the connection address of the second interactive platform to the first interactive platform, the method further includes: determining metadata information according to the second interactive platform and the file information; sending a metadata storage instruction to the attribute management server; the metadata storage instruction causes the attribute management server to store the metadata information in a key-value pair manner.
In one embodiment, metadata information is stored in key-value pairs, the stored metadata information constituting a file attribute list, which may contain a plurality of key-value pairs.
The embodiment manages the metadata information, and can effectively improve the efficiency of determining the second interactive platform.
In one embodiment, the file metadata refers to the related attributes of the file, expressed in the form of key value pairs (key value), such as: the key value pair is width 1024, where key is width and value is 1024. The metadata information indicates a file metadata. Therefore, the implementation procedure for causing the attribute management server to store the metadata information in a key-value pair manner may be: and forming a key value pair by the second interactive platform and the file information according to the format of the key value pair, and storing the key value pair. Therefore, after receiving an interface call instruction sent by a certain first interaction platform, the file management platform can search the corresponding metadata information according to the file information and determine the corresponding second interaction platform.
In one embodiment, the step of determining a second interaction platform corresponding to the first interaction platform includes: if the interface is a file reading interface, acquiring corresponding metadata information from the attribute management server according to the file information of the first interactive platform; determining a corresponding second interactive platform according to the corresponding metadata information; after the step of returning the connection address of the second interactive platform to the first interactive platform, the method further includes: determining an online storage server in the second interactive platform, and controlling the first interactive platform to establish connection with the online storage server; and enabling the first interaction platform to read the corresponding file from the online storage server.
The second interactive platform comprises a plurality of storage servers, and a distributed system is formed. The service is not provided as a single server but as a cluster of servers. Thus, unless all service nodes are down, service is not affected. Therefore, each storage server in the second interactive platform can be added or disconnected at any time without influencing on-line service, and the stability of the whole system can be ensured.
In this embodiment, after receiving a file write interface call instruction sent by a first interaction platform, an online storage server is selected from the corresponding interaction platform, and a corresponding file is read from the online storage server. Since the interactive platform includes a plurality of storage servers, even if a certain storage server goes offline, the response to the interactive request of the first interactive platform is not affected.
In one embodiment, before the step of determining the second interaction platform corresponding to the first interaction platform, the method further includes: and acquiring platform parameters and interaction parameters of the first interaction platform, performing parameter verification on the platform parameters and the interaction parameters, and performing other subsequent processes if the platform parameters and the interaction parameters pass the verification. The platform parameters may refer to parameters such as a type of the platform, a device model, an IP address, and the like, and the interaction parameters may refer to an interaction request, history interaction information, an interaction start request, and the like of the first interaction platform.
In one embodiment, the step of determining a second interaction platform corresponding to the first interaction platform includes: determining an interaction platform with sufficient capacity from a plurality of interaction platforms according to a preset routing rule, and using the interaction platform as a second interaction platform corresponding to the first interaction platform; if the capacity of the interaction platforms is found to be insufficient, receiving information of a new interaction platform sent by a management server, and using the new interaction platform as a second interaction platform corresponding to the first interaction platform according to the information; the information is obtained after the management server registers for a new interaction platform when finding the new interaction platform.
The preset routing rule refers to a method for selecting an interactive platform, and the content of the preset routing rule is not limited in the embodiment of the invention. Capacity refers to storage capacity, storage space, etc.
In one embodiment, all storage servers in the file management platform are peer-to-peer and may increase or decrease over time depending on the server's pressure.
In one embodiment, the management server may implement self-registration self-discovery functionality of the platform. May refer to a service discovery framework such as Eureka service. In the system operation process, the management server continuously detects the state of each interactive platform, when a new interactive platform is connected to join the system, the management server registers for the new interactive platform according to the platform information of the new interactive platform, and sends the platform information and the registration information of the platform to the file management platform. Therefore, the file management platform can acquire the information of the new interaction platform when the capacity of the existing interaction platform is insufficient, and the file interaction between the first interaction platform and the new interaction platform is realized.
In one embodiment, if the file management platform finds that the capacities of the interaction platforms are insufficient and does not receive the information of the new interaction platform sent by the management server, the file management platform may send out a capacity warning message to remind the user of the added interaction platform.
In one embodiment, the step of determining a second interaction platform corresponding to the first interaction platform further includes: after a second interaction platform corresponding to the first interaction platform is determined according to a preset routing rule, if the capacity of each storage server in the second interaction platform is found to be insufficient, information of a new storage server sent by a management server can be received, and the corresponding interaction platform is continuously used as the second interaction platform corresponding to the first interaction platform.
In this embodiment, when the storage space is insufficient or is about to be exhausted, a new interaction platform can be dynamically added. One or more interactive platforms are added and configured as a new volume, so that the capacity of the storage system is increased, and all files written by the first interactive platform can be saved. The problems of large-capacity storage and load balancing are effectively solved, and the expansion is convenient.
In one embodiment, after the step of returning the connection address of the second interactive platform to the first interactive platform, the method further includes: acquiring interaction information when the first interaction platform and the second interaction platform perform file interaction, and sending the interaction information to a file service database; and enabling the file service database to store the interaction information.
In one embodiment, the interaction information refers to operation audit flow information such as interaction time, interaction mode, interaction content and the like generated when the first interaction platform and the second interaction platform interact.
In one embodiment, the file service database may also be used to store file information.
The file service database of the embodiment records file information and operates audit flow, facilitates system tracking management, and can effectively locate the root of a problem when the problem occurs.
In an embodiment, before the step of receiving the interface call instruction sent by the first interaction platform, the method further includes: a REST interface compatible with a plurality of first interaction platforms is provided.
REST is called Resource Representational State Transfer (REST), and colloquially, resources perform State Transfer in a network in some expression form. The rest http interaction refers to a RESTful architecture and provides a RESTful API, and the purpose is to provide a set of service interfaces to satisfy all clients. Therefore, the REST interface provided by this embodiment is compatible with the first interactive platform written based on different languages (java, Python, c).
In this embodiment, the first interactive platform only needs to use the http protocol to call the provided service interface as required. Different platforms can use the service provided by the system, thereby effectively improving the applicability and being beneficial to the interaction of multiple platforms.
In one embodiment, as shown in fig. 3, a file interaction method is provided, which is described by taking the method as an example applied to the file management platform side in fig. 1, and includes the following steps:
s301, providing a REST interface compatible with a plurality of first interaction platforms.
S302, receiving an interface calling instruction sent by the first interactive platform.
And S303, if the capacity of each existing interactive platform is insufficient, receiving information of a new interactive platform sent by a management server, and using the new interactive platform as a second interactive platform corresponding to the first interactive platform according to the information.
S304, returning the connection address of the second interactive platform to the first interactive platform.
S305, determining file information of the first interaction platform.
S306, if the interface is a file writing interface, sending a first file storage instruction to each storage server of the second interactive platform; the first file storage instruction causes the storage servers to store the file information.
S307, determining metadata information according to the second interactive platform and the file information; sending a metadata storage instruction to the attribute management server; the metadata storage instruction causes the attribute management server to store the metadata information in a key-value pair manner.
S308, if the interface is a file reading interface, acquiring corresponding metadata information from the attribute management server according to the file information of the first interactive platform; determining a corresponding second interactive platform according to the corresponding metadata information; determining an online storage server in the second interactive platform, and controlling the first interactive platform to establish connection with the online storage server; and enabling the first interaction platform to read the corresponding file from the online storage server.
S309, acquiring interaction information when the first interaction platform and the second interaction platform carry out file interaction, and sending the interaction information to a file service database; and enabling the file service database to store the interaction information.
In the embodiment, through the centralized management of the first interactive platform and the second interactive platform, the first interactive platform is not required to finish specific file services when interaction is carried out between the platforms, so that the file interaction efficiency between the platforms can be effectively improved, and equal services can be provided for each first interactive platform and each second interactive platform.
In order to better understand the method, taking the first interaction platform as the client and the second interaction platform as the storage node as an example, an application example of the file interaction method of the present invention is described in detail below, and the application example is applied to a file interaction system.
1) The file management platform provides a REST interface compatible with a plurality of clients, and the clients can be based on java, Python, c and other languages.
2) And if a certain client needs to upload the file A to the storage node, the client sends a file writing interface calling instruction to the file management platform.
3) And after receiving the file writing interface calling instruction, the file management platform acquires the platform parameters and the interaction parameters of the client, and verifies the platform parameters and the interaction parameters.
4) The file management platform determines a storage node with sufficient capacity from a plurality of storage nodes in the file interaction system according to a routing rule of the file interaction system, and the storage node is used as a target storage node corresponding to the client; and if the file management platform finds that the capacities of the storage nodes are insufficient, receiving information of a new storage node sent by a management server, and taking the new storage node as a target storage node corresponding to the client.
5) After the target storage node is determined, the file management platform returns the connection address of the target storage node to the client.
6) And the client establishes connection with the target storage node according to the connection address.
7) And the file management platform determines the file information of the client and sends a first file storage instruction to each storage server contained in the target storage node.
8) And each storage server stores the file A according to the first file storage instruction.
9) After the storage servers store the file A, the file management platform determines the ID, the file name and the file link of the file A according to the storage information of the file A and returns the ID, the file name and the file link of the file to the client.
10) And the file management platform determines metadata information according to the target storage node and the file information and sends a metadata storage instruction to the attribute management server.
11) The attribute management server stores the metadata information in a key-value pair manner.
12) The file management platform acquires interaction information when the client and the target storage node perform file interaction, and sends the interaction information to the file service database.
13) The file service database stores the interaction information.
In the embodiment, through the centralized management of the first interactive platform and the second interactive platform, the first interactive platform is not required to finish specific file services when interaction is carried out between the platforms, so that the file interaction efficiency between the platforms can be effectively improved, and equal services can be provided for the first interactive platform and the second interactive platform.
It should be noted that, for the sake of simplicity, the foregoing method embodiments are described as a series of acts or combinations, but those skilled in the art should understand that the present invention is not limited by the described order of acts, as some steps may be performed in other orders or simultaneously according to the present invention.
Based on the same idea as the file interaction method in the above embodiment, the present invention also provides a file interaction system, which can be used to execute the above file interaction method. For convenience of explanation, the structure diagram of the embodiment of the file interaction system only shows the part related to the embodiment of the present invention, and those skilled in the art will understand that the illustrated structure does not constitute a limitation of the system, and may include more or less components than those illustrated, or combine some components, or arrange different components.
As shown in fig. 4, the file interaction system includes a first interaction platform 401, a file management platform 402 and a second interaction platform 403, which are described in detail as follows:
the first interaction platform 401 is configured to send an interface call instruction to the file management platform; the interface is compatible with multiple first interaction platforms 401.
The file management platform is used for coordinating file interaction between the first interaction platform and the second interaction platform. May be one server, or may include a plurality of servers, for example: the system comprises a file application server, a first interaction platform and a second interaction platform, wherein the file application server is used for interacting with the first interaction platform outside and responding to an instruction sent by the first interaction platform; and a Tracker (Tracker) for interacting with the plurality of internal interaction platforms and determining a second interaction platform corresponding to the first interaction platform from the plurality of interaction platforms.
The file management platform 402 is configured to determine, according to the interface call instruction, a second interaction platform 403 corresponding to the first interaction platform 401; and returning the connection address of the second interactive platform 403 to the first interactive platform 401.
The first interactive platform 401 and the second interactive platform 403 are configured to establish a connection according to the connection address, and perform file interaction through the connection.
In the embodiment, through the centralized management of the first interactive platform and the second interactive platform, the first interactive platform is not required to finish specific file services when interaction is carried out between the platforms, so that the file interaction efficiency between the platforms can be effectively improved, and equal services can be provided for each first interactive platform and each second interactive platform.
In one embodiment, the second interactive platform comprises a plurality of storage servers; the interface comprises a file writing interface and a file reading interface; the file management platform is further used for determining file information of the first interaction platform; if the interface is a file writing interface, sending a first file storage instruction to each storage server of the second interactive platform; the first file storage instruction causes the storage servers to store the file information.
In one embodiment, the file management platform is further configured to determine metadata information according to the second interaction platform and the file information; sending a metadata storage instruction to the attribute management server; the metadata storage instruction causes the attribute management server to store the metadata information in a key-value pair manner.
In an embodiment, the file management platform is further configured to, if the interface is a file reading interface, obtain corresponding metadata information from the attribute management server according to the file information of the first interaction platform; determining a corresponding second interactive platform according to the corresponding metadata information; the file management platform is also used for determining an online storage server in the second interactive platform and controlling the first interactive platform to establish connection with the online storage server; and enabling the first interaction platform to read the corresponding file from the online storage server.
In an embodiment, the file management platform is further configured to determine, according to a preset routing rule, an interaction platform with sufficient capacity from the multiple interaction platforms, as a second interaction platform corresponding to the first interaction platform; if the capacity of the interaction platforms is found to be insufficient, receiving information of a new interaction platform sent by a management server, and using the new interaction platform as a second interaction platform corresponding to the first interaction platform according to the information; the information is obtained after the management server registers for a new interaction platform when finding the new interaction platform.
In one embodiment, the file management platform is further configured to obtain interaction information when the first interaction platform and the second interaction platform perform file interaction, and send the interaction information to a file service database; and enabling the file service database to store the interaction information.
In one embodiment, the file management platform is further configured to provide a REST interface compatible with a plurality of first interaction platforms.
In one embodiment, as shown in fig. 5, there is provided a file interaction system including an external application (i.e., a first interaction platform), a configServer (i.e., for providing dynamic configuration of system parameters), a Eureka service (i.e., a management server for self-registration and self-discovery of a system), a file application service, a tracker, a file service database, a storage node (i.e., a second interaction platform), and a storage server for file storage. Wherein the file application service and the tracker constitute the file management platform in the foregoing embodiments.
It should be noted that the file interaction system of the present invention corresponds to the file interaction method of the present invention one to one, and the technical features and the advantageous effects described in the embodiments of the file interaction method are all applicable to the embodiments of the file interaction system, and specific contents may refer to the description in the embodiments of the method of the present invention, which is not described herein again, and thus it is stated that.
In addition, in the above exemplary embodiment of the file interaction system, the logical division of the program modules is only an example, and in practical applications, the above functions may be allocated by different program modules according to needs, for example, due to the configuration requirements of corresponding hardware or the convenience of implementation of software, that is, the internal structure of the file interaction system is divided into different program modules to complete all or part of the above described functions.
The file interaction method provided by the application can be applied to the computer equipment shown in FIG. 6. The computer device may be a server, and its internal structure diagram may be as shown in fig. 6. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing data such as interaction information and file information. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a file interaction method.
Those skilled in the art will appreciate that the architecture shown in fig. 6 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program: receiving an interface calling instruction sent by a first interactive platform; the interface is compatible with a plurality of first interaction platforms; determining a second interaction platform corresponding to the first interaction platform according to the interface calling instruction; returning the connection address of the second interactive platform to the first interactive platform; and establishing connection between the first interactive platform and the second interactive platform according to the connection address, and performing file interaction through the connection.
In one embodiment, the processor, when executing the computer program, further performs the steps of: the second interactive platform comprises a plurality of storage servers; the interface comprises a file writing interface and a file reading interface; after the step of returning the connection address of the second interactive platform to the first interactive platform, the method further includes: determining file information of the first interaction platform; if the interface is a file writing interface, sending a first file storage instruction to each storage server of the second interactive platform; the first file storage instruction causes the storage servers to store the file information.
In one embodiment, the processor, when executing the computer program, further performs the steps of: after the step of returning the connection address of the second interactive platform to the first interactive platform, the method further includes: determining metadata information according to the second interactive platform and the file information; sending a metadata storage instruction to the attribute management server; the metadata storage instruction causes the attribute management server to store the metadata information in a key-value pair manner.
In one embodiment, the processor, when executing the computer program, further performs the steps of: the step of determining a second interactive platform corresponding to the first interactive platform includes: if the interface is a file reading interface, acquiring corresponding metadata information from the attribute management server according to the file information of the first interactive platform; determining a corresponding second interactive platform according to the corresponding metadata information; after the step of returning the connection address of the second interactive platform to the first interactive platform, the method further includes: determining an online storage server in the second interactive platform, and controlling the first interactive platform to establish connection with the online storage server; and enabling the first interaction platform to read the corresponding file from the online storage server.
In one embodiment, the processor, when executing the computer program, further performs the steps of: the step of determining a second interactive platform corresponding to the first interactive platform includes: determining an interaction platform with sufficient capacity from a plurality of interaction platforms according to a preset routing rule, and using the interaction platform as a second interaction platform corresponding to the first interaction platform; if the capacity of the interaction platforms is found to be insufficient, receiving information of a new interaction platform sent by a management server, and using the new interaction platform as a second interaction platform corresponding to the first interaction platform according to the information; the information is obtained after the management server registers for a new interaction platform when finding the new interaction platform.
In one embodiment, the processor, when executing the computer program, further performs the steps of: after the step of returning the connection address of the second interactive platform to the first interactive platform, the method further includes: acquiring interaction information when the first interaction platform and the second interaction platform perform file interaction, and sending the interaction information to a file service database; and enabling the file service database to store the interaction information.
In one embodiment, the processor, when executing the computer program, further performs the steps of: before the step of receiving the interface call instruction sent by the first interactive platform, the method further includes: a REST interface compatible with a plurality of first interaction platforms is provided.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of: receiving an interface calling instruction sent by a first interactive platform; the interface is compatible with a plurality of first interaction platforms; determining a second interaction platform corresponding to the first interaction platform according to the interface calling instruction; returning the connection address of the second interactive platform to the first interactive platform; and establishing connection between the first interactive platform and the second interactive platform according to the connection address, and performing file interaction through the connection.
In one embodiment, the computer program when executed by the processor further performs the steps of: the second interactive platform comprises a plurality of storage servers; the interface comprises a file writing interface and a file reading interface; after the step of returning the connection address of the second interactive platform to the first interactive platform, the method further includes: determining file information of the first interaction platform; if the interface is a file writing interface, sending a first file storage instruction to each storage server of the second interactive platform; the first file storage instruction causes the storage servers to store the file information.
In one embodiment, the computer program when executed by the processor further performs the steps of: after the step of returning the connection address of the second interactive platform to the first interactive platform, the method further includes: determining metadata information according to the second interactive platform and the file information; sending a metadata storage instruction to the attribute management server; the metadata storage instruction causes the attribute management server to store the metadata information in a key-value pair manner.
In one embodiment, the computer program when executed by the processor further performs the steps of: the step of determining a second interactive platform corresponding to the first interactive platform includes: if the interface is a file reading interface, acquiring corresponding metadata information from the attribute management server according to the file information of the first interactive platform; determining a corresponding second interactive platform according to the corresponding metadata information; after the step of returning the connection address of the second interactive platform to the first interactive platform, the method further includes: determining an online storage server in the second interactive platform, and controlling the first interactive platform to establish connection with the online storage server; and enabling the first interaction platform to read the corresponding file from the online storage server.
In one embodiment, the computer program when executed by the processor further performs the steps of: the step of determining a second interactive platform corresponding to the first interactive platform includes: determining an interaction platform with sufficient capacity from a plurality of interaction platforms according to a preset routing rule, and using the interaction platform as a second interaction platform corresponding to the first interaction platform; if the capacity of the interaction platforms is found to be insufficient, receiving information of a new interaction platform sent by a management server, and using the new interaction platform as a second interaction platform corresponding to the first interaction platform according to the information; the information is obtained after the management server registers for a new interaction platform when finding the new interaction platform.
In one embodiment, the computer program when executed by the processor further performs the steps of: after the step of returning the connection address of the second interactive platform to the first interactive platform, the method further includes: acquiring interaction information when the first interaction platform and the second interaction platform perform file interaction, and sending the interaction information to a file service database; and enabling the file service database to store the interaction information.
In one embodiment, the computer program when executed by the processor further performs the steps of: before the step of receiving the interface call instruction sent by the first interactive platform, the method further includes: a REST interface compatible with a plurality of first interaction platforms is provided.
It will be understood by those skilled in the art that all or part of the processes of the methods of the above embodiments may be implemented by a computer program, which is stored in a computer readable storage medium and sold or used as a stand-alone product. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
The terms "comprises" and "comprising," and any variations thereof, of embodiments of the present invention are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or (module) elements is not limited to only those steps or elements but may alternatively include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-described examples merely represent several embodiments of the present invention and should not be construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A file interaction method, performed by a file management platform, the method comprising:
receiving an interface calling instruction sent by a first interactive platform; the interface is compatible with a plurality of first interaction platforms;
determining a second interaction platform corresponding to the first interaction platform according to the interface calling instruction; the second interactive platform comprises a plurality of storage servers;
returning the connection address of the second interactive platform to the first interactive platform; enabling the first interactive platform and the second interactive platform to establish connection according to the connection address, and performing file interaction through the connection;
if the interface is a file reading interface, after the step of returning the connection address of the second interaction platform to the first interaction platform, the method further comprises:
determining an online storage server in the second interactive platform, and controlling the first interactive platform to establish connection with the online storage server; and enabling the first interaction platform to read the corresponding file from the online storage server.
2. The file interaction method according to claim 1, wherein the interface includes a file writing interface and a file reading interface;
after the step of returning the connection address of the second interactive platform to the first interactive platform, the method further includes:
determining file information of the first interaction platform;
if the interface is a file writing interface, sending a first file storage instruction to each storage server of the second interactive platform; the first file storage instruction causes the storage servers to store the file information.
3. The file interaction method according to claim 2, wherein after the step of returning the connection address of the second interaction platform to the first interaction platform, the method further comprises:
determining metadata information according to the second interactive platform and the file information;
sending a metadata storage instruction to the attribute management server; the metadata storage instruction causes the attribute management server to store the metadata information in a key-value pair manner.
4. The file interaction method according to claim 3, wherein the step of determining a second interaction platform corresponding to the first interaction platform comprises:
if the interface is a file reading interface, acquiring corresponding metadata information from the attribute management server according to the file information of the first interactive platform;
and determining a corresponding second interactive platform according to the corresponding metadata information.
5. The file interaction method according to claim 1, wherein the step of determining a second interaction platform corresponding to the first interaction platform comprises:
determining an interaction platform with sufficient capacity from a plurality of interaction platforms according to a preset routing rule, and using the interaction platform as a second interaction platform corresponding to the first interaction platform;
if the capacity of the interaction platforms is found to be insufficient, receiving information of a new interaction platform sent by a management server, and using the new interaction platform as a second interaction platform corresponding to the first interaction platform according to the information; the information is obtained after the management server registers for a new interaction platform when finding the new interaction platform.
6. The file interaction method according to claim 1, wherein after the step of returning the connection address of the second interaction platform to the first interaction platform, the method further comprises:
acquiring interaction information when the first interaction platform and the second interaction platform perform file interaction, and sending the interaction information to a file service database; and enabling the file service database to store the interaction information.
7. The file interaction method according to any one of claims 1 to 6, wherein before the step of receiving the interface call instruction sent by the first interaction platform, the method further comprises:
a REST interface compatible with a plurality of first interaction platforms is provided.
8. A file interaction system, comprising: the system comprises a first interaction platform, a second interaction platform and a file management platform; the second interactive platform comprises a plurality of storage servers;
the first interactive platform is used for sending an interface calling instruction to the file management platform; the interface is compatible with a plurality of first interaction platforms;
the file management platform is used for determining a second interaction platform corresponding to the first interaction platform according to the interface calling instruction; returning the connection address of the second interactive platform to the first interactive platform;
the first interactive platform and the second interactive platform are used for establishing connection according to the connection address and carrying out file interaction through the connection;
the file management platform is also used for determining an online storage server in the second interactive platform and controlling the first interactive platform to establish connection with the online storage server; and enabling the first interaction platform to read the corresponding file from the online storage server.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN201810482360.8A 2018-05-18 2018-05-18 File interaction method, system, computer equipment and storage medium Active CN108733805B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810482360.8A CN108733805B (en) 2018-05-18 2018-05-18 File interaction method, system, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810482360.8A CN108733805B (en) 2018-05-18 2018-05-18 File interaction method, system, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN108733805A CN108733805A (en) 2018-11-02
CN108733805B true CN108733805B (en) 2020-12-08

Family

ID=63938487

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810482360.8A Active CN108733805B (en) 2018-05-18 2018-05-18 File interaction method, system, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN108733805B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110049017B (en) * 2019-03-22 2021-11-16 口碑(上海)信息技术有限公司 Message intercommunication device and method between heterogeneous platforms

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101951572A (en) * 2010-09-02 2011-01-19 浙江鸿程计算机系统有限公司 Method for realizing interactive communication between INTERNET server and mobile terminal by using short message trigger mode
US8819241B1 (en) * 2013-03-14 2014-08-26 State Farm Mutual Automobile Insurance Company System and method for a self service portal and automation for internally hosted virtual server resources

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101030927B (en) * 2006-03-03 2010-10-13 中国电信股份有限公司 Interface telecommunication between OSS subsystems based on middleware
US7984115B2 (en) * 2006-12-08 2011-07-19 Microsoft Corporation Extensible application platform
CN101252589B (en) * 2008-03-25 2011-01-05 中国科学院计算技术研究所 Data buffer apparatus and network storage system using the same and buffer method
CN102014150B (en) * 2010-09-29 2013-12-11 厦门市美亚柏科信息股份有限公司 Distributed small file storage system based on UDP (User Datagram Protocol) and data processing method thereof
CN102214222B (en) * 2011-06-15 2013-08-21 中国电信股份有限公司 Presorting and interacting system and method for acquiring scene information through mobile phone
CN103533006B (en) * 2012-07-06 2019-09-24 中兴通讯股份有限公司 A kind of joint cloud disk client, server, system and joint cloud disk service method
US10353754B2 (en) * 2015-12-31 2019-07-16 Entefy Inc. Application program interface analyzer for a universal interaction platform

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101951572A (en) * 2010-09-02 2011-01-19 浙江鸿程计算机系统有限公司 Method for realizing interactive communication between INTERNET server and mobile terminal by using short message trigger mode
US8819241B1 (en) * 2013-03-14 2014-08-26 State Farm Mutual Automobile Insurance Company System and method for a self service portal and automation for internally hosted virtual server resources

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
应用于EMS高级应用系统的BPA程序快速调用方法与接口设计;郭文鑫 等;《电力系统保护与控制》;20140601;第42卷(第11期);61-66 *

Also Published As

Publication number Publication date
CN108733805A (en) 2018-11-02

Similar Documents

Publication Publication Date Title
KR101996624B1 (en) Binding crud-type protocols in distributed agreement protocols
US8341285B2 (en) Method and system for transferring files
CN107172214B (en) Service node discovery method and device with load balancing function
CN113268308B (en) Information processing method, device and storage medium
CN105450759A (en) System mirror image management method and device
CN111756818B (en) File transfer method, device, equipment and storage medium
CN112333289A (en) Reverse proxy access method, device, electronic equipment and storage medium
CN108733805B (en) File interaction method, system, computer equipment and storage medium
CN112732775A (en) Method and device for processing block node data, computer equipment and storage medium
CN111614694A (en) Communication method, communication device, electronic equipment and computer-readable storage medium
CN112044061A (en) Game picture processing method and device, electronic equipment and storage medium
CN113055444B (en) File sharing method and related device thereof
US20220263759A1 (en) Addressing method, addressing system, and addressing apparatus
CN116701004A (en) Cloud function development method, device, electronic device and storage medium
CN110597540A (en) Version updating method and device of financial terminal, server and storage medium
CN115129708A (en) Data processing method, data processing device, storage medium and electronic equipment
CN111970358A (en) Decentralized cloud computing platform, service deployment method, service access method and components
CN115955437B (en) Data transmission method, device, equipment and medium
CN112532670B (en) Data processing method and device
CN115604250A (en) File sharing method and device, electronic equipment and computer readable storage medium
CN115858100A (en) Service migration method, device, processing equipment and storage medium
CN117376127A (en) Project upgrading method and device based on node affinity and storage medium
CN116089154A (en) Cloud native application fault processing method, system, equipment and computer medium
CN115514798A (en) Multi-device multi-port connection method, system, electronic device and storage medium
CN115936413A (en) Service request method, system, storage medium and terminal equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: Room 1901, building 5, Shenzhen new generation industrial park, 136 Zhongkang Road, Meidu community, Meilin street, Futian District, Shenzhen, Guangdong 518000

Patentee after: Zhaoyin yunchuang Information Technology Co.,Ltd.

Address before: 518000 Room 201, building A, No. 1, Qian Wan Road, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong (Shenzhen Qianhai business secretary Co., Ltd.)

Patentee before: MBCLOUD (SHENZHEN) INFORMATION TECHNOLOGY Co.,Ltd.

PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: File interaction methods, systems, computer devices, and storage media

Effective date of registration: 20231117

Granted publication date: 20201208

Pledgee: Shenzhen Branch of China Merchants Bank Co.,Ltd.

Pledgor: Zhaoyin yunchuang Information Technology Co.,Ltd.

Registration number: Y2023980065913