CN113163003A - File transmission method, cloud server, client and fog node router - Google Patents

File transmission method, cloud server, client and fog node router Download PDF

Info

Publication number
CN113163003A
CN113163003A CN202110382829.2A CN202110382829A CN113163003A CN 113163003 A CN113163003 A CN 113163003A CN 202110382829 A CN202110382829 A CN 202110382829A CN 113163003 A CN113163003 A CN 113163003A
Authority
CN
China
Prior art keywords
file
client
fog node
target
request
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.)
Granted
Application number
CN202110382829.2A
Other languages
Chinese (zh)
Other versions
CN113163003B (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.)
Jingdong Technology Information Technology Co Ltd
Original Assignee
Beijing Huijun 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 Beijing Huijun Technology Co ltd filed Critical Beijing Huijun Technology Co ltd
Priority to CN202110382829.2A priority Critical patent/CN113163003B/en
Publication of CN113163003A publication Critical patent/CN113163003A/en
Priority to PCT/CN2022/085914 priority patent/WO2022214085A1/en
Application granted granted Critical
Publication of CN113163003B publication Critical patent/CN113163003B/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
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application provides a file transmission method, a cloud server, a client and a fog node router, and relates to the technical field of communication, wherein the method comprises the following steps: the cloud server receives a file transmission request sent by a client; the cloud server determines a target fog node router according to the file transmission request and sends a connection request to the target fog node router, wherein the file transmission request and the connection request carry the identification of the client, so that the target fog node router establishes file transmission connection with the client according to the identification of the client and performs file transmission through the file transmission connection. The method and the device have the advantages that the client and the target fog node router are connected through file transmission between the client and the target fog node router, file transmission is carried out, so that file transmission service of an external network can be provided for the client without data transfer, in addition, the network bandwidth of the fog node router is fully utilized during file transmission, the file transmission rate is improved, the types and the sizes of transmitted files are not limited, and the user experience is improved.

Description

File transmission method, cloud server, client and fog node router
Technical Field
The application relates to the technical field of communication, in particular to a file transmission method, a cloud server, a client and a fog node router.
Background
In The related art, when an electronic device such as a mobile phone is located in an extranet environment such as a 4G (The 4th Generation mobile communication technology, fourth Generation mobile communication technology) network or a non-local network, a storage download service of The extranet is usually provided for The electronic device through a transit service, for example, The electronic device obtains data from a source data server through a transit server. The cost of data transfer is high, and in consideration of the cost problem of data transfer, when a storage downloading service of an external network is provided through a transfer service, the speed, size or type of file transmission is usually limited artificially, so that the problems of low file transmission speed, limited file size or type easily occur when electronic equipment downloads or stores files through the external network.
Disclosure of Invention
The present application is directed to solving, at least to some extent, one of the technical problems in the related art.
The application provides a file transmission method, a cloud server, a client, a fog node router, a file transmission system, an electronic device and a storage medium, and aims to solve the technical problems that in the related art, when a transfer server provides storage downloading service of an external network for the electronic device, the file transmission rate is low, and the size or the type of a file is limited.
An embodiment of a first aspect of the present application provides a file transmission method, including: the method comprises the steps that a cloud server receives a file transmission request sent by a client, wherein the file transmission request carries an identifier of the client; and the cloud server determines a target fog node router according to the file transmission request and sends a connection request to the target fog node router, wherein the connection request carries the identification of the client, so that the target fog node router establishes file transmission connection with the client according to the identification of the client and performs file transmission through the file transmission connection.
The embodiment of the second aspect of the present application provides another file transmission method, including: a client sends a file transmission request to a cloud server so that the cloud server determines a target fog node router according to the file transmission request and sends a connection request to the target fog node router, wherein the file transmission request and the connection request carry an identifier of the client; and after the client establishes file transmission connection with the target fog node router according to the identification of the client, file transmission is carried out through the file transmission connection.
An embodiment of a third aspect of the present application provides another file transmission method, including: the method comprises the steps that a fog node router receives a connection request sent by a cloud server, wherein the connection request is sent to the fog node router after the cloud server receives a file transmission request sent to the cloud server by a client, and the file transmission request and the connection request carry an identifier of the client; the fog node router establishes file transmission connection with the client according to the identification of the client; and the fog node router and the client side are connected through the file transmission to perform file transmission.
An embodiment of a fourth aspect of the present application provides a cloud server, including: the receiving module is used for receiving a file transmission request sent by a client, wherein the file transmission request carries an identifier of the client; and the first determining module is used for determining a target fog node router according to the file transmission request and sending a connection request to the target fog node router, wherein the connection request carries the identifier of the client, so that the target fog node router establishes file transmission connection with the client according to the identifier of the client and performs file transmission through the file transmission connection.
An embodiment of a fifth aspect of the present application provides a client, including: the sending module is used for sending a file transmission request to a cloud server so that the cloud server determines a target fog node router according to the file transmission request and sends a connection request to the target fog node router, wherein the file transmission request and the connection request carry an identifier of the client; and the first transmission module is used for transmitting the file through the file transmission connection after the client establishes the file transmission connection with the target fog node router according to the identification of the client.
An embodiment of a sixth aspect of the present application provides a fog node router, including: the cloud node router comprises a receiving module, a sending module and a sending module, wherein the receiving module is used for receiving a connection request sent by a cloud server, the connection request is sent to the fog node router after the cloud server receives a file transmission request sent by a client to the cloud server, and the file transmission request and the connection request carry an identifier of the client; the establishing module is used for establishing file transmission connection with the client according to the identification of the client; and the transmission module is used for carrying out file transmission with the client through the file transmission connection.
An embodiment of a seventh aspect of the present application provides a file transmission system, including a client, a cloud server, and a plurality of cloud node routers; the cloud server is used for receiving a file transmission request sent by the client, determining a target fog node router in the multiple fog node routers according to the file transmission request, and sending a connection request to the target fog node router, wherein the file transmission request and the connection request carry an identifier of the client; the target fog node router is used for establishing file transmission connection with the client according to the identification of the client after receiving the connection request, and performing file transmission with the client through the file transmission connection; and the client is used for sending the file transmission request to the cloud server and carrying out file transmission with the target fog node router through the file transmission connection.
An eighth aspect of the present application provides an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the file transfer method as set forth in the first aspect embodiment, the second aspect embodiment or the third aspect embodiment of the present application.
An embodiment of a ninth aspect of the present application proposes a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute a file transfer method as set forth in the embodiment of the first aspect, the embodiment of the second aspect, or the embodiment of the third aspect of the present application.
A tenth aspect of the present application provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the computer program implements the file transmission method as set forth in the first aspect of the present application, the second aspect of the present application, or the third aspect of the present application.
The technical scheme that this application provided has following beneficial effect:
the method and the device have the advantages that the client and the target fog node router are connected through file transmission between the client and the target fog node router, file transmission is carried out, so that file transmission service of an external network can be provided for the client without data transfer, in addition, the network bandwidth of the fog node router is fully utilized during file transmission, the file transmission rate is improved, the types and the sizes of transmitted files are not limited, and the user experience is improved.
Additional aspects and advantages of the present application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the present application.
Drawings
The foregoing and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is a schematic view of an application scenario of a file transmission method according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a file transmission method according to an embodiment of the present application;
fig. 3 is another schematic flow chart of a file transmission method according to an embodiment of the present application;
fig. 4 is a schematic flowchart illustrating a process of determining a data type of a file in a file transmission method according to an embodiment of the present application;
fig. 5 is an exemplary diagram for determining a data type of a file in a file transmission method according to an embodiment of the present application;
fig. 6 is an exemplary diagram of communication manners between a cloud server and a fog node router, between multiple fog node routers, and between a fog node router and a local router, provided in the embodiment of the present application;
fig. 7 is a schematic flowchart of a file transmission method according to an embodiment of the present application;
fig. 8 is another schematic flow chart illustrating a file transmission method according to an embodiment of the present application;
fig. 9 is another schematic flow chart illustrating a file transmission method according to an embodiment of the present application;
fig. 10 is another schematic flow chart illustrating a file transmission method according to an embodiment of the present application;
fig. 11 is another schematic flow chart illustrating a file transmission method according to an embodiment of the present application;
fig. 12 is a diagram illustrating a file transmission method according to an embodiment of the present application;
fig. 13 is a schematic structural diagram of a cloud server according to an embodiment of the present application;
fig. 14 is another schematic structural diagram of a cloud server according to an embodiment of the present disclosure;
fig. 15 is a schematic structural diagram of a client according to an embodiment of the present application;
fig. 16 is a schematic structural diagram of a fog node router according to an embodiment of the present application;
FIG. 17 illustrates a block diagram of an exemplary electronic device suitable for use in implementing embodiments of the present application.
Detailed Description
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary and intended to be used for explaining the present application and should not be construed as limiting the present application.
It is understood that, in the related art, when the electronic device such as the mobile phone is in an extranet environment such as a 4G network or a non-local network, the extranet storage download service is generally provided for the electronic device through a transit service, for example, the electronic device obtains data from the source data server through a transit server. The cost of data transfer is high, and in consideration of the cost problem of data transfer, when a storage downloading service of an external network is provided through a transfer service, the speed, size or type of file transmission is usually limited artificially, so that the problems of low file transmission speed, limited file size or type easily occur when electronic equipment downloads or stores files through the external network.
The application mainly aims at the technical problems that the conditions of low file transmission rate and limited file size or type are easy to occur when storage downloading service of an external network is provided through a transfer service in the related technology, and provides a file transmission method, a cloud server, a client, a fog node router, a file transmission system, electronic equipment, a storage medium and a computer program product, wherein the file transmission rate can be increased, and the types and the sizes of transmitted files are not limited.
A file transfer method, a cloud server, a client, a cloud node router, a file transfer system, an electronic device, a storage medium, and a computer program product according to embodiments of the present application are described below with reference to the drawings.
First, with reference to fig. 1, an application scenario of the file transmission method provided in the embodiment of the present application is described. Fig. 1 is a schematic view of an application scenario of a file transmission method provided in an embodiment of the present application.
As shown in fig. 1, clients such as mobile phones and computers used by users, for example, a1, a2, and A3 in fig. 1, all correspond to a local router connected thereto, and the cloud server C may store an internal network address and an external network address of each router in advance. In the embodiment of the present application, for each client, a router having an external network address except a local router corresponding to the client may be used as each of the fog node routers.
Taking the clients a1 and a2 in fig. 1 as examples, for the client a1, routers each having an external network address other than the local router B1 corresponding to the client a1 may be used as the respective sniff node routers, and for the client a2, routers each having an external network address other than the local router B2 corresponding to the client a2 may be used as the respective sniff node routers. When the client a1 needs to perform file transfer, it may search the local router B1 corresponding to the client a1, and try to connect with the local router B1, and if the connection is successful, that is, the environment where the client a1 is located is an intranet environment, then provide the file transfer service for the client a1 through the local router B1. When the connection between the client a1 and the local router B1 fails, for example, when the network environment of the client a1 is a 4G network or a non-local network, the client a1 may send a file transfer request to the cloud server C, so that the cloud server C may determine a target cloud node router of the multiple cloud node routers according to the file transfer request, and send a connection request to the target cloud node router, where the file transfer request and the connection request carry an identifier of the client a1, and after receiving the connection request, the target cloud node router may establish a file transfer connection with the client a1 according to the identifier of the client a1, and perform file transfer with the client a1 through the file transfer connection.
Therefore, when the environment of the client is the extranet environment, the client and the target fog node router are connected through file transmission between the client and the target fog node router to transmit files, so that extranet file transmission service can be provided for the client without data transfer.
The file transmission method provided by the embodiment of the present application is described in detail below by taking a cloud server side, a client side, and a cloud node router side as examples.
First, a file transmission method provided in the embodiment of the present application is described with a cloud server side as an example. The file transmission method provided by the embodiment of the application is configured in the cloud server to be executed. The cloud server may be a relay server or other types of servers, which is not limited in this application.
Fig. 2 is a flowchart illustrating a file transmission method according to an embodiment of the present application.
As shown in fig. 2, the file transmission method may include the following steps 201 and 202.
In step 201, a cloud server receives a file transmission request sent by a client, where the file transmission request carries an identifier of the client.
The client may be a Personal Computer (PC), a mobile device, and the mobile device may be any device that needs to perform file transmission, such as a mobile phone, a tablet Computer, a Personal digital assistant, a wearable device, and a vehicle-mounted device, which is not limited in this application.
The client identification is used for uniquely identifying the client and can be set arbitrarily according to the requirement.
In an exemplary embodiment, when the environment where the client is located is an extranet environment, for example, when the network environment of the client is a 4G network or a non-local network, a file transfer request may be sent to the cloud server, where the file transfer request carries an identifier of the client, and correspondingly, the cloud server may receive the file transfer request sent by the client.
Step 202, the cloud server determines a target fog node router according to the file transmission request, and sends a connection request to the target fog node router, wherein the connection request carries an identifier of the client, so that the target fog node router establishes a file transmission connection with the client according to the identifier of the client, and performs file transmission through the file transmission connection.
In an exemplary embodiment, after receiving the file transfer request, the cloud server may select a target fog node router from the multiple fog node routers according to the file transfer request, and send a connection request to the target fog node router, so that the target fog node router establishes a file transfer connection with the client according to the identifier of the client, and the client may perform file transfer with the target fog node router through the file transfer connection.
Therefore, the client and the target fog node router can perform file transmission through the file transmission connection between the client and the target fog node router, so that file transmission service of an external network can be provided for the client without data transfer.
According to the file transmission method, after receiving a file transmission request which is sent by a client and carries an identification of the client, a cloud server can determine a target fog node router according to the file transmission request and send a connection request to the target fog node router, wherein the connection request carries the identification of the client, so that the target fog node router establishes file transmission connection with the client according to the identification of the client, and file transmission is carried out through the file transmission connection. Therefore, the client and the target fog node router are connected through file transmission between the client and the target fog node router to transmit files, so that file transmission service of an external network can be provided for the client without data transfer, network bandwidth of the fog node router is fully utilized during file transmission, file transmission rate is improved, types and sizes of transmitted files are not limited, and user experience is improved.
The following further describes the file transfer method in the embodiment of the present application with reference to fig. 3.
Fig. 3 is a flowchart illustrating a file transmission method according to an embodiment of the present application. As shown in fig. 3, the file transmission method includes the following steps 301-303.
Step 301, the cloud server receives a file transmission request sent by a client, wherein the file transmission request is a file access request, the file access request carries a target file identifier and an identifier of the client, and the cloud server stores a mapping relation table of a plurality of file identifiers and a plurality of fog node routers.
In an exemplary embodiment, the file transmission request may be a file access request or a file upload request, and the file transmission request is taken as the file access request in the embodiment of the present application for description.
The target file identification is used for uniquely identifying the target file which the client requests to access.
In an exemplary embodiment, when a client needs to access or download a file, the client can send a file access request to the cloud server.
And 302, the cloud server inquires a mapping relation table according to the target text identifier, and determines a fog node router corresponding to the target file identifier in the mapping relation table as a target fog node router.
In an exemplary embodiment, the cloud server may store the intranet addresses and the extranet addresses of a plurality of routers in advance, and, for each client, other routers each having an extranet address except for the local router corresponding to the client may be used as each fog node router.
The cloud server can store a plurality of file identifications and a mapping relation table of the plurality of fog node routers, so that when the cloud server receives a file access request sent by a client, the mapping relation table can be inquired according to a target text identification carried in the file access request, and a fog node router corresponding to the target file identification in the mapping relation table is determined to be a target fog node router.
And 303, the cloud server sends a connection request to the target fog node router, wherein the connection request carries the identifier of the client, so that the target fog node router establishes file transmission connection with the client according to the identifier of the client, and performs file transmission through the file transmission connection.
In an exemplary embodiment, after determining the target cloud node router, the cloud server may send a connection request carrying an identifier of the client to the target cloud node router, so that after receiving the connection request, the target cloud node router may establish a file transfer connection with the client according to the identifier of the client carried in the connection request, and further, the target cloud node router may perform file transfer with the client through the file transfer connection.
It should be noted that, when the file transmission request is a file access request carrying a target file identifier, the cloud server may also carry the target file identifier in a connection request sent to the target cloud node router by the cloud server, so that the target cloud node router may directly determine the target file according to the target file identifier after establishing a file transmission connection with the client according to the client identifier, and send the target file to the client, and the client does not need to send the target file identifier to the target cloud node router again after establishing the file transmission connection, thereby saving the number of interactions between the client and the target cloud node router, and improving the file transmission efficiency.
In an exemplary embodiment, since the cloud server needs to determine the target cloud node router according to the plurality of file identifiers and the mapping relationship table of the plurality of cloud node routers, correspondingly, the cloud server may determine and store the mapping relationship table in advance. That is, before step 302, the following steps 304-306 may also be included.
In step 304, the cloud server determines the device classes respectively corresponding to the plurality of cloud node routers.
In an example embodiment, the cloud server may determine a device class for each of a plurality of fog node routers. The mode of determining the equipment levels respectively corresponding to the plurality of fog node routers may be as follows: the cloud server determines the equipment quality of the plurality of fog node routers according to the online condition of the plurality of fog node routers; determining the network quality of the plurality of fog node routers according to the network bandwidth of the plurality of fog node routers; and determining the equipment grades respectively corresponding to the plurality of fog node routers according to the equipment quality and the network quality.
In an exemplary embodiment, for each fog node router, the cloud server may detect whether the fog node router is online at a first preset time interval, and determine the device quality of the fog node router according to the online condition of the fog node router within the first preset time range, and the cloud server may detect the network bandwidth of the fog node router at a second preset time interval, and determine the network quality of the fog node router according to the network bandwidth of the fog node router within the second preset time range, and further determine the device class of the fog node router according to the device quality and the network quality of the fog node router. The first preset time interval and the second preset time interval may be the same or different, and specific values of the preset time intervals may be set as required, which is not limited in this application. The first preset time range and the second preset time range may be the same or different, and specific values of the preset time ranges may be set as required, which is not limited in the present application.
For example, assuming that the first preset time interval and the second preset time interval are both 3s (seconds), the first preset time range and the second preset time range are 24 hours. The cloud server may preset a device quality metric value a and a network quality metric value b for each fog node router, assuming that an initial value of a is 1000 and an initial value of b is 0.
For each fog node router, the cloud server can detect whether the fog node router is on line or not at the frequency of 3s once, if the fog node router is on line, the equipment quality metric is added by 1, and if the fog node router is not on line, the equipment quality metric is subtracted by 1000. And, for each fog node router, the cloud server can detect the network bandwidth of the fog node router at the frequency of once every 3 seconds, if the network bandwidth is less than 10Mbps (megabit per second), the network quality metric b is subtracted by 1, if the network bandwidth is greater than 10Mbps and less than 100Mbps, the network quality metric is added by 1, if the network bandwidth is greater than 100Mbps and less than 200Mbps, the network quality metric is added by 2, and if the network bandwidth is greater than 200Mbps, the network quality metric is added by 3. And further, the equipment grade of the fog node router can be determined according to the values of the equipment quality metric value a and the network quality metric value b after 24 hours. For example, when the value of the device quality metric value a is less than 0 or the network quality metric value is less than 0, the device level of the fog node router is determined to be "poor"; when the value of the equipment quality metric value a is greater than 0 and less than 10000 and the network quality metric value is greater than 0 and less than 10000, determining that the equipment grade of the fog node router is 'medium'; when the value of the equipment quality metric value a is more than 10000 and less than 20000, and the network quality metric value is more than 0 and less than 10000, determining that the equipment grade of the fog node router is 'good'; when the value of the equipment quality metric value a is larger than 0 and smaller than 10000 and the network quality metric value is larger than 10000 and smaller than 20000, determining that the equipment grade of the fog node router is 'good'; and when the value of the equipment quality metric value a is greater than 20000 and the network quality metric value is greater than 20000, determining that the equipment grade of the fog node router is 'excellent', and the like.
In step 305, the cloud server determines data types of files corresponding to the file identifications respectively.
In an exemplary embodiment, each fog node router may transmit the identification of each file stored therein, and data such as modification time, creation time, current day access volume, and the like of each file to the cloud server, so that the cloud server may determine the data type of each file according to the data sent by each fog node router.
Specifically, the cloud server may identify, for each file, a corresponding file, and determine the data type of the file according to the current time, the creation time of the file, the modification time of the file, and the current daily access volume of the file. The data type may be, for example, a cold data type, a hot data type, a candidate cold data type, etc.
It should be noted that the frequency of determining the data type of the file stored in each cloud node router by the cloud server may be set according to needs, for example, the frequency is determined once a day or once every two days, which is not limited in the present application. The embodiment of the present application is described by taking an example in which the data type of a file stored in each of the cloud node routers is determined once a day.
In an exemplary embodiment, the process of determining, by the cloud server, the data type of the file according to the current time, the creation time of the file, the modification time of the file, and the current daily access volume of the file may include:
the cloud server judges whether a first difference value between the current time and the creation time corresponding to the file or a second difference value between the current time and the modification time corresponding to the file is larger than a preset time threshold value or not;
when the first difference value and the second difference value are not larger than the preset time threshold value, determining the data type of the file as a hot data type;
when the first difference value or the second difference value is larger than a preset time threshold value, further judging whether the daily access amount of the file is larger than or equal to a first preset number threshold value;
when the daily access amount of the file is smaller than a first preset number threshold, determining the data type of the file as a candidate cold data type;
when the continuous times of determining that the data type of the file is the candidate cold data type in a preset time period exceed a first preset time threshold, determining that the data type of the file is the cold data type;
when the daily access amount of the file is larger than or equal to a first preset amount threshold value and the data type of the file is not a cold data type, determining that the data type of the file is a hot data type;
aiming at the file with the current data type being the cold data type, the cloud server judges whether the current daily access volume of the file is larger than or equal to a second preset number threshold value;
and when the daily access amount of the file is larger than or equal to a second preset number threshold value and the continuous times of the daily access amount of the file, which is larger than or equal to the second preset number threshold value, are determined to exceed a second preset time threshold value, determining that the data type of the file is a hot data type.
The preset time threshold can be set as required. The first preset number threshold and the second preset number threshold may be the same value or different values, and specific values thereof may be set according to needs, for example, the specific values may be determined according to an average value of the sum of the current daily visits of all documents in a day and 80/20 rule, which is not limited in this application. The first preset quantity threshold and the second preset quantity threshold are taken as different numerical values for explanation in the embodiment of the present application. The preset time period can be set according to needs, such as 1 month, two months, and the like.
The following describes, with reference to fig. 4 and fig. 5, a process of determining a data type of a file according to a current time, a creation time of the file, a modification time of the file, and a current daily access volume of the file in the embodiment of the present application. Fig. 4 is a schematic flowchart illustrating a process of determining a data type of a file in the file transmission method according to the embodiment of the present application. Fig. 5 is an exemplary diagram for determining a data type of a file in a file transmission method according to an embodiment of the present application.
It should be noted that, in the embodiment of the present application, a candidate cold data queue and a cold data queue may be set, where each node in the candidate cold data queue and the cold data queue corresponds to a file, a data type of a file in the cold data queue is a cold data type, and a data type of a file in the candidate cold data queue is a candidate cold data type. And, flag bits flag1 and flag2, and time counts count1 and count2 are set in advance for each file identification, respectively. When the flag1 corresponding to the file identifier is true, the file identifier indicates that the file corresponding to the file identifier is in the candidate cold data queue, that is, the data type of the file is the candidate cold data type; when flag1 corresponding to the file identifier is false, it indicates that the file corresponding to the file identifier is not in the candidate cold data queue, i.e. the data type of the file is not the candidate cold data type. Similarly, when the flag2 corresponding to the file identifier is true, it indicates that the file corresponding to the file identifier is in the cold data queue, that is, the data type of the file is the cold data type; when flag2 corresponding to the file identifier is false, it indicates that the file corresponding to the file identifier is not in the cold data queue, i.e. the data type of the file is not a cold data type. count1 represents the time count of the file in the candidate cold data queue, and count2 represents the time count of the file in the cold data queue. For example, if count1 corresponding to a file id is 2, it indicates that the file corresponding to the file id is in the candidate cold data queue for 2 consecutive days.
In the embodiment of the present application, it is assumed that the preset time threshold is T0, the first preset number threshold P1, the second preset number threshold P2, the first preset number threshold H1, and the second preset number threshold H2, when the daily access amount is count, T1 represents creation time of a file, and T2 represents modification time of the file.
As shown in fig. 4, the cloud server may first initialize parameters such as T0, P1, P2, H1, and H2 (step 401). After each cloud node router transmits the stored file identifier, the modification time, the creation time, the current day access volume and other data of each file to the cloud server, and accordingly the cloud server acquires the data sent by each cloud node router (step 402), the cloud server can determine the data type corresponding to the file for each file identifier.
Specifically, for each file corresponding to each file identifier, the cloud server may first determine whether a first difference T-T1 between the current time T and the creation time T1 corresponding to the file is greater than a preset time threshold T0, or whether a second difference T-T2 between the current time T and the modification time T2 corresponding to the file is greater than a preset time threshold T0 (step 403). If neither the first difference nor the second difference is greater than the preset time threshold T0, the data type of the file is determined to be a hot data type (step 404). If the first difference or the second difference is greater than the preset time threshold T0, it is further determined whether the current daily access count of the file is greater than or equal to a first preset number threshold P1 (step 405). If the current daily access amount count of the file is less than the first preset amount threshold value P1, determining that the data type of the file is a candidate cold data type, and inserting the file into a candidate cold data queue (step 406). Further, it is determined whether the file is already in the candidate cold data queue (step 407), when the file is already in the candidate cold data queue, count1 is incremented by 1 and flag1 is set to true (step 408), and when the file is not in the candidate cold data queue, count1 is set to 1 and flag1 is set to true (step 409). For the files in the candidate cold data queue, it may be determined whether the count1 corresponding to the file is greater than or equal to a first preset time threshold P1 (step 410), and when the count1 corresponding to the file is greater than or equal to the first preset time threshold P1, that is, when the consecutive times that the data type of the file is the candidate cold data type exceeds the first preset time threshold P1, it may be determined that the data type of the file is the cold data type, and the file is added to the cold data queue, where the count1 is set to 0, the flag1 is false, and the flag2 is true (step 411). When the daily access count1 of the file is greater than or equal to the first preset number threshold P1, it may be determined whether the file is in the cold data queue (step 417), and if not, that is, the data type of the file is not a cold data type, it is determined that the data type of the file is a hot data type.
For a file with a current data type of the cold data queue being a cold data type, the cloud server may determine whether a current daily access count of the file is greater than or equal to a second preset number threshold P2 (step 412). If the current daily access volume count of the file is greater than or equal to a second preset number threshold P2, adding 1 to the count2 (step 414), and determining whether the count2 corresponding to the file is greater than or equal to a second preset number threshold H2 (step 415), if the count2 corresponding to the file is greater than or equal to a second preset number threshold H2, that is, the continuous times of the current daily access volume of the file greater than or equal to the second preset number threshold P2 exceed the second preset number threshold H2, determining that the data type of the file is a hot data type, removing the file from a cold data queue, where the count2 is 0 and the flag2 is false.
It should be noted that, for a file of which the current data type in the cold data queue is the cold data type, when the current daily access amount count of the file is greater than or equal to the second preset number threshold P2, it may also be determined whether the count2 corresponding to the file is greater than or equal to the second preset number threshold H2 (step 417), and then 1 is added to the count2 (step 420), which does not limit the execution sequence of step 417 and step 420.
Through the above process, in the embodiment of the present application, as shown in fig. 5, when a first difference T-T1 between the current time T and the creation time T1 corresponding to the file and a second difference between the current time T and the modification time T2 corresponding to the file are not greater than a preset time threshold T0, whether to add the file to the candidate cold data queue or remove the file in the candidate cold data queue is determined according to whether the daily access amount of the file is lower than a first preset amount threshold P1. When the daily access amount of the file is lower than a first preset amount threshold value P1, the file is added into a candidate cold data queue, the data type of the file is the candidate cold data type, when the daily access amount of the file in the candidate cold data queue is higher than a first preset amount threshold value P1, the file is removed from the candidate cold data queue, and the data type of the file is the hot data type.
For the files in the candidate cold data queue, whether the files are added into the cold data queue is determined according to whether the number of continuous times that the current daily access volume of the files is lower than a first preset number threshold P1 is larger than or equal to a first preset number threshold P1. When the continuous times of the files when the daily access volume is lower than a first preset number threshold P1 are more than or equal to a first preset time threshold H1, determining to add the files into a cold data queue; when the continuous times of the files when the daily access quantity is lower than the first preset number threshold P1 are less than a first preset time threshold H1, the files continue to be left in the candidate cold data queue.
For the files in the cold data queue, whether the files are removed from the cold data queue is determined according to whether the number of continuous times that the daily access amount of the files is higher than a second preset number threshold P2 is greater than or equal to a second preset number threshold H2. When the number of continuous times that the daily access amount of the file is higher than a second preset number threshold P2 is greater than or equal to a second preset number threshold H2, determining to remove the file from the cold data queue; when the number of consecutive times that the daily access amount of the file is higher than the second preset number threshold P2 is less than the second preset number threshold H2, the file continues to remain in the cold data queue.
Through the process, the data type of each file stored in each fog node router can be determined.
Step 306, the cloud server determines a mapping relation table of the file identifications and the fog node routers according to the device classes respectively corresponding to the fog node routers and the data types of the files respectively corresponding to the file identifications.
The files with different data types correspond to the fog node routers with different equipment levels.
In an exemplary embodiment, the cloud server may determine to store files of different data types in the cloud node routers of different device levels after determining device levels corresponding to the multiple cloud node routers respectively and data types of files corresponding to the multiple file identifiers respectively, and then generate the mapping relationship table according to storage relationships between the files corresponding to the multiple file identifiers respectively and the multiple cloud node routers.
In an exemplary embodiment, assuming that the data types include a cold data type, a hot data type, and a candidate cold data type, the device ranks include 4 ranks of good, medium, and bad. The cloud server may determine that a file with a data type of a cold data type is stored in a fog node router with a poor equipment level, a file with a data type of a candidate cold data type is stored in a fog node router with a medium equipment level and a good equipment level, a file with a data type of a hot data type is stored in a fog node router with a good equipment level, and then a mapping relation table between identifications corresponding to the files and the fog node routers is generated according to storage relations between the files and the fog node routers.
For example, assume that the equipment rating of the foggy node router B1 is good, the equipment rating of the foggy node router B2 is good, the equipment rating of the foggy node router B3 is medium, and the equipment rating of the foggy node router B4 is poor. The data types of the two files with the file identifications X1 and X2 are hot data types, the data type of the file with the file identification X3 is a candidate cold data type, and the data type of the file with the file identification X4 is a cold data type. The cloud server may determine that two files identified as X1 and X2, respectively, are stored in the foggy node router B1, that a file identified as X3, respectively, is stored in the foggy node router B3, and that a file identified as X4 is stored in the foggy node router B4. And further generating a mapping relation table of identifications corresponding to the files and the cloud node routers according to the storage relation between the files and the cloud node routers, wherein in the mapping relation table, the file identifications X1 and X2 correspond to the cloud node router B1, the file identification X3 corresponds to the cloud node router B3, and the file identification X4 corresponds to the cloud node router B4.
The files with the data types being the hot data types are stored in the fog node router with the highest equipment level, so that the network bandwidth of the fog node router with the highest equipment level can be fully utilized, the transmission rate of the files with the hot data types is improved, the hottest resources can be simultaneously provided for the mass clients, and the requirement that the mass clients simultaneously access the hottest resources is met.
It should be noted that, in this embodiment of the application, the cloud server may determine a mapping relationship table of a plurality of file identifiers and a plurality of fog node routers at a preset frequency, a mapping relationship table of a plurality of file identifiers and a plurality of fog node routers currently determined by the cloud server has a corresponding relationship between one or more file identifiers and a fog node router, and when the mapping relationship table determined last time is different from the corresponding relationship between the file identifier and the fog node router, for a file whose corresponding relationship changes, the file identifier of the file may be sent to an original fog node router corresponding to the file identifier in the mapping relationship table determined last time and a current fog node router corresponding to the file identifier in the mapping relationship table determined currently, so that the original fog node router may send the file corresponding to the file identifier to the current fog node router, and realizing the conversion of the storage position of the file corresponding to the file identification.
Referring to fig. 6, the cloud server may communicate with the plurality of fog node routers in a long connection manner, and the plurality of fog node routers may communicate with each other in a Point-to-Point (P2P) manner, so that each fog node router may transmit a file corresponding to each file identifier between each fog node router according to a mapping relationship table between the plurality of file identifiers and the plurality of fog node routers, which is determined by the cloud server.
According to the file transmission method provided by the embodiment of the application, a cloud server receives a file transmission request sent by a client, wherein the file transmission request is a file access request, the file access request carries a target file identifier and an identifier of the client, the cloud server stores a mapping relation table of a plurality of file identifiers and a plurality of fog node routers, the cloud server inquires the mapping relation table according to the target text identifier, a fog node router corresponding to the target file identifier in the mapping relation table is determined to be a target fog node router, and the cloud server sends a connection request to the target fog node router, wherein the connection request carries the identifier of the client, so that the target fog node router establishes file transmission connection with the client according to the identifier of the client, and file transmission is carried out through the file transmission connection. Therefore, when the client needs to access the file, the client accesses the file through the file transmission connection with the target fog node router, so that file downloading service of an external network can be provided for the client without data transfer, the network bandwidth of the fog node router is fully utilized when the file is downloaded, the file downloading speed is improved, the type and the size of the downloaded file are not limited, and the user experience is improved.
The file transmission method is described in the above embodiment by taking the file transmission request as the file access request as an example, and the file transmission method provided in the embodiment of the present application is described in the following by taking the file transmission request as the file upload request as an example.
Fig. 7 is a flowchart illustrating a file transmission method according to an embodiment of the present application.
As shown in fig. 7, the file transmission method provided in the embodiment of the present application may include the following steps 701-704.
Step 701, the cloud server receives a file transmission request sent by a client, wherein the file transmission request is a file uploading request, and the file uploading request carries an identifier of the client.
In step 702, the cloud server determines the communication quality level between the client and the plurality of fog node routers according to the identifier of the client.
In step 703, the cloud server selects a target fog node router from the plurality of fog node routers according to the communication quality levels between the client and the plurality of fog node routers.
In an exemplary embodiment, when a client needs to store a file, a file uploading request can be sent to a cloud server, and the file uploading request carries an identifier of the client, so that the cloud server can determine communication quality levels between the client and a plurality of fog node routers according to the identifier of the client, and further select a target fog node router from the plurality of fog node routers according to the communication quality levels between the client and the plurality of fog node routers.
In an exemplary embodiment, the cloud server may determine information such as a type, a network operator, and a location of the client according to an identifier of the client, may determine information such as a location of each fog node router and a corresponding network operator, and may determine, for each fog node router, a quality of a network between the client and the fog node router according to information such as a type, a network operator, and a location of the client, and information such as a location of the fog node router and a corresponding network operator, and further classify a quality of communication between the client and each fog node router according to a quality of communication between the client and a plurality of fog node routers, and determine a fog node router with a highest quality of communication as a target fog node router.
For example, assume that the client is a mobile phone, the location of the client is M1 area, the network operator is operator N, the location of the node router B1 is M1 area, the network operator is operator N1, the location of the node router B2 is M2 area, the M2 area is far from the M1 area, and the network operator of the node router B2 is operator N2. The cloud server may determine that the communication quality of the client and the fog node router B1 is better than the communication quality of the client and the fog node router B2 according to the location of the client, the network operation, and the locations and network operators of the fog node routers B1 and B2, thereby determining the fog node router B1 as the target fog node router.
Step 704, the cloud server sends a connection request to the target cloud node router, wherein the connection request carries an identifier of the client, so that the target cloud node router establishes a file transmission connection with the client according to the identifier of the client, and performs file transmission through the file transmission connection.
In an exemplary embodiment, when the file transmission request is a file uploading request, the connection request sent by the cloud server to the target cloud node router may only include the identifier of the client, so that the target cloud node router may establish a file transmission connection with the client according to the identifier of the client, and after the file transmission connection is established, the client sends the target file and the identifier corresponding to the target file to the target cloud node router through the file transmission connection.
Or, the connection request sent by the cloud server to the target cloud node router may also carry a target file identifier in addition to the identifier of the client, so that after the target cloud node router establishes a file transmission connection with the client according to the identifier of the client carried in the connection request, the client may directly send a target file corresponding to the target file identifier to the target cloud node router.
According to the file transmission method provided by the embodiment of the application, after the cloud server receives a file transmission request sent by a client, the file transmission request is a file uploading request, the file uploading request carries an identification of the client, the cloud server determines communication quality levels between the client and a plurality of fog node routers according to the identification of the client, then selects a target fog node router from the plurality of fog node routers according to the communication quality levels between the client and the plurality of fog node routers, and sends a connection request to the target fog node router, wherein the connection request carries the identification of the client, so that the target fog node router establishes file transmission connection with the client according to the identification of the client, and performs file transmission through the file transmission connection. Therefore, when the client needs to upload files, the client uploads the files through the file transmission connection with the target fog node router, so that file storage service of an external network can be provided for the client without data transfer, the network bandwidth of the fog node router is fully utilized when the files are uploaded, the file uploading rate is improved, the types and sizes of the uploaded files are not limited, and the user experience is improved.
The following describes a file transfer method provided in the embodiments of the present application, taking a client side as an example.
Fig. 8 is a flowchart illustrating a file transmission method according to an embodiment of the present application.
The file transmission method provided by the embodiment of the application is configured to be executed in a client. The file transmission method provided by the present application may be applied to a scenario in which a storage download service of an external network is provided to a plurality of clients, and a client may be any one of the plurality of clients in the embodiment of the present application.
The client may be a Personal Computer (PC), a mobile device, and the mobile device may be any device that needs to perform file transmission, such as a mobile phone, a tablet Computer, a Personal digital assistant, a wearable device, and a vehicle-mounted device, and the present application does not limit this.
As shown in fig. 8, the file transfer method may include the following steps 801 and 802.
Step 801, a client sends a file transmission request to a cloud server, so that the cloud server determines a target cloud node router according to the file transmission request, and sends a connection request to the target cloud node router, wherein the file transmission request and the connection request carry an identifier of the client.
The client identifier is used for uniquely identifying the client, and can be set arbitrarily according to requirements.
In an exemplary embodiment, when the environment where the client is located is an extranet environment, for example, when the network environment of the client is a 4G network or a non-local network, a file transfer request may be sent to the cloud server, where the file transfer request carries an identifier of the client, so that the cloud server may determine a target fog node router from a plurality of fog node routers according to the file transfer request, and may send a connection request to the target fog node router, where the connection request carries the identifier of the client, so that the target fog node router may establish a file transfer connection with the client according to the identifier of the client in the connection request.
In an exemplary embodiment, the cloud server determines the manner of the target cloud node router according to the file transmission request, which may refer to the above embodiments and is not described herein again.
Step 802, after the client establishes a file transmission connection with the target cloud node router according to the identifier of the client, file transmission is performed through the file transmission connection.
In an exemplary embodiment, after the target cloud node router establishes a file transfer connection with the client according to the identifier of the client, the client can perform file transfer with the target cloud node router through the file transfer connection.
Therefore, the client and the target fog node router can perform file transmission through the file transmission connection between the client and the target fog node router, so that file transmission service of an external network can be provided for the client without data transfer.
In the file transmission method provided by the embodiment of the application, the client sends a file transmission request to the cloud server, so that the cloud server determines the target fog node router according to the file transmission request and sends a connection request to the target fog node router, wherein the file transmission request and the connection request carry the identification of the client, and after the client establishes a file transmission connection with the target fog node router according to the identification of the client, the file transmission is performed through the file transmission connection, so that the file transmission is performed by the client and the target fog node router through the file transmission connection between the client and the target fog node router, and the file transmission can be performed without data transfer, the file transmission service of an external network can be provided for the client, and in the file transmission process, the network bandwidth of the fog node router is fully utilized, the file transmission rate is improved, and the type and the size of the transmitted file are not limited, the user experience is improved.
The following further describes the file transfer method executed by the client side according to the embodiment of the present application with reference to fig. 9.
Fig. 9 is a flowchart illustrating a file transmission method according to an embodiment of the present application.
As shown in fig. 9, the file transmission method provided in the embodiment of the present application includes the following steps 901-904.
Step 901, the client determines whether the environment is the extranet environment, if so, step 902 is executed, otherwise, step 904 is executed.
Step 802, the client sends a file transmission request to the cloud server, so that the cloud server determines a target cloud node router according to the file transmission request, and sends a connection request to the target cloud node router, wherein the file transmission request and the connection request carry an identifier of the client.
Step 903, after the client establishes a file transmission connection with the target cloud node router according to the identifier of the client, file transmission is performed through the file transmission connection.
In an exemplary embodiment, when the environment where the client is located is an extranet environment, for example, when the network environment of the client is a 4G network or a non-local network, a file transfer request may be sent to the cloud server, where the file transfer request carries an identifier of the client, so that the cloud server may determine a target cloud node router from the multiple cloud node routers according to the file transfer request, and may send a connection request to the target cloud node router, where the connection request carries the identifier of the client, so that the target cloud node router may establish a file transfer connection with the client according to the identifier of the client in the connection request.
In an exemplary embodiment, the file transfer request may be a file access request or a file upload request.
In an exemplary embodiment, when a client needs to access or download a file, a file access request may be sent to a cloud server, where the file access request carries an identifier of the client and an identifier of a target file. The cloud server can pre-store a plurality of file identifiers and a mapping relation table of a plurality of fog node routers, so that when the cloud server receives a file access request sent by a client, the mapping relation table can be inquired according to a target text identifier carried in the file access request, and a fog node router corresponding to the target file identifier in the mapping relation table is determined to be a target fog node router. After the cloud server determines the target fog node router, a connection request carrying the identification of the client can be sent to the target fog node router, so that after receiving the connection request, the target fog node router can establish file transmission connection with the client according to the identification of the client carried in the connection request, and further the target fog node router can perform file transmission with the client through the file transmission connection.
It should be noted that, when the file transmission request is a file access request carrying a target file identifier, the cloud server may also carry the target file identifier in a connection request sent to the target cloud node router, so that the target cloud node router may directly determine the target file according to the target file identifier after establishing a file transmission connection with the client according to the client identifier, and send the target file to the client through the file transmission connection, and accordingly, the client may directly receive the target file corresponding to the target file identifier sent by the target cloud node router through the file transmission connection, and does not need to send the target file identifier to the target cloud node router again after establishing the file transmission connection, so as to save the number of interactions between the client and the target cloud node router, and the file transmission efficiency is improved.
In an exemplary embodiment, when a client needs to store a file, a file uploading request can be sent to a cloud server, and the file uploading request carries an identifier of the client, so that the cloud server can determine communication quality levels between the client and a plurality of fog node routers according to the identifier of the client, and further select a target fog node router from the plurality of fog node routers according to the communication quality levels between the client and the plurality of fog node routers.
In an exemplary embodiment, when the file transmission request is a file uploading request, the connection request sent by the cloud server to the target cloud node router may only include the identifier of the client, so that the target cloud node router may establish a file transmission connection with the client according to the identifier of the client, and after the file transmission connection is established, the client connects the target file identifier and a target file corresponding to the target file identifier to the target cloud node router through the file transmission connection.
Or, the connection request sent by the cloud server to the target cloud node router may also carry a target file identifier in addition to the identifier of the client, so that after the target cloud node router establishes a file transmission connection with the client according to the identifier of the client carried in the connection request, the client may directly send a target file corresponding to the target file identifier to the target cloud node router.
And 904, the client and the local router transmit files through the file transmission connection between the client and the local router.
In an exemplary embodiment, when the environment of the client is an intranet environment, the client and the local router may perform file transmission through a file transmission connection between the client and the local router. Specifically, the client may download the file from the local router or transfer the file to the local router.
According to the file transmission method provided by the embodiment of the application, when the environment of the client is an extranet environment, a file transmission request can be sent to the cloud server, so that the cloud server determines the target fog node router according to the file transmission request and sends a connection request to the target fog node router, wherein the file transmission request and the connection request carry the identification of the client, after the client establishes file transmission connection with the target fog node router according to the identification of the client, the client can perform file transmission with the target fog node router through the file transmission connection, and when the environment of the client is an intranet environment, the client and the local router perform file transmission through the file transmission connection between the client and the local router. Therefore, the client side can transmit files by utilizing the corresponding file transmission connection according to the network environment, and when the environment where the client side is located is the external network environment, the client side and the target fog node router are connected through the file transmission connection between the client side and the target fog node router to transmit the files, so that the file transmission service of the external network can be provided for the client side without data transfer.
The following describes a file transfer method provided in the embodiment of the present application, taking the router side of the cloud node as an example.
Fig. 10 is a flowchart illustrating a file transmission method according to an embodiment of the present application.
The file transmission method provided by the embodiment of the application is configured to be executed in a fog node router. It can be understood that the cloud node router in the embodiment of the present application is specifically a target cloud node router that provides a file storage downloading service of an external network to a client in the foregoing embodiment.
As shown in fig. 10, the file transmission method may include the following steps 1001-1003.
Step 1001, the cloud node router receives a connection request sent by the cloud server, wherein the connection request is sent to the cloud node router by the cloud server after receiving a file transmission request sent to the cloud server by the client, and the file transmission request and the connection request carry an identifier of the client.
Step 1002, the cloud node router establishes a file transmission connection with the client according to the identifier of the client.
The client may be a Personal Computer (PC), a mobile device, and the mobile device may be any device that needs to perform file transmission, such as a mobile phone, a tablet Computer, a Personal digital assistant, a wearable device, and a vehicle-mounted device, and the present application does not limit this.
In an exemplary embodiment, when the environment where the client is located is an extranet environment, for example, when the network environment of the client is a 4G network or a non-local network, a file transfer request may be sent to the cloud server, where the file transfer request carries an identifier of the client, so that the cloud server may determine a target fog node router from a plurality of fog node routers according to the file transfer request, and may send a connection request to the target fog node router, where the connection request carries the identifier of the client. After receiving the connection request sent by the cloud server, the target fog node router can establish file transmission connection with the client according to the identification of the client.
In an exemplary embodiment, the cloud server determines the manner of the target cloud node router according to the file transmission request, which may refer to the above embodiments and is not described herein again.
And step 1003, the cloud node router and the client transmit files through file transmission connection.
In an exemplary embodiment, after the target cloud node router establishes a file transfer connection with the client according to the identifier of the client, the target cloud node can perform file transfer with the client through the file transfer connection.
Therefore, the client and the target fog node router can perform file transmission through the file transmission connection between the client and the target fog node router, so that file transmission service of an external network can be provided for the client without data transfer.
According to the file transmission method provided by the embodiment of the application, after the fog node router receives the connection request sent by the cloud server, the fog node router establishes file transmission connection with the client according to the identification of the client, and then the fog node router and the client perform file transmission through the file transmission connection, so that the file transmission is performed by the client and the target fog node router through the file transmission connection between the client and the target fog node router, and therefore, the file transmission service of an external network can be provided for the client without data transfer.
The following further describes, with reference to fig. 11, a file transfer method executed by the cloud node router side according to an embodiment of the present application.
Fig. 11 is a flowchart illustrating a file transmission method according to an embodiment of the present application.
As shown in fig. 11, the file transmission method provided in the embodiment of the present application includes the following steps 1101-1104.
Step 1101, the cloud node router receives a connection request sent by the cloud server, wherein the connection request is sent to the cloud node router by the cloud server after receiving a file transmission request sent to the cloud server by a client, the file transmission request is a file access request, the file access request and the connection request carry an identifier of the client and an identifier of a target file, and the cloud node router stores files corresponding to a plurality of file identifiers respectively.
In the exemplary embodiment, the cloud node router is a router with an external network address in other routers except the local router corresponding to the client.
Step 1102, the fog node router establishes a file transmission connection with the client according to the identifier of the client.
In an exemplary embodiment, when the environment where the client is located is an extranet environment, for example, when the network environment of the client is a 4G network or a non-local network, a file transfer request may be sent to the cloud server, where the file transfer request carries an identifier of the client, so that the cloud server may determine a target cloud node router from the multiple cloud node routers according to the file transfer request, and may send a connection request to the target cloud node router, where the connection request carries the identifier of the client, so that the target cloud node router may establish a file transfer connection with the client according to the identifier of the client in the connection request.
Step 1103, the cloud node router searches for a target file corresponding to the target file identifier according to the target file identifier.
And step 1104, the cloud node router transmits the target file to the client through file transmission connection.
In an exemplary embodiment, the file transmission request and the connection request may carry a target file identifier in addition to an identifier of the client, and after establishing a file transmission connection with the client, the target cloud node router may query files corresponding to a plurality of file identifiers stored in the target cloud node router according to the target file identifier, so as to search for a target file corresponding to the target file identifier, and may further send the target file corresponding to the target file identifier to the client through the file transmission connection.
In an exemplary embodiment, when the file transmission request is a file uploading request, the file uploading request and the connection request may carry an identifier of the client and an object file identifier, so that after the object cloud node router establishes a file transmission connection with the client, the client may send the file identifier and an object file corresponding to the file identifier to the object cloud node router through the file transmission connection.
In an exemplary embodiment, one or more of the plurality of fog node routers may further perform data synchronization with the local router corresponding to the client, where the synchronized data may be a hottest file in the local router corresponding to the client, so that when a file transfer connection between the client and the corresponding local router is disconnected, the client may obtain the hottest file for a user holding the client from the fog node router. That is, in the embodiment of the present application, the method may further include: and the fog node router performs data synchronization with a local router corresponding to the client.
Referring to fig. 12, the local router corresponding to the client may synchronize the hottest file stored in the local router into one or more fog node routers. As shown in fig. 6, the local router and the cloud node router may perform data synchronization by means of P2P. When the client is in a connection state with the local router, the client can download the hottest file from the local router or upload the target file to the local router. When the file transmission connection between the client and the local router is disconnected, the client may send a file transmission request to the cloud server (not shown in fig. 12), so that the cloud server may determine a target cloud node router according to the file transmission request and send a connection request to the target cloud node router, and then the target cloud node router may establish a file transmission connection with the client according to the connection request. After the client establishes the file transmission connection with the target fog node router, the client can download the file which is the hottest for a client user from the target fog node router through the file transmission connection or upload the target file to the target fog node router.
According to the file transmission method provided by the embodiment of the application, after the fog node router receives the connection request sent by the cloud server, the fog node router establishes file transmission connection with the client according to the identification of the client, further, the fog node router searches the target file corresponding to the identification of the target file according to the identification of the target file, and sends the target file to the client through the file transmission connection.
Fig. 13 is a schematic structural diagram of a cloud server provided in the embodiment of the present application.
As shown in fig. 13, the cloud server 1300 may include: a receiving module 1310 and a first determining module 1320.
The receiving module 1310 is configured to receive a file transmission request sent by a client, where the file transmission request carries an identifier of the client;
the first determining module 1320 is configured to determine a target cloud node router according to the file transfer request, and send a connection request to the target cloud node router, where the connection request carries an identifier of the client, so that the target cloud node router establishes a file transfer connection with the client according to the identifier of the client, and performs file transfer through the file transfer connection.
Further, in a possible implementation manner of the embodiment of the application, the file transmission request is a file access request, the file access request carries a target file identifier, and the cloud server stores a mapping relationship table of a plurality of file identifiers and a plurality of fog node routers;
the first determining module 1320 is specifically configured to:
and inquiring the mapping relation table according to the target text identifier, and determining the fog node router corresponding to the target file identifier in the mapping relation table as a target fog node router.
Further, in a possible implementation manner of the embodiment of the present application, as shown in fig. 14, the cloud server 1300 may further include:
a second determining module 1330 configured to determine device levels corresponding to the plurality of fog node routers, respectively;
the third determining module 1340 is configured to determine data types of files corresponding to the multiple file identifiers respectively;
a fourth determining module 1350, configured to determine the mapping relationship table of the multiple file identifiers and the multiple fog node routers according to the device classes respectively corresponding to the multiple fog node routers and the data types of the files respectively corresponding to the multiple file identifiers, where the files of different data types correspond to the fog node routers of different device classes.
Further, in a possible implementation manner of the embodiment of the present application, the fourth determining module 1350 is specifically configured to:
determining to store files of different data types in the fog node routers of different equipment levels according to the equipment levels respectively corresponding to the fog node routers and the data types of the files respectively corresponding to the file identifications;
and generating a mapping relation table according to the storage relations between the files respectively corresponding to the file identifications and the fog node routers.
Further, in a possible implementation manner of the embodiment of the present application, the second determining module 1330 is specifically configured to:
determining the equipment quality of the plurality of fog node routers according to the online condition of the plurality of fog node routers;
determining the network quality of the plurality of fog node routers according to the network bandwidth of the plurality of fog node routers;
and determining the equipment grades respectively corresponding to the plurality of fog node routers according to the equipment quality and the network quality.
Further, in a possible implementation manner of the embodiment of the present application, the third determining module 1340 includes:
and the determining unit is used for determining the data type of the file according to the current time, the creation time of the file, the modification time of the file and the current daily access volume of the file aiming at the file corresponding to each file identification.
Further, in a possible implementation manner of the embodiment of the present application, the data types include a cold data type, a hot data type, and a candidate cold data type; wherein, the determining unit is specifically configured to:
judging whether a first difference value between the current time and the creation time corresponding to the file or a second difference value between the current time and the modification time corresponding to the file is greater than a preset time threshold value or not;
when the first difference value and the second difference value are not larger than the preset time threshold value, determining the data type of the file as a hot data type;
when the first difference value or the second difference value is larger than a preset time threshold value, further judging whether the daily access amount of the file is larger than or equal to a first preset number threshold value;
when the daily access amount of the file is smaller than a first preset number threshold, determining the data type of the file as a candidate cold data type;
when the continuous times of determining that the data type of the file is the candidate cold data type in a preset time period exceed a first preset time threshold, determining that the data type of the file is the cold data type;
when the daily access amount of the file is larger than or equal to a first preset amount threshold value and the data type of the file is not a cold data type, determining that the data type of the file is a hot data type;
judging whether the current daily access volume of the file is larger than or equal to a second preset number threshold or not aiming at the file of which the current data type is a cold data type;
and when the daily access amount of the file is larger than or equal to a second preset number threshold value and the continuous times of the daily access amount of the file, which is larger than or equal to the second preset number threshold value, are determined to exceed a second preset time threshold value, determining that the data type of the file is a hot data type.
Further, in a possible implementation manner of the embodiment of the present application, the file transmission request is a file upload request;
the first determining module 1220 is specifically configured to:
determining the communication quality grade between the client and the plurality of fog node routers according to the identification of the client;
and selecting a target fog node router from the plurality of fog node routers according to the communication quality grade between the client and the plurality of fog node routers.
It should be noted that the explanation in the foregoing embodiment of the file transmission method executed by the cloud server side is also applicable to the cloud server in this embodiment, and details are not described here.
The cloud server in the embodiment of the application can determine the target fog node router according to the file transmission request after receiving the file transmission request which is sent by the client and carries the identification of the client, and sends the connection request to the target fog node router, wherein the connection request carries the identification of the client, so that the target fog node router establishes file transmission connection with the client according to the identification of the client, and carries out file transmission through the file transmission connection. Therefore, the client and the target fog node router are connected through file transmission between the client and the target fog node router to transmit files, so that file transmission service of an external network can be provided for the client without data transfer, network bandwidth of the fog node router is fully utilized during file transmission, file transmission rate is improved, types and sizes of transmitted files are not limited, and user experience is improved.
In order to implement the foregoing embodiments, an embodiment of the present application further provides a client. Fig. 15 is a schematic structural diagram of a client according to an embodiment of the present application.
As shown in fig. 15, the client 1500 may include: a sending module 1510 and a first transmission module 1520.
The sending module 1510 is configured to send a file transmission request to the cloud server, so that the cloud server determines a target cloud node router according to the file transmission request, and sends a connection request to the target cloud node router, where the file transmission request and the connection request carry an identifier of a client;
and the first transmission module 1520, configured to perform file transmission through the file transmission connection after the client establishes the file transmission connection with the target cloud node router according to the identifier of the client.
Further, in a possible implementation manner of the embodiment of the present application, the file transmission request is a file access request, and the file access request and the connection request carry a target file identifier;
accordingly, the first transmission module 1520 is specifically configured to:
and receiving a target file corresponding to the target file identifier sent by the target fog node router through file transmission connection.
Further, in a possible implementation manner of the embodiment of the present application, the file transmission request is a file uploading request, and the file uploading request and the connection request carry a target file identifier;
accordingly, the first transmission module 1520 is specifically configured to:
and sending the target file corresponding to the target file identifier to the target fog node router through file transmission connection.
Further, in a possible implementation manner of the embodiment of the present application, the client may further include:
and the second transmission module is used for carrying out file transmission with the local router through the file transmission connection between the client and the local router when the environment where the client is located is an intranet environment.
It should be noted that the explanation in the foregoing file transfer method embodiment executed by the client side is also applicable to the client side of this embodiment, and is not described herein again.
The client of the embodiment of the application can send a file transmission request to the cloud server, so that the cloud server determines the target fog node router according to the file transmission request and sends a connection request to the target fog node router, wherein the file transmission request and the connection request carry the identification of the client, and after the client establishes the file transmission connection with the target fog node router according to the identification of the client, the file transmission is carried out through the file transmission connection, so that the file transmission is carried out by the client and the target fog node router through the file transmission connection between the client and the target fog node router, the file transmission can be carried out without data transfer, the file transmission service of an external network can be provided for the client, and in the file transmission process, the network bandwidth of the fog node router is fully utilized, the file transmission rate is improved, and the type and the size of the transmitted file are not limited, the user experience is improved.
In order to implement the foregoing embodiment, an embodiment of the present application further provides a fog node router. Fig. 16 is a schematic structural diagram of a fog node router according to an embodiment of the present application.
As shown in fig. 16, the fog node router 1600 may include: a receiving module 1610, a establishing module 1620, and a transmitting module 1630.
The receiving module 1610 is configured to receive a connection request sent by a cloud server, where the connection request is sent to the cloud node router by the cloud server after receiving a file transmission request sent by a client to the cloud server, and the file transmission request and the connection request carry an identifier of the client;
an establishing module 1620, configured to establish a file transmission connection with the client according to the identifier of the client;
a transmission module 1630, configured to perform file transmission with the client through a file transmission connection.
Further, in a possible implementation manner of the embodiment of the present application, the cloud node router is a router having an external network address in other routers except a local router corresponding to the client.
Further, in a possible implementation manner of the embodiment of the present application, the file transmission request is a file access request, the file access request and the connection request carry a target file identifier, and the cloud node router stores files corresponding to a plurality of file identifiers respectively;
correspondingly, the transmission module 1630 is specifically configured to:
searching a target file corresponding to the target file identifier according to the target file identifier;
and sending the target file to the client through the file transmission connection.
Further, in a possible implementation manner of the embodiment of the present application, the file transmission request is a file uploading request, and the file uploading request and the connection request carry a target file identifier;
correspondingly, the transmission module 1630 is specifically configured to:
and receiving the target file corresponding to the target file identifier sent by the client through the file transmission connection.
Further, in a possible implementation manner of the embodiment of the present application, the fog node router may further include:
and the synchronization module is used for carrying out data synchronization with the local router corresponding to the client.
It should be noted that the explanation in the foregoing file transmission method embodiment executed by the cloud node router side is also applicable to the cloud node router of this embodiment, and details are not described here again.
The fog node router of the embodiment of the application, after receiving the connection request sent by the cloud server, according to the identification of the client, establish file transmission connection with the client, and then the fog node router and the client transmit files through the file transmission connection, therefore, the client and the target fog node router are connected through the file transmission between the client and the target fog node router, and the file transmission is carried out, so that data transfer is not needed, the file transmission service of an external network can be provided for the client, and when the file transmission is carried out, the network bandwidth of the fog node router is fully utilized, the file transmission rate is improved, the types and sizes of the transmitted files are not limited, and the user experience is improved.
In order to implement the foregoing embodiment, the present application further provides a file transmission system, which includes a client, a cloud server, and a plurality of cloud node routers.
The cloud server is used for receiving a file transmission request sent by a client, determining a target fog node router in the multiple fog node routers according to the file transmission request, and sending a connection request to the target fog node router, wherein the file transmission request and the connection request carry an identifier of the client;
the target fog node router is used for establishing file transmission connection with the client according to the identification of the client after receiving the connection request, and transmitting files with the client through the file transmission connection;
and the client is used for sending a file transmission request to the cloud server and carrying out file transmission through file transmission connection with the target fog node router.
It should be noted that, the descriptions of the cloud server, the client and the fog node router in the foregoing embodiments are also applicable to the cloud server, the client and a target fog node router in the multiple fog node routers in the file transmission system in the embodiment of the present application, and are not described herein again.
The file transmission system provided by the embodiment of the application realizes that the client and the target fog node router are connected through file transmission between the client and the target fog node router to carry out file transmission, so that file transmission service of an external network can be provided for the client without data transfer, and when the file transmission is carried out, the network bandwidth of the fog node router is fully utilized, the file transmission rate is improved, the type and the size of the transmitted file are not limited, and the user experience is improved.
In order to implement the above embodiments, the present application also provides an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executable by the at least one processor to enable the at least one processor to perform a file transfer method as set forth in any one of the preceding embodiments of the present application.
In order to achieve the above embodiments, the present application also proposes a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute a file transfer method as proposed in any one of the foregoing embodiments of the present application.
In order to implement the above embodiments, the present application also proposes a computer program product comprising a computer program which, when executed by a processor, implements the file transfer method as proposed in any of the previous embodiments of the present application.
FIG. 17 illustrates a block diagram of an exemplary electronic device suitable for use in implementing embodiments of the present application. The electronic device 1700 shown in fig. 17 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application. The electronic device can be a cloud server, a client or a cloud node router.
As shown in fig. 17, electronic device 1700 is in the form of a general purpose computing device. Components of electronic device 1700 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. These architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus, to name a few.
Electronic device 1700 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by electronic device 1700 and includes both volatile and nonvolatile media, removable and non-removable media.
Memory 28 may include computer system readable media in the form of volatile Memory, such as Random Access Memory (RAM) 30 and/or cache Memory 32. The electronic device 1700 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 17, commonly referred to as a "hard drive"). Although not shown in FIG. 17, a disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a Compact disk Read Only Memory (CD-ROM), a Digital versatile disk Read Only Memory (DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the application.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally perform the functions and/or methodologies of the embodiments described herein.
The electronic device 1700 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), with one or more devices that enable a user to interact with the electronic device 1700, and/or with any devices (e.g., network card, modem, etc.) that enable the electronic device 1700 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Moreover, the electronic device 1700 may also communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public Network such as the Internet via the Network adapter 20. As shown, the network adapter 20 communicates with the other modules of the electronic device 1700 via the bus 18. It should be appreciated that although not shown in FIG. 17, other hardware and/or software modules may be used in conjunction with electronic device 1700, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 16 executes various functional applications and data processing, for example, implementing the methods mentioned in the foregoing embodiments, by executing programs stored in the system memory 28.
In the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present application, "plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing steps of a custom logic function or process, and alternate implementations are included within the scope of the preferred embodiment of the present application in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present application.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. 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 application 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. 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.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present application may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Although embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present application, and that variations, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present application.

Claims (37)

1. A method for file transfer, comprising:
the method comprises the steps that a cloud server receives a file transmission request sent by a client, wherein the file transmission request carries an identifier of the client;
and the cloud server determines a target fog node router according to the file transmission request and sends a connection request to the target fog node router, wherein the connection request carries the identification of the client, so that the target fog node router establishes file transmission connection with the client according to the identification of the client and performs file transmission through the file transmission connection.
2. The method according to claim 1, wherein the file transmission request is a file access request, the file access request carries a target file identifier, and the cloud server stores a mapping relationship table of a plurality of file identifiers and a plurality of cloud node routers;
wherein, the cloud server determines a target fog node router according to the file transmission request, and the method comprises the following steps:
and the cloud server inquires the mapping relation table according to the target text identifier, and determines a fog node router corresponding to the target file identifier in the mapping relation table as the target fog node router.
3. The method of claim 2, wherein prior to the cloud server determining the target cloud node router from the file transfer request, further comprising:
the cloud server determines equipment levels corresponding to the plurality of fog node routers respectively;
the cloud server determines the data types of the files corresponding to the file identifications respectively;
and the cloud server determines a mapping relation table of the file identifications and the fog node routers according to the equipment grades respectively corresponding to the fog node routers and the data types of the files respectively corresponding to the file identifications, wherein the files of different data types correspond to the fog node routers of different equipment grades.
4. The method of claim 3, wherein determining the mapping relationship table between the plurality of file identifications and the plurality of fog node routers comprises:
the cloud server determines to store files of different data types in the fog node routers of different equipment levels according to the equipment levels respectively corresponding to the fog node routers and the data types of the files respectively corresponding to the file identifications;
and the cloud server generates the mapping relation table according to the storage relations between the files respectively corresponding to the file identifications and the fog node routers.
5. The method of claim 3, wherein the cloud server determining the device classes respectively corresponding to the plurality of fog node routers comprises:
the cloud server determines the equipment quality of the plurality of fog node routers according to the online condition of the plurality of fog node routers;
determining the network quality of the plurality of fog node routers according to the network bandwidth of the plurality of fog node routers;
and determining the equipment grades respectively corresponding to the plurality of fog node routers according to the equipment quality and the network quality.
6. The method of claim 3, wherein the determining, by the cloud server, the data types of the files corresponding to the file identifications respectively comprises:
and aiming at the file corresponding to each file identification, the cloud server determines the data type of the file according to the current time, the creation time of the file, the modification time of the file and the current daily access volume of the file.
7. The method of claim 6, wherein the data types include a cold data type, a hot data type, and a candidate cold data type; the cloud server determines the data type of the file according to the current time, the creation time of the file, the modification time of the file and the current daily access volume of the file, and the method comprises the following steps:
the cloud server judges whether a first difference value between the current time and the creation time corresponding to the file or a second difference value between the current time and the modification time corresponding to the file is larger than a preset time threshold value or not;
when the first difference value and the second difference value are not larger than the preset time threshold value, determining that the data type of the file is the hot data type;
when the first difference value or the second difference value is larger than the preset time threshold value, further judging whether the current daily access volume of the file is larger than or equal to a first preset number threshold value;
when the daily access volume of the file is smaller than the first preset number threshold, determining the data type of the file as the candidate cold data type;
when the continuous times of determining that the data type of the file is the candidate cold data type in a preset time period exceed a first preset time threshold, determining that the data type of the file is the cold data type;
when the daily access amount of the file is larger than or equal to the first preset amount threshold value and the data type of the file is not the cold data type, determining that the data type of the file is the hot data type;
aiming at the file with the current data type being the cold data type, the cloud server judges whether the current daily access volume of the file is larger than or equal to a second preset number threshold value;
and when the current daily access amount of the file is larger than or equal to the second preset number threshold value and the continuous times of the current daily access amount of the file, which is larger than or equal to the second preset number threshold value, are determined to exceed the second preset time threshold value, determining the data type of the file to be the hot data type.
8. The method of claim 1, wherein the file transfer request is a file upload request;
wherein, the cloud server determines a target fog node router according to the file transmission request, and the method comprises the following steps:
the cloud server determines the communication quality grade between the client and a plurality of fog node routers according to the identification of the client;
selecting the target fog node router from the plurality of fog node routers according to the communication quality levels between the client and the plurality of fog node routers.
9. A method for file transfer, comprising:
a client sends a file transmission request to a cloud server so that the cloud server determines a target fog node router according to the file transmission request and sends a connection request to the target fog node router, wherein the file transmission request and the connection request carry an identifier of the client;
and after the client establishes file transmission connection with the target fog node router according to the identification of the client, file transmission is carried out through the file transmission connection.
10. The method according to claim 9, wherein the file transfer request is a file access request, and the file access request and the connection request carry a target file identifier;
wherein, the file transmission through the file transmission connection comprises:
and the client receives a target file corresponding to the target file identifier sent by the target fog node router through the file transmission connection.
11. The method according to claim 9, wherein the file transmission request is a file upload request, and the file upload request and the connection request carry a target file identifier;
wherein, the file transmission through the file transmission connection comprises:
and the client sends the target file corresponding to the target file identifier to the target fog node router through the file transmission connection.
12. The method of claim 9, further comprising:
and when the environment of the client is an intranet environment, the client and the local router perform file transmission through the file transmission connection between the client and the local router.
13. A method for file transfer, comprising:
the method comprises the steps that a fog node router receives a connection request sent by a cloud server, wherein the connection request is sent to the fog node router after the cloud server receives a file transmission request sent to the cloud server by a client, and the file transmission request and the connection request carry an identifier of the client;
the fog node router establishes file transmission connection with the client according to the identification of the client;
and the fog node router and the client side are connected through the file transmission to perform file transmission.
14. The method of claim 13, wherein the fog node router is a router with an external network address in routers other than a local router corresponding to the client.
15. The method according to claim 13, wherein the file transmission request is a file access request, the file access request and the connection request carry target file identifiers, and the cloud node router stores files corresponding to a plurality of file identifiers respectively;
wherein, the said fog node router and the said customer end carry on the file transmission through the said file transmission connection, including:
the fog node router searches a target file corresponding to the target file identifier according to the target file identifier;
and the fog node router sends the target file to the client through the file transmission connection.
16. The method according to claim 13, wherein the file transmission request is a file upload request, and the file upload request and the connection request carry a target file identifier;
wherein, the said fog node router and the said customer end carry on the file transmission through the said file transmission connection, including:
and the fog node router receives a target file corresponding to the target file identifier sent by the client through the file transmission connection.
17. The method of claim 13, further comprising:
and the fog node router performs data synchronization with a local router corresponding to the client.
18. A cloud server, comprising:
the receiving module is used for receiving a file transmission request sent by a client, wherein the file transmission request carries an identifier of the client;
and the first determining module is used for determining a target fog node router according to the file transmission request and sending a connection request to the target fog node router, wherein the connection request carries the identifier of the client, so that the target fog node router establishes file transmission connection with the client according to the identifier of the client and performs file transmission through the file transmission connection.
19. The cloud server of claim 18, wherein the file transfer request is a file access request, the file access request carries a target file identifier, and the cloud server stores a mapping relationship table of a plurality of file identifiers and a plurality of cloud node routers;
the first determining module is specifically configured to:
and inquiring the mapping relation table according to the target text identifier, and determining the fog node router corresponding to the target file identifier in the mapping relation table as the target fog node router.
20. The cloud server of claim 19, further comprising:
the second determining module is used for determining the equipment levels corresponding to the plurality of fog node routers respectively;
a third determining module, configured to determine data types of files corresponding to the multiple file identifiers, respectively;
a fourth determining module, configured to determine a mapping relationship table between the multiple file identifiers and the multiple fog node routers according to the device classes respectively corresponding to the multiple fog node routers and the data types of the files respectively corresponding to the multiple file identifiers, where files of different data types correspond to the fog node routers of different device classes.
21. The cloud server of claim 20, wherein the fourth determining module is specifically configured to:
determining to store files of different data types in the fog node routers of different equipment levels according to the equipment levels respectively corresponding to the fog node routers and the data types of the files respectively corresponding to the file identifications;
and generating the mapping relation table according to the storage relations between the files respectively corresponding to the file identifications and the fog node routers.
22. The cloud server of claim 20, wherein the second determining module is specifically configured to:
determining the equipment quality of the plurality of fog node routers according to the online condition of the plurality of fog node routers;
determining the network quality of the plurality of fog node routers according to the network bandwidth of the plurality of fog node routers;
and determining the equipment grades respectively corresponding to the plurality of fog node routers according to the equipment quality and the network quality.
23. The cloud server of claim 20, wherein said third determining module comprises:
and the determining unit is used for determining the data type of the file according to the current time, the creation time of the file, the modification time of the file and the current daily access volume of the file aiming at the file corresponding to each file identifier.
24. The cloud server of claim 23, wherein said data types include a cold data type, a hot data type, and a candidate cold data type; wherein, the determining unit is specifically configured to:
judging whether a first difference value between the current time and the creation time corresponding to the file or a second difference value between the current time and the modification time corresponding to the file is greater than a preset time threshold value or not;
when the first difference value and the second difference value are not larger than the preset time threshold value, determining that the data type of the file is the hot data type;
when the first difference value or the second difference value is larger than the preset time threshold value, further judging whether the current daily access volume of the file is larger than or equal to a first preset number threshold value;
when the daily access volume of the file is smaller than the first preset number threshold, determining the data type of the file as the candidate cold data type;
when the continuous times of determining that the data type of the file is the candidate cold data type in a preset time period exceed a first preset time threshold, determining that the data type of the file is the cold data type;
when the daily access amount of the file is larger than or equal to the first preset amount threshold value and the data type of the file is not the cold data type, determining that the data type of the file is the hot data type;
judging whether the current daily access volume of the file is larger than or equal to a second preset number threshold or not aiming at the file of which the current data type is the cold data type;
and when the current daily access amount of the file is larger than or equal to the second preset number threshold value and the continuous times of the current daily access amount of the file, which is larger than or equal to the second preset number threshold value, are determined to exceed the second preset time threshold value, determining the data type of the file to be the hot data type.
25. The cloud server of claim 18, wherein said file transfer request is a file upload request;
the first determining module is specifically configured to:
determining the communication quality grade between the client and a plurality of fog node routers according to the identification of the client;
selecting the target fog node router from the plurality of fog node routers according to the communication quality levels between the client and the plurality of fog node routers.
26. A client, comprising:
the sending module is used for sending a file transmission request to a cloud server so that the cloud server determines a target fog node router according to the file transmission request and sends a connection request to the target fog node router, wherein the file transmission request and the connection request carry an identifier of the client;
and the first transmission module is used for transmitting the file through the file transmission connection after the client establishes the file transmission connection with the target fog node router according to the identification of the client.
27. The client according to claim 26, wherein the file transfer request is a file access request, and the file access request and the connection request carry a target file identifier;
wherein, the first transmission module is specifically configured to:
and receiving a target file corresponding to the target file identifier sent by the target fog node router through the file transmission connection.
28. The client according to claim 26, wherein the file transfer request is a file upload request, and the file upload request and the connection request carry a target file identifier;
wherein, the first transmission module is specifically configured to:
and sending the target file corresponding to the target file identifier to the target fog node router through the file transmission connection.
29. The client of claim 26, further comprising:
and the second transmission module is used for carrying out file transmission with a local router through the file transmission connection between the client and the local router when the environment of the client is an intranet environment.
30. A fog node router, comprising:
the cloud node router comprises a receiving module, a sending module and a sending module, wherein the receiving module is used for receiving a connection request sent by a cloud server, the connection request is sent to the fog node router after the cloud server receives a file transmission request sent by a client to the cloud server, and the file transmission request and the connection request carry an identifier of the client;
the establishing module is used for establishing file transmission connection with the client according to the identification of the client;
and the transmission module is used for carrying out file transmission with the client through the file transmission connection.
31. The fog node router of claim 30, wherein the fog node router is an extranet address-equipped router of routers other than a local router to which the client corresponds.
32. The cloud node router of claim 30, wherein the file transfer request is a file access request, the file access request carries a target file identifier, and the cloud node router stores a plurality of files corresponding to the file identifiers respectively;
wherein, the transmission module is specifically configured to:
searching a target file corresponding to the target file identifier according to the target file identifier;
and sending the target file to the client through the file transmission connection.
33. The fog node router of claim 30, wherein the file transfer request is a file upload request, the file upload request and the connection request carrying a destination file identifier;
wherein, the transmission module is specifically configured to:
and receiving the target file corresponding to the target file identifier sent by the client through the file transmission connection.
34. The fog node router of claim 30, further comprising:
and the synchronization module is used for carrying out data synchronization with the local router corresponding to the client.
35. A file transmission system is characterized by comprising a client, a cloud server and a plurality of fog node routers;
the cloud server is used for receiving a file transmission request sent by the client, determining a target fog node router in the multiple fog node routers according to the file transmission request, and sending a connection request to the target fog node router, wherein the file transmission request and the connection request carry an identifier of the client;
the target fog node router is used for establishing file transmission connection with the client according to the identification of the client after receiving the connection request, and performing file transmission with the client through the file transmission connection;
and the client is used for sending the file transmission request to the cloud server and carrying out file transmission with the target fog node router through the file transmission connection.
36. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-8, or the method of any one of claims 9-12, or the method of any one of claims 13-17.
37. A non-transitory computer readable storage medium having stored thereon computer instructions for causing a computer to perform the method of any one of claims 1-8, or the method of any one of claims 9-12, or the method of any one of claims 13-17.
CN202110382829.2A 2021-04-09 2021-04-09 File transmission method, cloud server, client and cloud node router Active CN113163003B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110382829.2A CN113163003B (en) 2021-04-09 2021-04-09 File transmission method, cloud server, client and cloud node router
PCT/CN2022/085914 WO2022214085A1 (en) 2021-04-09 2022-04-08 File transmission method, cloud server, client and fog node router

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110382829.2A CN113163003B (en) 2021-04-09 2021-04-09 File transmission method, cloud server, client and cloud node router

Publications (2)

Publication Number Publication Date
CN113163003A true CN113163003A (en) 2021-07-23
CN113163003B CN113163003B (en) 2023-05-30

Family

ID=76889670

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110382829.2A Active CN113163003B (en) 2021-04-09 2021-04-09 File transmission method, cloud server, client and cloud node router

Country Status (2)

Country Link
CN (1) CN113163003B (en)
WO (1) WO2022214085A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022214085A1 (en) * 2021-04-09 2022-10-13 北京汇钧科技有限公司 File transmission method, cloud server, client and fog node router

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115834697A (en) * 2022-11-16 2023-03-21 北京奇艺世纪科技有限公司 File storage method, system and device and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090024991A1 (en) * 2007-07-16 2009-01-22 International Business Machines Corporation Method, system and program product for managing download requests received to download files from a server
US20150271287A1 (en) * 2014-03-20 2015-09-24 International Business Machines Corporation Allocating network bandwidth to prefetch requests to prefetch data from a remote storage to cache in a local storage
CN104994171A (en) * 2015-07-15 2015-10-21 上海斐讯数据通信技术有限公司 Distributed storage method and system
CN109033360A (en) * 2018-07-26 2018-12-18 腾讯科技(深圳)有限公司 A kind of data query method, apparatus, server and storage medium
CN111629075A (en) * 2020-08-03 2020-09-04 腾讯科技(深圳)有限公司 Data downloading method and related device
CN112073542A (en) * 2020-11-12 2020-12-11 腾讯科技(深圳)有限公司 Fog node scheduling method and device, computer equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104348901A (en) * 2014-06-30 2015-02-11 腾讯科技(深圳)有限公司 File transmission method, file transmission device and file transmission system
CN113163003B (en) * 2021-04-09 2023-05-30 北京汇钧科技有限公司 File transmission method, cloud server, client and cloud node router

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090024991A1 (en) * 2007-07-16 2009-01-22 International Business Machines Corporation Method, system and program product for managing download requests received to download files from a server
US20150271287A1 (en) * 2014-03-20 2015-09-24 International Business Machines Corporation Allocating network bandwidth to prefetch requests to prefetch data from a remote storage to cache in a local storage
CN104994171A (en) * 2015-07-15 2015-10-21 上海斐讯数据通信技术有限公司 Distributed storage method and system
CN109033360A (en) * 2018-07-26 2018-12-18 腾讯科技(深圳)有限公司 A kind of data query method, apparatus, server and storage medium
CN111629075A (en) * 2020-08-03 2020-09-04 腾讯科技(深圳)有限公司 Data downloading method and related device
CN112073542A (en) * 2020-11-12 2020-12-11 腾讯科技(深圳)有限公司 Fog node scheduling method and device, computer equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022214085A1 (en) * 2021-04-09 2022-10-13 北京汇钧科技有限公司 File transmission method, cloud server, client and fog node router

Also Published As

Publication number Publication date
CN113163003B (en) 2023-05-30
WO2022214085A1 (en) 2022-10-13

Similar Documents

Publication Publication Date Title
CN102523314B (en) Identify the method and apparatus of efficient destination server
EP2387273B1 (en) Method of communication for a terminal and a hub in a content centric network
CN113163003B (en) File transmission method, cloud server, client and cloud node router
CN103905526A (en) Dispatching method and server
US8903972B2 (en) Method and apparatus for sharing contents using information of group change in content oriented network environment
CN109873855A (en) A kind of resource acquiring method and system based on block chain network
CN104811473A (en) Virtual nonvolatile storage medium establishing method and system and management system
JP2019016042A (en) Data acquisition program, device, and method
JP2021039802A (en) Data processing system and data processing method
CN103685332A (en) File transfer method, client, server and system
CN102857547B (en) The method and apparatus of distributed caching
JP6886874B2 (en) Edge devices, data processing systems, data transmission methods, and programs
US7751346B2 (en) Apparatus for searching TCP and UDP sockets
CN108259348B (en) Message transmission method and device
CN101146130B (en) A method and system for transmitting data between clients
CN111835801B (en) File downloading method, device, server, edge equipment, terminal and medium
CN110838969B (en) Picture transmission method, device, equipment and medium
CN110535959B (en) Method and device for transmitting data and computer readable storage medium
CN109788075B (en) Private network system, data acquisition method and edge server
CN101146107B (en) A method and device for data download
US11831707B2 (en) Redirect processing for content delivery networks
CN108259340B (en) Topology information transmission method and device
CN101610289A (en) The methods, devices and systems of data download and node
CN101610165B (en) Method and device for automatically diffusing resources
CN103795810A (en) Data distribution system and method and central server of data distribution system

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20240108

Address after: 601, 6 / F, building 2, No. 18, Kechuang 11th Street, Daxing District, Beijing, 100176

Patentee after: Jingdong Technology Information Technology Co.,Ltd.

Address before: 100176 room 1004, 10th floor, building 1, 18 Kechuang 11th Street, Beijing Economic and Technological Development Zone, Daxing District, Beijing

Patentee before: Beijing Huijun Technology Co.,Ltd.