CN114390044B - File uploading method, system, equipment and storage medium - Google Patents

File uploading method, system, equipment and storage medium Download PDF

Info

Publication number
CN114390044B
CN114390044B CN202111640501.2A CN202111640501A CN114390044B CN 114390044 B CN114390044 B CN 114390044B CN 202111640501 A CN202111640501 A CN 202111640501A CN 114390044 B CN114390044 B CN 114390044B
Authority
CN
China
Prior art keywords
file
uploaded
uploading
equipment
url address
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111640501.2A
Other languages
Chinese (zh)
Other versions
CN114390044A (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.)
Hangzhou Huacheng Software Technology Co Ltd
Original Assignee
Hangzhou Huacheng Software 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 Hangzhou Huacheng Software Technology Co Ltd filed Critical Hangzhou Huacheng Software Technology Co Ltd
Priority to CN202111640501.2A priority Critical patent/CN114390044B/en
Publication of CN114390044A publication Critical patent/CN114390044A/en
Application granted granted Critical
Publication of CN114390044B publication Critical patent/CN114390044B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • G06F16/9566URL specific, e.g. using aliases, detecting broken or misspelled links

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

A file uploading method, system, equipment and storage medium belong to the information technology field, the method includes: receiving a request message sent by equipment where a file to be uploaded is located; analyzing the configuration rule according to the request message, and distributing a file ID for the file to be uploaded; if the uploading mode is direct memory, generating a URL address of a file to be uploaded of the cloud server according to a first preset rule and a file ID, and sending the URL address to equipment; if the uploading mode is the transfer, generating a URL address of a file to be uploaded of the proxy server according to a second preset rule and a file ID, and sending the URL address to the equipment; and receiving the uploading success message, and generating an index record according to the uploading success message. According to the technical scheme, the direct memory and the transfer memory of the uploaded file are distributed and managed through the signaling server, so that the direct memory and the transfer memory of the same network exist together, and the direct memory and the transfer memory can be automatically switched according to different scenes and the flexible configuration rules required.

Description

File uploading method, system, equipment and storage medium
Technical Field
The invention belongs to the technical field of information, and particularly relates to a file uploading method, a system, equipment and a storage medium.
Background
With the development of internet technology, data information created and to be stored by people is increasingly increased, network storage is becoming more and more popular as one storage mode, such as various application programs of network disks, cloud disks and the like, can provide data uploading and storing services for users, and the users can also establish a proxy server by themselves to store uploaded files. However, at present, various application programs are arranged in an array, and files are stored in respective servers by adopting different file uploading methods, so that the method is not beneficial to managing uploading data, different codes are required to be developed for different network storages so as to facilitate compatibility adjustment of equipment ends for uploading data, and if the current network environment changes, the codes are required to be manually changed again, thereby wasting time and labor.
Disclosure of Invention
The invention provides a file uploading method, a system, equipment and a storage medium, wherein a signaling server is used for distributing and managing direct memory and transfer memory of an uploaded file, so that the direct memory and transfer memory of the same network exist together, the equipment end only needs to send a request and upload the file through a received URL address, the direct memory and the transfer memory can be automatically uploaded without additional selection, and the direct memory and the transfer memory can be automatically switched through configuration rules.
In a first aspect, the present invention provides a method for uploading a file, including:
receiving a request message sent by equipment where a file to be uploaded is located, wherein the request message at least comprises attribute information of the file to be uploaded and/or attribute information of the equipment;
analyzing a configuration rule according to the request message, and distributing a file ID for the file to be uploaded, wherein the configuration rule is used for determining an uploading mode of the file to be uploaded, the uploading mode comprises direct memory and transfer memory, and the file ID is characterized as a unique identifier of the file to be uploaded;
If the uploading mode is determined to be direct memory, generating a URL address of a file to be uploaded of the cloud server according to a first preset rule and the file ID, and sending the URL address to the equipment; if the uploading mode is determined to be the transfer mode, generating a URL address of a file to be uploaded of the proxy server according to a second preset rule and the file ID, and sending the URL address to the equipment;
And receiving an uploading success message sent by the equipment where the file to be uploaded is located after the file to be uploaded is successfully sent according to the received URL address, and generating an index record according to the uploading success message, wherein the index record is used for searching the file to be uploaded.
In some embodiments, the method further includes, if the network environment parameter where the device is located changes, adjusting the configuration rule according to the changed network environment.
In some embodiments, the attribute information of the file to be uploaded includes: one or a combination of the type information of the file to be uploaded and the size information of the file to be uploaded; the attribute information of the device includes: one or a combination of name information of the equipment where the file to be uploaded is located and port number information used when the equipment uploads the file; and the configuration rule comprises one or a combination of attribute information of the file to be uploaded and/or attribute information of the equipment, and the attribute information and the combination are determined according to at least any one of the request messages.
In some embodiments, if it is determined that the uploading manner is direct memory, generating, according to a first preset rule and the file ID, a URL address of a file to be uploaded of the cloud server, specifically includes:
determining that the uploading mode is direct memory, acquiring authorization signature information of a cloud server, and generating a URL address of the cloud server of the file to be uploaded of the cloud server according to the authorization signature information, the network address of the cloud server, the storage path of the cloud server and the file ID.
In some embodiments, the URL address of the file to be uploaded of the cloud server further carries authorization information of the file to be uploaded, where the authorization information is used to indicate an upload time limit and/or an upload authority of the file to be uploaded.
In some embodiments, if the uploading mode is determined to be the transfer, generating the URL address of the file to be uploaded of the proxy server according to the second preset rule and the file ID specifically includes:
And if the uploading mode is the transfer mode, splicing and generating the URL address of the file to be uploaded of the proxy server according to the domain name information of the proxy server, the storage path of the proxy server and the file ID.
In some embodiments, the generating an index record according to the upload success message specifically includes:
And searching a storage path of an uploading server corresponding to the uploading file ID according to the uploading file ID in the uploading success message, taking the uploading file ID as a keyword, and taking the uploading server corresponding to the uploading file ID and the storage path as fields to generate an index record.
In a second aspect, the invention also provides a file uploading system, which comprises a signaling server, a proxy server and a cloud server;
The signaling server is used for receiving a message sent by equipment where a file to be uploaded is located, wherein the message comprises a request message and an uploading success message; analyzing a configuration rule according to the request message, and distributing a file ID for the file to be uploaded, wherein the configuration rule is used for determining an uploading mode of the file to be uploaded, the uploading mode comprises direct memory and transfer memory, and the file ID is characterized as a unique identifier of the file to be uploaded; if the uploading mode is determined to be direct memory, generating a URL address of a file to be uploaded of the cloud server according to a first preset rule and the file ID, and sending the URL address to the equipment; if the uploading mode is determined to be the transfer mode, generating a URL address of a file to be uploaded of the proxy server according to a second preset rule and the file ID, and sending the URL address to the equipment; the index record is also generated according to the uploading success message;
the proxy server is used for receiving the file to be uploaded sent by the equipment and returning the transmission result to the equipment; the cloud server is also used for uploading the file to be uploaded to the cloud server after the file to be uploaded is successfully received;
and the cloud server is used for receiving the file to be uploaded sent by the equipment and returning the transmission result to the equipment.
In some embodiments, the proxy server is further configured to encrypt the file if it is determined that the received file is a sensitive file, before uploading the file to the cloud server.
In a third aspect, the invention further provides a file uploading control device, a receiving-transmitting module, a configuration module and a recording module;
The receiving and transmitting module is used for receiving a message sent by equipment where a file to be uploaded is located, wherein the message comprises a request message and an uploading success message, and the request message at least comprises attribute information of the file to be uploaded and/or attribute information of the equipment and is also used for sending the URL address of the file to be uploaded, which is generated by the configuration module, to the equipment;
The configuration module is used for analyzing a configuration rule according to the request message and distributing a file ID for the file to be uploaded; the configuration rule is used for determining an uploading mode of the file to be uploaded, the uploading mode comprises direct memory and transfer memory, and the file ID is characterized as a unique identifier of the file to be uploaded; if the uploading mode is determined to be direct memory, generating a URL address of a file to be uploaded of the cloud server according to a first preset rule and the file ID; if the uploading mode is determined to be the transfer mode, generating a URL address of a file to be uploaded of the proxy server according to a second preset rule and the file ID;
And the recording module is used for generating an index record according to the uploading success message received by the receiving and transmitting module.
In a fourth aspect, the present invention also provides a computer device comprising a memory storing a computer program and a processor implementing the method of any one of the first aspects when the processor executes the computer program.
In a fifth aspect, the present invention also provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method of any of the first aspects.
The beneficial effects of the invention are as follows: the method and the device have the advantages that the direct memory and the transfer of the uploaded files are distributed and managed through the signaling server, so that the direct memory and the transfer of the same network exist together, the device end only needs to send a request and upload the files through the received URL address, the direct memory and the transfer can be automatically uploaded without selecting additionally, and a plurality of development codes are not required to be additionally developed to match compatibility requirements of different servers, the problem that the device end needs to develop different codes due to uploading of different servers is solved, and the configuration rules of the technical scheme can be used for automatically switching the direct memory and the transfer according to different scenes and the flexible configuration rules.
Drawings
In order to more clearly illustrate the technical solutions of the present invention, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a system architecture and interaction process according to an embodiment of the present invention;
fig. 2 is a signaling flow chart of a file uploading method according to an embodiment of the present invention;
Fig. 3 is a signaling flow chart of a transfer uploading method provided in an embodiment of the present invention;
Fig. 4 is a signaling flow chart of a direct memory access uploading method provided by an embodiment of the present invention;
Fig. 5 is a signaling flow chart of another transfer uploading method provided in an embodiment of the present invention;
FIG. 6 is a schematic URL address of a direct memory access uploading method according to an embodiment of the present invention;
fig. 7 is a URL address schematic diagram of a transfer uploading method according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which are derived by a person skilled in the art based on the embodiments of the invention, fall within the scope of protection of the invention.
It should be appreciated that in the description of embodiments of the invention, the words "first," "second," and the like are used merely for distinguishing between the descriptions and not for indicating or implying any relative importance or order.
The term "and/or" in the embodiment of the present invention is merely an association relationship describing the association object, and indicates that three relationships may exist, for example, a and/or B may indicate: a exists alone, A and B exist together, and B exists alone. In addition, the character "/" herein generally indicates that the front and rear associated objects are an "or" relationship.
The device comprises various terminal devices capable of uploading files to be saved through a network, such as mobile phones, tablet computers, notebook computers, palm computers, monitoring devices, various industrial devices capable of being networked, intelligent home appliances, wearable devices and the like, and the types and the number of the devices are not limited; the message transmission and the file uploading are transmitted through a network, and the network may be a wired network or a wireless network, which is not limited herein.
Embodiments of the invention are described in further detail below with reference to the drawings.
Fig. 1 illustrates an applicable system architecture and a transmission interaction process schematic related to a file to be uploaded, where the system architecture may include a signaling server 100, a plurality of devices 200, a plurality of proxy servers 300, and a plurality of cloud servers 400.
It should be noted that, fig. 1 schematically illustrates an interaction process of a file to be uploaded related to the present invention, which does not refer to a transmission path of an actual network, and in an actual network interaction process, an information interaction process still exists between the signaling server 100 and the cloud server 400 and the proxy server 300, and therefore, the present invention is not described in the technical scheme of the present invention mainly aiming at the interaction process of the file to be uploaded, and therefore, the information interaction process between the signaling server 100 and the cloud server 400 and the proxy server 300 is not described in the present invention.
The signaling server 100 and the device 200 are located in the same lan, and the proxy server 300 may be self-configured, may be located in the same lan as the device 200, or may not be located in the same lan, and the cloud server 400 is usually leased and is not typically located in the same lan as the current device 200, such as various network disks, cloud disks, and the like.
The signaling server 100 is required to be used for uploading the file when the current device 200 needs to be used for uploading the file, so that the signaling server 100 usually has a gateway role, and certainly, the current device 200 can be limited by a program or other modes, so that the current device 200 needs to be used for uploading the file through the signaling server 100, the invention is not limited in this regard, and a person skilled in the art can construct the current device according to the actual situation of the network.
Based on the above architecture, the following embodiments of the present invention will be described by taking one device 200, one signaling server 100, one proxy server 300, and one cloud server 400 as examples, and those skilled in the art should understand that, if there are multiple devices 200, multiple proxy servers 300, and multiple cloud servers 400 at the same time, the technical solutions may be implemented as well, which is only for simplicity of description.
A method of uploading a file, the method comprising:
Receiving a request message sent by equipment where a file to be uploaded is located, wherein the request message at least comprises attribute information of the file to be uploaded and/or attribute information of the equipment;
Analyzing a configuration rule according to the request message, and distributing a file ID for the file to be uploaded, wherein the configuration rule is used for determining an uploading mode of the file to be uploaded, the uploading mode comprises direct memory and transfer memory, and the file ID is characterized as a unique identifier of the file to be uploaded;
If the uploading mode is determined to be direct memory, generating a URL address of a file to be uploaded of the cloud server according to a first preset rule and a file ID, and sending the URL address to equipment; if the uploading mode is determined to be the transfer mode, generating a URL address of a file to be uploaded of the proxy server according to a second preset rule and a file ID, and sending the URL address to the equipment;
And receiving an uploading success message sent by the equipment where the file to be uploaded is located after the file to be uploaded is successfully sent according to the received URL address, and generating an index record according to the uploading success message, wherein the index record is used for searching the file to be uploaded.
The following description will be made by way of specific embodiments, and fig. 2 is a signaling flow chart of a file uploading method provided in this embodiment.
S201: receiving a request message sent by equipment where a file to be uploaded is located;
When the device 200 needs to upload a file, a request is transmitted to the signaling server 100, the request information is transmitted in the form of a message, and the signaling server 100 receives the request message transmitted from the device 200.
The transmitted request message at least includes attribute information of the file to be uploaded and/or attribute information of the device, where the attribute information of the file to be uploaded may include size information of the file, type information of the file, and name information of the file, and if the device 200 has multiple files to be uploaded, the multiple files may respectively transmit the request message to the signaling server in multiple request forms; the attribute information of the device may include, for example, name information of the device 200 where the request information is sent, port number information of the device 200, current network speed information of the device, and the like, and specifically, the content carried by the request message may be reasonably set according to actual needs.
S202: analyzing the configuration rule according to the request message, and distributing a file ID for the file to be uploaded;
After the signaling server 100 receives the request message, the configuration rules can be embodied in the form of a configuration table stored in a database according to information analysis configuration rules contained in the request message, can be embodied in the form of a common notepad, can be embodied in the form of codes in an editable xml format, is not limited in specific manner, and can be defined and flexibly adjusted according to actual needs, and the configuration rules are matched with information carried in the request message.
The configuration rule is used for determining an uploading mode of a file to be uploaded, the uploading mode comprises a direct storage mode and a transfer mode, the direct storage mode is that the equipment 200 directly uploads data to a designated cloud server 400, the transfer mode is that the equipment 200 uploads the data through a proxy server 300, and the proxy server 300 uploads the data to the cloud server 400 for storage after receiving the data. Whether direct or dump is employed is defined by the configuration rules of the signaling server 100.
When the signaling server 100 receives the request message, it determines that there are files to be uploaded, so that an ID needs to be allocated to the file to be uploaded, where the ID is characterized by a unique identifier of the file to be uploaded, that is, renaming the received file, so as to ensure that various files uploaded by different devices do not collide with each other.
S203: if the uploading mode is determined to be direct memory, generating a URL address of a file to be uploaded of the cloud server according to a first preset rule and a file ID; if the uploading mode is determined to be the transfer mode, generating a URL address of a file to be uploaded of the proxy server according to a second preset rule and the file ID;
If it is determined that the uploading mode is direct storage, that is, the device 200 directly uploads data to the designated cloud server 400, URL addresses of files to be uploaded of the cloud server are generated according to a first preset rule and a file ID, the first preset rule is defined according to rules of different cloud servers, and may include, but is not limited to, a network address where the cloud server is located, a storage path of the file, and the like, the file ID is a unique identifier of the signaling server 100 allocated to the device to be uploaded, so that the files to be uploaded do not collide with each other, and the URL addresses of the files to be uploaded of the cloud server are generated according to the first rule and the ID of the file, so that the uniqueness can be ensured; if the uploading mode is determined to be the transfer mode, the URL address of the file to be uploaded of the proxy server is generated according to a second preset rule and a file ID, the second preset rule is defined according to the rules of different proxy servers, and the proxy server is often set by itself, so that various flexibility settings can be carried out according to needs, and the URL address of the file to be uploaded of the proxy server is generated according to the second preset rule and the file ID, and uniqueness can be ensured as well.
S204: the generated URL address is sent to equipment where the file to be uploaded is located;
if the cloud server is in the direct storage mode, the URL address of the file to be uploaded of the cloud server is sent to the equipment where the file to be sent is located, and if the cloud server is in the direct storage mode, the URL address of the file to be uploaded of the proxy server is sent to the equipment where the file to be sent is located. For the equipment end, the file is only uploaded according to the received URL address, and whether the uploaded file is a proxy server or a cloud server is not clear or not, and the file is only uploaded according to the URL address.
If the URL address is at the proxy server end, the equipment end can upload the file to be uploaded to the proxy server, and if the URL address is at the cloud server end, the equipment end can upload the file to be uploaded to the cloud server. The information interaction between the signaling server, the proxy server and the cloud server is not described in the invention.
S205, receiving an uploading success message sent by equipment where the file to be uploaded is located after the file to be uploaded is successfully sent according to the received URL address;
After the device end finishes uploading the file, a message that the file is successfully uploaded is sent to the signaling server 100. After receiving the upload success message sent by the device end after successfully sending the file to be uploaded according to the received URL address, the signaling server 100 can confirm that the current file to be uploaded is successfully uploaded.
S206: generating an index record according to the uploading success message;
The signaling server receives the success message, and generates an index record according to the uploading success message after confirming that the uploading of the current file to be uploaded is successful, wherein the index form is not limited and is used for searching the file to be uploaded.
According to the technical scheme, the direct memory and the transfer of the uploaded files are distributed and managed through the signaling server, so that the direct memory and the transfer of the same network exist together, the equipment end only needs to send a request and upload the files through the received URL address, the direct memory and the transfer can be automatically uploaded without selecting additionally, and a plurality of development codes are not required to be additionally developed to match compatibility requirements of different servers, the problem that the equipment end needs to develop different codes due to uploading of different servers is solved, the uploaded files can be managed through the transfer proxy server, and the configuration rules of the technical scheme can be used for automatically switching the direct memory and the transfer according to different scenes and the flexible configuration rules.
Optionally, as an embodiment, if a network environment parameter where the device is located changes, the configuration rule is adjusted according to the changed network environment.
The following is a description of specific examples.
Environmental parameters of the network in which the device is located include, but are not limited to: newly added equipment, configuring relevant rules for the newly added equipment, or adopting the matching of general rules; the device release state adjustment, such as the same device, needs to adjust the configuration rule after the stable release stage is adjusted to the debugging stage, and the device in the stable release stage needs to reduce the cost of the server, so that the device can be configured in a direct memory mode, and the device in the debugging stage needs to analyze data and process problems, needs to further analyze the uploaded file through the proxy server, so that the device can be configured in a dump mode; if the current device is only used for monitoring to generate video data and does not contain sensitive data, the device may be configured in a direct memory mode without adopting a transfer mode, for example, a device white list WHITELIST is added, and a device located in the device white list may be directly stored; if some formats of the current uploading file are focused on in a period of time, the uploading file format of the current device can be configured in a way of transferring and other directly storing, and when the current period of time is over, all directly storing formats can be configured; for another example, the different port numbers of part of the devices send files with different properties, and the different port numbers of the same device can be set to be direct memory or transfer memory by configuring the port numbers; or the storage space of the proxy server reaches a set threshold value and is uniformly converted into direct memory; or adopting a direct storage mode in a certain time period and adopting a transfer mode in a certain time period. In actual use, the configuration rules can be adjusted according to actual needs.
According to the technical scheme, when the network environment parameters of the equipment are changed, the configuration rules are adjusted according to the changed network environment, the configuration rules can be freely adjusted according to actual needs, and the configuration is flexible, so that automatic switching between direct memory and transfer memory is realized.
Optionally, as one embodiment, the attribute information of the file to be uploaded includes: one or a combination of type information of a file to be uploaded and size information of the file to be uploaded; the attribute information of the device includes: the name information of the equipment where the file is to be uploaded and the port number information used when the equipment uploads the file are one or a combination of the name information and the port number information; the configuration rule comprises one or a combination of attribute information of the file to be uploaded and/or attribute information of the equipment.
When the equipment where the file to be uploaded is located needs to upload the file, a request needs to be sent to a signaling server, the request message at least contains one or a combination of attribute information of the file to be uploaded and/or attribute information of the equipment, the configuration rule is corresponding to the request message, namely, the configuration rule determines whether the file to be uploaded is direct memory or transfer memory through the attribute information of the file to be uploaded and/or the attribute information of the equipment, and the attribute information of the file to be uploaded comprises: the attribute information of the device includes one or a combination of type information of the file to be uploaded and size information of the file to be uploaded: at least any one of name information of the device where the file is to be uploaded and port number information used when the device uploads the file or a combination of the name information and the port number information can be used for determining the configuration rule. If the type information of the uploaded file is judged to be the data type file through the suffix name of the uploaded file, the data type file is determined to be the transfer storage, and if the type information is judged to be the video type file through the suffix name of the uploaded file, the data type file is determined to be the direct storage; if the size of the uploaded file is larger than a preset value, adopting direct storage, if the size of the file to be uploaded is larger than or equal to 128M, the file to be uploaded is direct storage, and if the size of the file to be uploaded is smaller than 128M, the file to be uploaded is transferred; if the equipment is the key equipment, the equipment is the transfer storage, and if the equipment is the key equipment, the direct storage or the transfer storage is determined by setting an equipment list; or the files uploaded by a certain port of a certain device need to be transferred and the files uploaded by other ports are directly stored; the configuration rule contains one or a combination of attribute information of the file to be uploaded and/or attribute information of the device, namely the information can determine whether direct storage or transfer storage is carried out.
Optionally, as one embodiment, if the uploading mode is determined to be direct memory, generating, according to a first preset rule and a file ID, a URL address of a file to be uploaded of the cloud server, including:
Determining that the uploading mode is direct memory, acquiring authorization signature information of the cloud server, and generating a URL address of a file to be uploaded of the cloud server according to the authorization signature information, the network address of the cloud server, the storage path of the cloud server and the file ID.
Optionally, as an embodiment, the URL address of the file to be uploaded of the cloud server further carries authorization information of the file to be uploaded, where the authorization information is used to indicate an upload time limit and/or an upload authority of the file to be uploaded.
Referring to fig. 6, fig. 6 is a URL address illustration of a direct memory access uploading method provided in this embodiment.
If the uploading mode is determined to be direct memory, the signaling server needs to acquire authorization information from the cloud server, the authorization information may include an authorized information account number, signature information and the like, of course, the authorization information may also be pre-stored in the signaling server, the requirements of the authorization information of different cloud servers may be different from each other, and if the requirements are true, the obtaining mode is not limited only by obtaining the authorization signature information of the cloud server, and after obtaining the authorization information of the cloud server, the URL address of the file to be uploaded of the cloud server may be generated according to the network address of the cloud server, the storage path of the cloud server and the file ID, and the generated URL address may be shown in fig. 6. The network address of the cloud server generally does not change, as in the portion a in fig. 6, the storage path of the cloud server is generally defined by the signaling server according to the authorization information and the file attribute information, although the storage path of the cloud server may be designated or otherwise not defined herein, for example, the portion B in fig. 6, it should be noted that the portion B in fig. 6 contains the authorization information, that is, includes account information and signature information, and is encrypted content according to the rules of the cloud server, and the cloud server automatically parses and determines the uploading file according to the rules after receiving the content; the ID of the file is previously allocated to the file to be uploaded by the signaling server, the ID of the file is the file name of the file to be uploaded successfully, as shown in part C and part C in fig. 6. Pdf represents the type of the file to be uploaded, after the information is provided, the URL address of the file to be uploaded of the cloud server can be generated, the generated exemplary URL address is shown in fig. 6, the address generating mode is related to the setting of each cloud server, different cloud servers have different generating modes, and the signaling server generates the corresponding URL uploading address according to the rules of the cloud servers.
Of course, in the process of generating the URL address of the cloud server, part of the URL address may also carry authorization information of the file to be uploaded, where the authorization information is used to indicate an upload time limit and/or an upload permission of the file to be uploaded, that is, the cloud server may limit the time limit and/or the upload permission of the file to be uploaded for the device to be uploaded, and in the process of generating the URL address of the file to be uploaded by the signaling server, the URL address is generated according to a corresponding rule of the cloud server, and the URL address may carry authorization information, such as part B in fig. 6, according to the rule of the cloud server, the cloud server may automatically parse.
Optionally, as one embodiment, if the uploading mode is determined to be the transfer, generating, according to a second preset rule and a file ID, a URL address of a file to be uploaded of the proxy server, including: and if the uploading mode is the transfer mode, splicing and generating the URL address of the file to be uploaded of the proxy server according to the domain name information of the proxy server, the storage path of the proxy server and the file ID.
Referring to fig. 7, fig. 7 is a URL address illustration of a dump upload mode provided in this embodiment.
If the uploading mode is determined to be the transfer mode, the data to be uploaded needs to be uploaded to the proxy server, and the proxy server uploads the data to the cloud server after the uploading is finished. The proxy server is generally self-configured, and has higher security than the common cloud server, so that no additional authorization information is added to ensure security, although the proxy server may be added if necessary, and this is described here as not including authorization information. After the transfer is determined, the URL address of the file to be uploaded is generated by splicing the storage path and the file ID of the proxy server according to the domain name information of the proxy server, the domain name information of the proxy server is usually unchanged, the storage path is defined by the signaling server according to the file to be stored, the ID of the file is previously distributed by the signaling server to the file to be uploaded, the ID of the file is the name of the file to be uploaded after the file to be uploaded is successfully uploaded, the URL address of the file to be uploaded is generated after the storage path and the file ID of the proxy server are spliced, as shown in fig. 7, the part A of the part A is the domain name information of the proxy server, the part B is the storage path of the proxy server, the part C is the ID, after the equipment receives the URL address, the domain name information of the file to be uploaded, the file path to be uploaded and the distributed file ID are judged according to rules, and the uploading operation is completed.
Optionally, as one embodiment, generating the index record according to the upload success message specifically includes: and searching a storage path of an uploading server corresponding to the uploading file ID according to the uploading file ID in the uploading success message, taking the uploading file ID as a keyword, taking the uploading server corresponding to the uploading file ID and the storage path as fields, and generating an index record.
After the file is successfully uploaded, the signaling server receives an uploading success message sent by the equipment where the file to be uploaded is located after the file to be uploaded is successfully sent according to the received URL address, which indicates that the equipment has successfully uploaded the file according to the allocated file ID, the signaling server needs to record the storage information of the current file to be uploaded so as to be conveniently searched in the cloud server or the proxy server, namely, the index information of the file to be uploaded is used for searching the file to be uploaded, the index information is generally recorded in a database, the index information can be saved in other forms, the method is not limited herein, the uploaded file can be found through the index information, generally, the uploading server and the storage path corresponding to the uploading file ID are used as fields, and the index record is generated.
Optionally, as one embodiment, the present invention further provides a file uploading system, including: the system comprises a signaling server, a proxy server and a cloud server;
The signaling server is used for receiving a message sent by the equipment where the file to be uploaded is located, wherein the message comprises a request message and an uploading success message; analyzing a configuration rule according to the request message, and distributing a file ID for the file to be uploaded, wherein the configuration rule is used for determining an uploading mode of the file to be uploaded, the uploading mode comprises direct memory and transfer memory, and the file ID is characterized as a unique identifier of the file to be uploaded; if the uploading mode is determined to be direct memory, generating a URL address of a file to be uploaded of the cloud server according to a first preset rule and a file ID, and sending the URL address to the equipment; if the uploading mode is determined to be the transfer mode, generating a URL address of a file to be uploaded of the proxy server according to a second preset rule and a file ID, and sending the URL address to the equipment; the index record is also generated according to the uploading success message;
the proxy server is used for receiving the file to be uploaded sent by the equipment and returning the transmission result to the equipment; the cloud server is used for uploading the file to be uploaded to the cloud server after the file to be uploaded is successfully received;
and the cloud server is used for receiving the file to be uploaded and returning the transmission result to the sender.
As shown in fig. 3 and fig. 4, fig. 3 is a signaling flow chart of a transfer uploading mode of a file to be uploaded provided in an embodiment of the present invention, fig. 4 is a signaling flow chart of a direct transfer uploading mode of a file to be uploaded provided in an embodiment of the present invention, and fig. 3 and fig. 4 are simplified to illustrate a part of functions of the signaling server 100.
The signaling server 100 has been described in the foregoing, and will not be described in detail here.
If the file is transferred, as shown in fig. 3, the proxy server 300 returns a transmission result of the device 200 after receiving the file to be uploaded sent by the device 200, for example, a success receiving message, the proxy server 300 sends the file to be uploaded to the cloud server 400 after receiving the file successfully, and the cloud server 400 returns a success receiving message of the proxy server 300 after receiving the file to be uploaded successfully.
If the file is uploaded in a direct memory, as shown in fig. 4, the cloud server 400 directly receives the file to be uploaded sent by the device 200, and returns a success message to the device 200 after receiving the success message.
For the cloud server 400, whether the file to be uploaded is sent from the proxy server 300 or the file to be uploaded is sent from the device 200, the file to be uploaded is received, and a transmission result message, such as a success message, of the sender is returned according to the transmission result.
Optionally, as one embodiment, the proxy server is further configured to encrypt the file if it is determined that the received file is a sensitive file before uploading the file to the cloud server.
Fig. 5 is a signaling flow chart of another transfer uploading method provided in the embodiment of the present invention, as shown in fig. 5, if the file received by the proxy server 300 is determined to be a sensitive file, for example, the device that sends the file to be uploaded is an important device, or some specified file format files are important files, or some fields of the file to be uploaded include fields of contents, etc., specifically, the signaling flow chart can be determined according to actual needs, and if the uploaded file is considered to be a sensitive file, the file is encrypted and then uploaded, so as to ensure the data security of the uploaded file.
Of course, the proxy server 300 may analyze the uploaded file, and analyze the uploaded file data according to actual needs, and since the proxy server 300 is generally self-established, the content and the analysis flexibility are high, and the present invention is not limited to examples, and those skilled in the art can perform various analyses according to actual needs.
Based on the same inventive concept, the invention also provides a file uploading control device, comprising: the device comprises a receiving and transmitting module, a configuration module and a recording module;
The receiving and transmitting module is used for receiving a message sent by the equipment where the file to be uploaded is located, wherein the message comprises a request message and an uploading success message, the request message at least comprises attribute information of the file to be uploaded and/or attribute information of the equipment, and the receiving and transmitting module is also used for sending the URL address of the file to be uploaded, which is generated by the configuration module, to the equipment;
The configuration module is used for analyzing the configuration rule according to the request message and distributing a file ID for the file to be uploaded; the configuration rule is used for determining an uploading mode of the file to be uploaded, the uploading mode comprises direct memory and transfer memory, and the file ID is characterized as a unique identifier of the file to be uploaded; if the uploading mode is determined to be direct memory, generating a URL address of a file to be uploaded of the cloud server according to a first preset rule and a file ID; if the uploading mode is determined to be the transfer mode, generating a URL address of a file to be uploaded of the proxy server according to a second preset rule and the file ID;
and the recording module is used for generating an index record according to the uploading success message received by the receiving and transmitting module.
Based on the same inventive concept, the invention also provides a computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the method of any of the above embodiments when executing the computer program.
Based on the same inventive concept, the present invention also provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the method of any of the above embodiments.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present application without departing from the spirit or scope of the application. Thus, it is intended that the present application also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (10)

1. A method for uploading a file, comprising:
receiving a request message sent by equipment where a file to be uploaded is located, wherein the request message at least comprises attribute information of the file to be uploaded and/or attribute information of the equipment;
analyzing a configuration rule according to the request message, and distributing a file ID for the file to be uploaded, wherein the configuration rule is used for determining an uploading mode of the file to be uploaded, the uploading mode comprises direct memory and transfer memory, and the file ID is characterized as a unique identifier of the file to be uploaded;
If the uploading mode is determined to be direct memory, generating a URL address of a file to be uploaded of the cloud server according to authorization signature information, a network address, a storage path and the file ID of the cloud server, and sending the URL address to the equipment; if the uploading mode is determined to be the transfer mode, generating a URL address of a file to be uploaded of the proxy server according to domain name information, a storage path and the file ID of the proxy server, and sending the URL address to the equipment;
And receiving an uploading success message sent by the equipment where the file to be uploaded is located after the file to be uploaded is successfully sent according to the received URL address, and generating an index record according to the uploading success message, wherein the index record is used for searching the file to be uploaded.
2. The method of claim 1, further comprising adjusting the configuration rule based on the changed network environment if the network environment parameter of the device changes.
3. The method according to claim 1, wherein the attribute information of the file to be uploaded includes: one or a combination of the type information of the file to be uploaded and the size information of the file to be uploaded; the attribute information of the device includes: one or a combination of name information of the equipment where the file to be uploaded is located and port number information used when the equipment uploads the file; the configuration rule comprises one or a combination of attribute information of the file to be uploaded and/or attribute information of the equipment.
4. The method of claim 1, wherein the URL address of the file to be uploaded of the cloud server further carries authorization information of the file to be uploaded, where the authorization information is used to indicate an upload time limit and/or an upload authority of the file to be uploaded.
5. The method according to claim 1, wherein the generating an index record according to the upload success message specifically includes:
And searching a storage path of an uploading server corresponding to the uploading file ID according to the uploading file ID in the uploading success message, taking the uploading file ID as a keyword, and taking the uploading server corresponding to the uploading file ID and the storage path as fields to generate an index record.
6. The file uploading system is characterized by comprising a signaling server, a proxy server and a cloud server;
The signaling server is used for receiving a message sent by equipment where a file to be uploaded is located, wherein the message comprises a request message and an uploading success message; analyzing a configuration rule according to the request message, and distributing a file ID for the file to be uploaded, wherein the configuration rule is used for determining an uploading mode of the file to be uploaded, the uploading mode comprises direct memory and transfer memory, and the file ID is characterized as a unique identifier of the file to be uploaded; if the uploading mode is determined to be direct memory, generating a URL address of a file to be uploaded of the cloud server according to the authorization signature information, the network address, the storage path and the file ID of the cloud server, and sending the URL address to the equipment; if the uploading mode is determined to be the transfer mode, generating a URL address of a file to be uploaded of the proxy server according to domain name information, a storage path and the file ID of the proxy server, and sending the URL address to the equipment; the index record is also generated according to the uploading success message;
the proxy server is used for receiving the file to be uploaded sent by the equipment and returning the transmission result to the equipment; the cloud server is also used for uploading the file to be uploaded to the cloud server after the file to be uploaded is successfully received;
The cloud server is used for receiving the file to be uploaded sent by the sender and returning the transmission result to the sender.
7. The system of claim 6, wherein the proxy server, prior to uploading the file to the cloud server, is further configured to encrypt the file if it is determined that the received file is a sensitive file.
8. A file upload control apparatus, comprising: the device comprises a receiving and transmitting module, a configuration module and a recording module;
The receiving and transmitting module is used for receiving a message sent by equipment where a file to be uploaded is located, wherein the message comprises a request message and an uploading success message, and the request message at least comprises attribute information of the file to be uploaded and/or attribute information of the equipment and is also used for sending the URL address of the file to be uploaded, which is generated by the configuration module, to the equipment;
The configuration module is used for analyzing a configuration rule according to the request message and distributing a file ID for the file to be uploaded; the configuration rule is used for determining an uploading mode of the file to be uploaded, the uploading mode comprises direct memory and transfer memory, and the file ID is characterized as a unique identifier of the file to be uploaded; if the uploading mode is determined to be direct memory, generating a URL address of a file to be uploaded of the cloud server according to the authorization signature information, the network address, the storage path and the file ID of the cloud server; if the uploading mode is determined to be the transfer, generating a URL address of a file to be uploaded of the proxy server according to domain name information, a storage path and the file ID of the proxy server;
And the recording module is used for generating an index record according to the uploading success message received by the receiving and transmitting module.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the method of any one of claims 1 to 5 when executing the computer program.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the method of any one of claims 1 to 5.
CN202111640501.2A 2021-12-29 2021-12-29 File uploading method, system, equipment and storage medium Active CN114390044B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111640501.2A CN114390044B (en) 2021-12-29 2021-12-29 File uploading method, system, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111640501.2A CN114390044B (en) 2021-12-29 2021-12-29 File uploading method, system, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114390044A CN114390044A (en) 2022-04-22
CN114390044B true CN114390044B (en) 2024-05-14

Family

ID=81199640

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111640501.2A Active CN114390044B (en) 2021-12-29 2021-12-29 File uploading method, system, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114390044B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114726849B (en) * 2022-06-10 2022-09-23 武汉四通信息服务有限公司 File transmission method, device, server and computer readable storage medium
CN114745374B (en) * 2022-06-10 2022-09-27 武汉四通信息服务有限公司 File transmission method and device, electronic equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017073084A (en) * 2015-10-09 2017-04-13 キヤノン株式会社 Document management system, document management server, information processing device, document management method, and program
CN109271363A (en) * 2018-09-17 2019-01-25 平安科技(深圳)有限公司 A kind of method and apparatus of file storage
CN110311880A (en) * 2018-03-20 2019-10-08 中移(苏州)软件技术有限公司 Method for uploading, the apparatus and system of file
CN110493350A (en) * 2019-08-27 2019-11-22 北京百度网讯科技有限公司 File uploading method and device, electronic equipment and computer-readable medium
CN111092916A (en) * 2018-10-23 2020-05-01 武汉斗鱼网络科技有限公司 File uploading method and device, electronic equipment and medium
CN111273940A (en) * 2018-12-05 2020-06-12 北京奇虎科技有限公司 Method and device for uploading program file to code warehouse
CN113098927A (en) * 2021-03-11 2021-07-09 厦门亿联网络技术股份有限公司 Picture uploading and downloading method of cloud storage network disk
CN113810454A (en) * 2021-01-15 2021-12-17 北京沃东天骏信息技术有限公司 File transmission method and device, electronic equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104247376B (en) * 2013-04-02 2018-06-26 华为技术有限公司 File uploading method, client, application server and the cloud storage system of cloud storage

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017073084A (en) * 2015-10-09 2017-04-13 キヤノン株式会社 Document management system, document management server, information processing device, document management method, and program
CN110311880A (en) * 2018-03-20 2019-10-08 中移(苏州)软件技术有限公司 Method for uploading, the apparatus and system of file
CN109271363A (en) * 2018-09-17 2019-01-25 平安科技(深圳)有限公司 A kind of method and apparatus of file storage
CN111092916A (en) * 2018-10-23 2020-05-01 武汉斗鱼网络科技有限公司 File uploading method and device, electronic equipment and medium
CN111273940A (en) * 2018-12-05 2020-06-12 北京奇虎科技有限公司 Method and device for uploading program file to code warehouse
CN110493350A (en) * 2019-08-27 2019-11-22 北京百度网讯科技有限公司 File uploading method and device, electronic equipment and computer-readable medium
CN113810454A (en) * 2021-01-15 2021-12-17 北京沃东天骏信息技术有限公司 File transmission method and device, electronic equipment and storage medium
CN113098927A (en) * 2021-03-11 2021-07-09 厦门亿联网络技术股份有限公司 Picture uploading and downloading method of cloud storage network disk

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
一种网络文件安全存储系统的设计与实现;王博;吴健;;微型电脑应用(08);全文 *
基于Iframe内联框架的异步文件上传与删除;罗斌;巴继东;;电子设计工程(12);全文 *

Also Published As

Publication number Publication date
CN114390044A (en) 2022-04-22

Similar Documents

Publication Publication Date Title
JP7222036B2 (en) Model training system and method and storage medium
CN114390044B (en) File uploading method, system, equipment and storage medium
EP3057281B1 (en) M2m application remote registration method, device, system and storage medium
CN110856126B (en) Information reporting and receiving method, terminal equipment and storage medium
US20190089749A1 (en) Method for providing wireless application privilege management
JP5544005B2 (en) Token management method for digital rights management
CN107111510B (en) Method and device for operating VNF packet
CN101854343B (en) Method for providing node information, and method and device for acquiring node information
CN109618176B (en) Processing method, equipment and storage medium for live broadcast service
CN109246078B (en) Data interaction method and server
CN112788126A (en) Resource downloading method, device, server and storage medium
CN107306247B (en) Resource access control method and device
US20090125803A1 (en) Method, system, client and server for managing xml document
CN107241312B (en) A kind of right management method and device
CN104239125A (en) Object processing method, distributive file system and client device
CN111740945A (en) Data processing method and device
CN111176706A (en) Terminal upgrading method and device, electronic equipment and storage medium
WO2015179012A1 (en) Methods, systems, and computer readable mediums for providing supply chain validation
CN105812432A (en) Cloud file processing method and device
KR100841737B1 (en) Method and system for managing transmission of internet contents
CN109688204B (en) File downloading method, node and terminal based on NDN (named data networking)
CN112087318B (en) Network management method, server, client and system
EP3048775B1 (en) Service processing method, related device and system
CN113852919B (en) Method and device for generating early warning message, storage medium and electronic device
CN114258020B (en) Proprietary cloud deployment method, platform and electronic equipment

Legal Events

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