CN114443608B - Distributed file storage and download method, device, equipment and medium - Google Patents
Distributed file storage and download method, device, equipment and medium Download PDFInfo
- Publication number
- CN114443608B CN114443608B CN202210362528.8A CN202210362528A CN114443608B CN 114443608 B CN114443608 B CN 114443608B CN 202210362528 A CN202210362528 A CN 202210362528A CN 114443608 B CN114443608 B CN 114443608B
- Authority
- CN
- China
- Prior art keywords
- data
- node
- vehicle
- storage
- nodes
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/18—File system types
- G06F16/182—Distributed file systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/602—Providing cryptographic facilities or services
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/62—Protecting access to data via a platform, e.g. using keys or access control rules
- G06F21/6218—Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1097—Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/12—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2221/00—Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F2221/21—Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F2221/2107—File encryption
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Signal Processing (AREA)
- General Health & Medical Sciences (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- Computer Networks & Wireless Communication (AREA)
- Health & Medical Sciences (AREA)
- Databases & Information Systems (AREA)
- Bioethics (AREA)
- Computer Hardware Design (AREA)
- Computer Security & Cryptography (AREA)
- Software Systems (AREA)
- Data Mining & Analysis (AREA)
- Computing Systems (AREA)
- Medical Informatics (AREA)
- Information Transfer Between Computers (AREA)
- Vehicle Cleaning, Maintenance, Repair, Refitting, And Outriggers (AREA)
Abstract
The application relates to the technical field of vehicle diagnosis data storage, and discloses a distributed file storage and download method, a device, equipment and a medium, wherein the vehicle diagnosis data is protected by analyzing and encrypting the received vehicle diagnosis data, and is stored in the form of metadata and file data, so that the operation pressure can be relieved for a server; the method comprises the steps of receiving a request downloading instruction, obtaining an address of the vehicle diagnosis device according to the request downloading instruction, searching a node closest to the address of the vehicle diagnosis device as a downloading node according to the address based on an edge computing mode, and transmitting file data and/or metadata stored on the downloading node to the vehicle diagnosis device, so that the vehicle diagnosis device can preferentially download required data from the node closest to the vehicle diagnosis device, and the method is not limited by the bandwidth of a cloud server and accelerates the storage and downloading speed of the vehicle diagnosis data.
Description
Technical Field
The present application relates to the field of vehicle diagnostic data storage technologies, and in particular, to a distributed file storage and download method, apparatus, device, and medium.
Background
A distributed storage system is used for storing data on a plurality of independent devices in a distributed mode. The traditional network storage system adopts a centralized storage server to store all data, and the storage server becomes the bottleneck of system performance and cannot meet the requirement of large-scale storage application. The distributed network storage system adopts an expandable system structure and utilizes a plurality of storage servers to share the storage load.
With the increase of network communication speed and the increase of data amount stored in the network, new problems arise, namely, storage servers need to be continuously increased to store the data, and when a user downloads the stored data, the user is limited by the bandwidth of the server, and the downloading is slow.
Disclosure of Invention
The application mainly aims to provide a distributed file storage and downloading method, and aims to solve the technical problems of vehicle diagnosis data storage and slow downloading in the prior art.
The application provides a distributed file storage and download method, which is applied to a cloud server and comprises the following steps:
receiving vehicle diagnostic data;
analyzing and encrypting the vehicle diagnosis data to obtain metadata and file data;
the metadata are stored in a centralized mode, and the file data are stored in a scattered mode, wherein the metadata and the file data are stored on a plurality of nodes in a cloud server respectively when the metadata and the file data are stored;
Receiving a download request instruction sent by vehicle diagnosis equipment, and acquiring an address of the vehicle diagnosis equipment according to the download request instruction;
searching a node closest to the address of the vehicle diagnosis equipment as a downloading node based on an edge calculation mode according to the address of the vehicle diagnosis equipment;
and sending the file data and/or the metadata stored on the downloading node to the vehicle diagnosis equipment so as to finish downloading the file data.
Preferably, the step of analyzing and encrypting the vehicle diagnostic data to obtain metadata and file data includes:
classifying the vehicle diagnosis data according to parameter types to obtain vehicle type data, fault diagnosis data and maintenance data;
respectively carrying out calculation analysis on the vehicle model data, the fault diagnosis data and the maintenance data based on preset keywords to obtain vehicle model outline data, fault diagnosis outline data and maintenance outline data;
acquiring a first encryption key;
sending the first encryption key to a plurality of nodes of a cloud server, wherein each node is provided with a random number, and the plurality of nodes generate a plurality of different second encryption keys according to the random number and the first encryption key;
Receiving a plurality of second encryption keys and encrypting the vehicle type data, the fault diagnosis data and the maintenance data according to the second encryption keys respectively;
acquiring a third encryption key, and encrypting the vehicle model outline data, the fault diagnosis outline data and the maintenance outline data according to the third encryption key;
acquiring a plurality of encrypted blank data, and naming a plurality of blank data, wherein the file naming comprises: first vehicle type data, first fault diagnosis data and first maintenance data;
binding the first vehicle model data, the vehicle model data and vehicle model outline data respectively, binding first fault diagnosis data, fault diagnosis data and fault diagnosis outline data, and binding first maintenance data, maintenance data and maintenance outline data to obtain a vehicle data set and a fault diagnosis data set;
marking the vehicle dataset, the fault diagnosis dataset, the maintenance dataset as file data;
and calculating the second encryption key and the third encryption key based on an SHA-2 algorithm to obtain metadata.
Preferably, the step of centrally storing the metadata and dispersedly storing the file data includes:
Acquiring the capacity utilization rates and the storage consumption time of a plurality of nodes, performing first weight value marking on the capacity utilization rate acquired each time, and performing second weight value marking on the storage consumption time acquired each time;
calculating the service performance values of the nodes according to the first weight value and the second weight value to obtain a plurality of service performance values;
sequencing the plurality of use performance values in sequence from big to small, and calculating the total number of the use performance values;
selecting a node corresponding to at least one service performance value as a standard node according to the total number and the service performance values and preset conditions;
dividing a plurality of nodes according to the standard nodes to obtain a plurality of storage node intervals, wherein the plurality of storage node intervals comprise a priority storage node interval and a plurality of secondary storage node intervals;
and intensively storing the metadata on the nodes of the priority storage node intervals, and storing the file data on the nodes of the secondary storage node intervals.
Preferably, the step of obtaining the capacity utilization rates and the storage consumption times of the plurality of nodes, performing a first weight value scaling on the capacity utilization rate obtained each time, and performing a second weight value scaling on the storage consumption time obtained each time includes:
Acquiring the total capacity and the used capacity of each node;
acquiring the data volume sent to each node in real time;
calculating the capacity utilization rate of the node according to the total capacity, the used capacity and the data volume, wherein the calculation formula is as follows:
S=(X a +X b )/X c ;
wherein, S represents the total capacity,X a indicating that the capacity has been used and,X b represents the amount of data;
sequentially carrying out first weight value marking on each node according to the capacity utilization rate of a plurality of nodes and a preset rule, wherein the higher the capacity utilization rate is, the lower the first weight value corresponding to the node is;
acquiring average time consumption of a plurality of nodes;
sending the same blank file to a plurality of nodes, and acquiring first time consumption for the plurality of nodes to store the blank file;
calculating unit storage time consumption of a plurality of nodes according to the average time consumption, the first time consumption and the total capacity of the nodes, wherein the calculation formula is as follows:
T d =(T e -T f )/X c ;
wherein, theT d Represents a unit storage elapsed time, saidT e Represents a first elapsed time, saidT f Represents the average elapsed time;
and sequentially carrying out second weight value marking and value marking on each node according to the unit storage time consumption of the plurality of nodes and a preset rule, wherein the higher the unit storage time consumption is, the lower the second weight value corresponding to the node is.
Preferably, the step of receiving a download request instruction sent by the vehicle diagnosis device and obtaining an address of the vehicle diagnosis device according to the download request instruction includes:
receiving a download request instruction sent by vehicle diagnosis equipment, and analyzing the download request instruction to obtain download demand information and an IP address of the vehicle diagnosis equipment;
acquiring a node corresponding to the downloading demand information according to the downloading demand information, wherein the node stores storage information corresponding to the downloading demand;
and associating the information of the node on the IP address to obtain the address of the vehicle diagnosis equipment comprising the node information.
Preferably, after the step of receiving a download request instruction sent by the vehicle diagnosis device and obtaining an address of the vehicle diagnosis device according to the download request instruction, the method further includes:
acquiring a download path of the vehicle diagnosis equipment according to the address;
acquiring the storable capacity corresponding to the download path according to the download path;
judging whether the storable capacity meets a first preset capacity or not;
if the storable capacity meets a first preset capacity, sending a download confirmation instruction to the vehicle diagnosis equipment;
If the storable capacity does not meet the first preset capacity, acquiring the whole storage capacity of the vehicle diagnosis equipment, and judging whether the whole storage capacity meets a second preset capacity or not;
and if the overall storage capacity meets a second preset capacity, sending a combined downloading instruction to the vehicle diagnosis equipment.
Preferably, the step of searching a node closest to the address of the vehicle diagnostic apparatus based on an edge calculation manner according to the address of the vehicle diagnostic apparatus as a download node includes:
acquiring a second address of each node in the cloud server;
calculating a first distance between the vehicle diagnosis device and each node according to the address of the vehicle diagnosis device and the second address of each node to obtain a plurality of first distance values;
selecting a first distance value as a standard distance value, screening out nodes corresponding to the first distance value smaller than the standard distance value, and marking the nodes as first nodes to obtain a set of the first nodes;
acquiring network states of a plurality of first nodes;
judging whether the network state of each first node meets a preset network state or not;
if the network state of the first node meets a preset network state, marking the first node as a second node to obtain a plurality of second nodes meeting the preset network state;
And acquiring a second address corresponding to the second node and an address of the vehicle diagnosis equipment, searching a second node closest to the address of the vehicle diagnosis equipment based on an edge calculation mode according to the second address and the address, and taking the second node as a downloading node.
The application also provides a distributed file storage and downloading device, including:
a first receiving module for receiving vehicle diagnostic data;
the encryption module is used for analyzing and encrypting the vehicle diagnosis data to obtain metadata and file data;
the storage module is used for performing centralized storage on the metadata and performing dispersed storage on the file data, wherein the metadata and the file data are respectively stored on a plurality of nodes in a cloud server during storage;
the second receiving module is used for receiving a download request instruction sent by the vehicle diagnosis equipment and acquiring the address of the vehicle diagnosis equipment according to the download request instruction;
the searching module is used for searching a node closest to the address of the vehicle diagnosis equipment as a downloading node based on an edge calculation mode according to the address of the vehicle diagnosis equipment;
and the downloading module is used for sending the file data and/or the metadata stored on the downloading node to the vehicle diagnosis equipment so as to finish downloading of the file data.
The application also provides computer equipment which comprises a memory and a processor, wherein the memory stores computer programs, and the processor realizes the steps of the distributed file storage and downloading method when executing the computer programs.
The present application also provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the above-described distributed file storage and download method.
The beneficial effect of this application does: after the vehicle diagnosis data uploaded by the vehicle diagnosis equipment is received, the vehicle diagnosis data can be analyzed and encrypted, so that the vehicle diagnosis data are protected, and the vehicle diagnosis data are stored in the form of metadata and file data, wherein the metadata are stored in a centralized manner, and the file data are stored in a scattered manner, so that the operation pressure of a server can be relieved; the method comprises the steps of receiving a request downloading instruction, obtaining an address of the vehicle diagnosis device according to the request downloading instruction, searching a node closest to the address of the vehicle diagnosis device as a downloading node according to the address based on an edge computing mode, and transmitting file data and/or metadata stored on the downloading node to the vehicle diagnosis device, so that the vehicle diagnosis device can preferentially download required data from the node closest to the vehicle diagnosis device, and the method is not limited by the bandwidth of a cloud server and accelerates the storage and downloading speed of the vehicle diagnosis data.
Drawings
Fig. 1 is a schematic flowchart of a distributed file storage and download method according to an embodiment of the present application.
Fig. 2 is a schematic structural diagram of a distributed file storage and download apparatus according to an embodiment of the present application.
Fig. 3 is a schematic diagram of an internal structure of a computer device according to an embodiment of the present application.
The implementation, functional features and advantages of the objectives of the present application will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
As shown in fig. 1 to 3, the present application provides a distributed file storage and download method, which is applied to a cloud server, and includes:
s1, receiving vehicle diagnosis data;
s2, analyzing and encrypting the vehicle diagnosis data to obtain metadata and file data;
s3, performing centralized storage on the metadata, and performing dispersed storage on the file data, wherein when the metadata and the file data are stored, the metadata and the file data are respectively stored on a plurality of nodes in a cloud server;
s4, receiving a download request instruction sent by the vehicle diagnosis equipment, and acquiring the address of the vehicle diagnosis equipment according to the download request instruction;
S5, according to the address of the vehicle diagnosis equipment, searching a node closest to the address of the vehicle diagnosis equipment as a download node based on an edge calculation mode;
and S6, sending the file data and/or the metadata stored on the downloading node to the vehicle diagnosis equipment so as to complete the downloading of the file data.
As described in the foregoing steps S1-S6, since the vehicle diagnostic device is generally used to diagnose the fault of the vehicle, the vehicle diagnostic device stores a large amount of vehicle diagnostic data, which easily causes the storage capacity in the vehicle diagnostic device to be smaller and smaller, and if the vehicle diagnostic device is not processed, the vehicle diagnostic device is easily stuck, so the vehicle diagnostic data can be stored in the cloud server, the cloud server can receive the vehicle diagnostic data of a plurality of vehicle diagnostic devices, and after receiving the vehicle diagnostic data uploaded by the vehicle diagnostic device, the vehicle diagnostic data can be analyzed and encrypted to protect the vehicle diagnostic data, and the vehicle diagnostic data can be stored in the form of metadata and file data, specifically, the metadata can be defined as relatively important data, the file data may be secondary data or configuration file data matched with the metadata, and when the file data is stored, the metadata may be stored in a centralized manner, and the file data is stored in a distributed manner, it should be noted that the encryption level number and the storage performance of the nodes where the metadata is stored in a centralized manner are higher than those of the nodes where the file data is stored, so that the security performance of the metadata can be enhanced, and the file data is stored in a distributed manner on each node, and the operating pressure of the server can also be reduced; when a certain vehicle diagnosis device needs to download vehicle diagnosis data, the request downloading instruction is received, so that the address of the vehicle diagnosis device can be obtained according to the request downloading instruction, then according to the address, the node closest to the address of the vehicle diagnosis device is searched for as the downloading node based on an edge computing mode, and then file data and/or metadata stored on the downloading node are transmitted to the vehicle diagnosis device, so that the vehicle diagnosis device can preferentially download required data from the node closest to the vehicle diagnosis device, the bandwidth of a cloud server is not limited, and the storage and downloading speed of the vehicle diagnosis data is accelerated. Preferably, when the metadata is downloaded, the metadata can be transmitted based on the API, so that the interdependence of the nodes in the cloud service can be reduced, the cohesion of the nodes can be improved, the coupling degree between the nodes can be reduced, and the maintainability and the expansibility of the cloud server can be improved.
In one embodiment, the step S2 of parsing and encrypting the vehicle diagnosis data to obtain metadata and file data includes:
s21, classifying the vehicle diagnosis data according to parameter types to obtain vehicle type data, fault diagnosis data and maintenance data;
s22, respectively performing calculation analysis on the vehicle model data, the fault diagnosis data and the maintenance data based on preset keywords to obtain vehicle model outline data, fault diagnosis outline data and maintenance outline data;
s23, acquiring a first encryption key;
s24, sending the first encryption key to a plurality of nodes of a cloud server, wherein each node is provided with a random number, and the plurality of nodes generate a plurality of different second encryption keys according to the random number and the first encryption key;
s25, receiving a plurality of second encryption keys and encrypting the vehicle model data, the fault diagnosis data and the maintenance data according to the second encryption keys respectively;
s26, acquiring a third encryption key, and encrypting the vehicle model outline data, the fault diagnosis outline data and the maintenance outline data according to the third encryption key;
S27, obtaining a plurality of encrypted blank data, and naming the plurality of blank data, wherein the file naming comprises: first vehicle type data, first fault diagnosis data and first maintenance data;
s28, binding the first vehicle model data, the vehicle model data and the vehicle model outline data, binding the first fault diagnosis data, the fault diagnosis data and the fault diagnosis outline data, and binding the first maintenance data, the maintenance data and the maintenance outline data to obtain a vehicle data set and a fault diagnosis data set;
s29, marking the vehicle data set, the fault diagnosis data set and the maintenance data set as file data;
s210, performing an operation on the second encryption key and the third encryption key based on the SHA-2 algorithm to obtain metadata.
As described in the above steps S21-S210, the vehicle diagnosis data generally includes vehicle type information, fault diagnosis information, and maintenance information, so that the file of the vehicle diagnosis data is large, if the vehicle data uploaded by the vehicle diagnosis device is directly analyzed and encrypted, not only is it long-lasting, but also the encryption difficulty is large, and furthermore, when the vehicle diagnosis device subsequently downloads data, the uploaded vehicle diagnosis data is completely downloaded, and only the required vehicle diagnosis data cannot be downloaded, based on which, when the vehicle diagnosis data is analyzed and encrypted, the vehicle diagnosis data is first classified according to the parameter type to obtain the vehicle data, the fault diagnosis data, and the maintenance data, and then the vehicle type data, the fault diagnosis data, and the maintenance data are calculated and analyzed based on the preset keywords to obtain the vehicle type data, the fault diagnosis data, and the maintenance data, specifically, the preset keywords may be set according to actual requirements, for example, for vehicle model data, a vehicle model number may be set as the preset keywords, and also for a vehicle type category, the preset keywords may be set as the preset keywords, so that vehicle model outline data based on vehicle model signals may be obtained, since the vehicle model outline data is only related to the vehicle model signals, the total capacity of the file is also small, and for fault diagnosis data, for example, the preset keywords may be set as fault codes, so that fault diagnosis outline data may be obtained; the vehicle type data, the fault diagnosis data and the maintenance data are respectively encrypted according to the second encryption keys, so that the safety of the vehicle type data, the fault diagnosis data and the maintenance data can be improved, and the possibility of malicious acquisition or tampering is reduced; acquiring a third encryption key, and encrypting the vehicle model outline data, the fault diagnosis outline data and the maintenance outline data according to the third encryption key; although the vehicle diagnosis data is encrypted, there is still a possibility that the vehicle diagnosis data is stolen, in order to prevent the password from being decrypted, the vehicle diagnosis data is obtained, so that blank data is obtained, the blank data is named as first vehicle type data, first fault diagnosis data and first maintenance data, and the first vehicle type data, the vehicle type data and the vehicle type outline data are bound, the first fault diagnosis data, the fault diagnosis data and the fault diagnosis data are bound, the first maintenance data, the maintenance data and the maintenance outline data are bound, a vehicle data set and a fault diagnosis data set are obtained, so that if the third encryption key is decrypted, since the vehicle type data, the fault diagnosis data and the maintenance data are also encrypted, the vehicle type data, the fault diagnosis data and the maintenance data are obtained after decryption, and thus, the vehicle type data, the fault diagnosis data and the maintenance data can be better protected, reducing the likelihood of theft. Finally, the vehicle data set, the fault diagnosis data set and the maintenance data set are marked as file data; and calculating the second encryption key and the third encryption key based on an SHA-2 algorithm to obtain metadata. It should be noted that the user may also mark the vehicle data set, the failure diagnosis data set, or the maintenance data set as metadata based on the user's own needs.
In one embodiment, the step S3 of centrally storing the metadata and dispersedly storing the file data includes:
s31, acquiring the consumption time of a plurality of nodes and storing, performing first weight value marking on the capacity utilization rate acquired each time, and performing second weight value marking on the storage consumption time acquired each time;
s32, calculating the use performance values of the nodes according to the first weight value and the second weight value to obtain a plurality of use performance values;
s33, sequencing the plurality of use performance values in sequence from big to small, and calculating the total number of the use performance values;
s34, selecting a node corresponding to at least one use performance value as a standard node according to the total number and the use performance values and preset conditions;
s35, dividing a plurality of nodes according to the standard nodes to obtain a plurality of storage node intervals, wherein the plurality of storage node intervals comprise a priority storage node interval and a plurality of secondary storage node intervals;
and S36, storing the metadata on the nodes of the priority storage node interval in a centralized manner, and storing the file data on the nodes of the secondary storage node interval.
As described in the above steps S31-S36, in order to increase the storage speed and reasonably utilize each node, when storing metadata and file data, first obtaining the capacity utilization rates and the storage consumption time of a plurality of nodes, performing a first weight value marking on the capacity utilization rates, performing a second weight value marking on the storage consumption time, calculating the usability performance value of each node according to the first weight value and the second weight value to obtain a plurality of usability performance values, sorting the usability performance values in descending order, so as to quickly know the usability of each node according to the sorting order, selecting a node corresponding to the usability performance value as a standard node according to a preset condition based on an actual demand, and dividing the plurality of nodes based on a brick-marked node to obtain a plurality of storage node sections, for example, the nodes with low capacity utilization rate and short storage consumption time can be used as priority storage nodes, the nodes with medium capacity utilization rate and medium storage consumption time can be used as secondary storage nodes, metadata are preferentially and intensively stored on the priority storage nodes during storage, file data can be stored on the priority storage nodes if the priority storage nodes have surplus, and the file data can be stored on the secondary storage nodes respectively if the priority storage nodes have no surplus, so that the storage speed of each node can be improved, and each node can be reasonably utilized.
In one embodiment, the step S31 of obtaining the capacity usage rates and the storage consumption times of the plurality of nodes, performing a first weight value scaling on each obtained capacity usage rate, and performing a second weight value scaling on each obtained storage consumption time includes:
s311, acquiring the total capacity and the used capacity of each node;
s312, acquiring the data volume sent to each node in real time;
s313, calculating the capacity utilization rate of the node according to the total capacity, the used capacity and the data volume, wherein the calculation formula is as follows:
S=(X a +X b )/X c ;
wherein, S represents the total capacity,X a indicating that the capacity has been used and,X b represents the amount of data;
s314, sequentially performing first weight value marking on each node according to the capacity utilization rate of the plurality of nodes and a preset rule, wherein the higher the capacity utilization rate is, the lower the first weight value corresponding to the node is;
s315, obtaining average consumed time of a plurality of nodes;
s316, sending the same blank file to a plurality of nodes, and acquiring first time consumption for the plurality of nodes to store the blank file;
s317, calculating unit storage consumed time of a plurality of nodes according to the average consumed time, the first consumed time and the total capacity of the nodes, wherein the calculation formula is as follows:
T d =(T e -T f )/X c ;
Wherein, theT d Represents a unit storage elapsed time, saidT e Represents a first elapsed time, saidT f Represents the average elapsed time;
and S318, sequentially carrying out second weight value marking and value marking on each node according to unit storage time consumption of the plurality of nodes and a preset rule, wherein the higher the unit storage time consumption is, the lower the second weight value corresponding to the node is.
As described in the above steps S311 to S318, when the capacity utilization rates and the storage consumption times of the multiple nodes are obtained, and the first weight value is performed on the obtained capacity utilization rates, the total capacity and the used capacity of each node are first obtained, and then the data volume sent to each node each time is obtained in real time, so that the capacity utilization rate of each node can be calculated according to the total capacity, the used capacity, and the data volume, and then the first weight value is performed on the nodes according to the capacity utilization rates, wherein the higher the capacity utilization rate is, the smaller the space which can be currently stored is represented, and therefore, the smaller the first weight value is; when the second weight value is marked for the storage consumption time obtained each time, the average consumed time of the storage data of each node can be obtained first, then a blank file is sent to the plurality of nodes, and the first consumed time of the blank file stored in each node is obtained, so that the unit storage consumed time of each node can be calculated according to the average consumed time, the first consumed time and the total capacity of the nodes, then the second weight value is carried out on each node according to the unit storage consumed time, the second weight value corresponding to the node with the higher unit storage consumed time is lower, so that the use performance value calculated based on the first weight value and the second weight value can accurately represent the performance of the node, and specifically, the use performance value is the product of the first weight value and the second weight value.
In one embodiment, the step S4 of receiving a download request instruction sent by the vehicle diagnostic device and obtaining an address of the vehicle diagnostic device according to the download request instruction includes:
s41, receiving a download request instruction sent by the vehicle diagnosis equipment, and analyzing the download request instruction to obtain download demand information and an IP address of the vehicle diagnosis equipment;
s42, acquiring a node corresponding to the downloading demand information according to the downloading demand information, wherein the node stores storage information corresponding to the downloading demand;
and S43, associating the information of the node with the IP address to obtain the address of the vehicle diagnosis equipment comprising the node information.
As described in the above steps S41-S43, when the request download instruction sent by the vehicle diagnosis device is received, the request download instruction is first analyzed to obtain the download requirement information and the IP address, and then the corresponding node is obtained according to the download requirement information, specifically, the download requirement information may be the schema data (vehicle model schema data, diagnosis schema data, maintenance schema data), since the schema data has a small space and is stored as a key, the schema data may be matched with the schema data on the node to quickly obtain the corresponding node, and then the information carried by the node is associated with the IP address to obtain the address of the vehicle age diagnosis device containing the node information, which is convenient for searching the node with the most taboo address as a download node based on the address information to download, thereby increasing the download speed.
In one embodiment, after the step S4 of receiving a download request instruction sent by a vehicle diagnostic device and obtaining an address of the vehicle diagnostic device according to the download request instruction, the method further includes:
s401, acquiring a download path of the vehicle diagnosis equipment according to the address;
s402, acquiring a storable capacity corresponding to the download path according to the download path;
s403, judging whether the storable capacity meets a first preset capacity;
s404, if the storable capacity meets a first preset capacity, sending a download confirmation instruction to the vehicle diagnosis equipment;
s405, if the storable capacity does not meet the first preset capacity, acquiring the whole storage capacity of the vehicle diagnosis equipment, and judging whether the whole storage capacity meets a second preset capacity or not;
s406, if the overall storage capacity meets a second preset capacity, a combined downloading instruction is sent to the vehicle diagnosis equipment.
As described in the above steps S401 to S S406, after the step S4 of obtaining the address of the vehicle diagnostic device according to the download request instruction, since some download paths on the vehicle diagnostic device are factory-set, the download paths often download data, and therefore the storable capacity of the download paths may be insufficient, in order to prevent download failure due to insufficient memory during the download process, the download paths of the vehicle diagnostic device may be obtained according to the address, and the corresponding storable capacity may be obtained based on the download paths, if the storable capacity satisfies the capacity required for downloading data (the first preset capacity), a confirmation download instruction may be sent to the vehicle diagnostic device, if the storable capacity does not satisfy the first preset capacity, the entire storage capacity of the vehicle diagnostic device may be obtained, and it is determined whether the entire storage capacity satisfies the second preset capacity, if the overall storage capacity meets the second preset capacity, a combined downloading instruction is sent to the vehicle diagnosis equipment, so that when the node sends data to the vehicle diagnosis equipment, the data can be divided into a plurality of equal parts based on the overall storage capacity and respectively transmitted to different storage areas of the vehicle diagnosis equipment, data downloading failure is avoided, and the storage areas of the vehicle diagnosis equipment can be reasonably utilized.
In one embodiment, the step S5 of finding a node closest to the address of the vehicle diagnostic apparatus as a download node based on an edge calculation method according to the address of the vehicle diagnostic apparatus includes:
s51, acquiring a second address of each node in the cloud server;
s52, calculating a first distance between the vehicle diagnosis equipment and each node according to the address of the vehicle diagnosis equipment and the second address of each node to obtain a plurality of first distance values;
s53, selecting a first distance value as a standard distance value, screening out nodes corresponding to the first distance value smaller than the standard distance value, and marking the nodes as first nodes to obtain a first node set;
s54, acquiring network states of a plurality of first nodes;
s55, judging whether the network state of each first node meets a preset network state;
s56, if the network state of the first node meets the preset network state, marking the first node as a second node to obtain a plurality of second nodes meeting the preset network state;
s57, acquiring a second address corresponding to the second node and the address of the vehicle diagnosis equipment, searching the second node closest to the address of the vehicle diagnosis equipment according to the second address and the address based on an edge calculation mode, and taking the second node as a downloading node.
As described in the above steps S51-S57, when the node closest to the address of the vehicle diagnostic device is searched as the download node based on the edge calculation method according to the address of the vehicle diagnostic device, the second address of each node may be obtained, and the first distance between the vehicle diagnostic device and each node may be calculated according to the address of the vehicle diagnostic device and the second address, so as to screen out the nodes with the larger first distance, and obtain the first nodes with the distance satisfying the condition, and besides the distance having an influence on the download, the network status of each node also influences the download speed, so after obtaining a plurality of first nodes, the network status of each first node may be obtained, the first nodes with the lower network status may be screened out, and the second nodes with the better network status may be obtained, and then the second node closest to the address of the vehicle diagnostic device may be searched by the edge calculation method, the second node is used as a downloading node, so that the vehicle diagnosis device can download required data very quickly, and the time consumed by downloading is reduced.
The application also provides a distributed file storage and download device, including:
a first receiving module 1 for receiving vehicle diagnostic data;
The encryption module 2 is used for analyzing and encrypting the vehicle diagnosis data to obtain metadata and file data;
the storage module 3 is configured to perform centralized storage on the metadata and perform decentralized storage on the file data, where the metadata and the file data are stored on multiple nodes in the cloud server respectively during storage;
the second receiving module 4 is configured to receive a download request instruction sent by the vehicle diagnostic device, and obtain an address of the vehicle diagnostic device according to the download request instruction;
the searching module 5 is used for searching a node closest to the address of the vehicle diagnosis equipment as a downloading node based on an edge calculation mode according to the address of the vehicle diagnosis equipment;
and the downloading module 6 is used for sending the file data and/or the metadata stored on the downloading node to the vehicle diagnosis equipment so as to finish downloading of the file data.
In one embodiment, the encryption module 2 includes:
the classification unit is used for classifying the vehicle diagnosis data according to parameter types to obtain vehicle type data, fault diagnosis data and maintenance data;
the analysis unit is used for performing calculation analysis on the vehicle model data, the fault diagnosis data and the maintenance data based on preset keywords respectively to obtain vehicle model outline data, fault diagnosis outline data and maintenance outline data;
A first acquisition unit configured to acquire a first encryption key;
the cloud server comprises a first sending unit, a second sending unit and a first processing unit, wherein the first sending unit is used for sending the first encryption key to a plurality of nodes of the cloud server, each node is provided with a random number, and the plurality of nodes generate a plurality of different second encryption keys according to the random number and the first encryption key;
the first receiving unit is used for receiving a plurality of second encryption keys and encrypting the vehicle type data, the fault diagnosis data and the maintenance data according to the second encryption keys;
a second obtaining unit, configured to obtain a third encryption key, and encrypt the vehicle model outline data, the fault diagnosis outline data, and the maintenance outline data according to the third encryption key, respectively;
a third obtaining unit, configured to obtain multiple encrypted blank data, and perform file naming on the plurality of blank data, where the file naming includes: first vehicle type data, first fault diagnosis data and first maintenance data;
the binding unit is used for binding the first vehicle type data, the vehicle type data and the vehicle type outline data respectively, binding the first fault diagnosis data, the fault diagnosis data and the fault diagnosis outline data, and binding the first maintenance data, the maintenance data and the maintenance outline data to obtain a vehicle data set and a fault diagnosis data set;
A marking unit for marking the vehicle data set, the fault diagnosis data set, and the maintenance data set as file data;
and the operation unit is used for performing operation on the second encryption key and the third encryption key based on an SHA-2 algorithm to obtain metadata.
In one embodiment, the memory module 3 includes:
a fourth obtaining unit, configured to obtain capacity utilization rates and storage consumption times of the multiple nodes, perform a first weight value scaling on the capacity utilization rate obtained each time, and perform a second weight value scaling on the storage consumption time obtained each time;
the service performance calculating unit is used for calculating service performance values of the nodes according to the first weight values and the second weight values to obtain a plurality of service performance values;
the sequencing unit is used for sequencing the plurality of use performance values in turn from big to small and calculating the total number of the use performance values;
the selecting unit is used for selecting at least one node corresponding to the use performance value as a standard node according to the total number and the use performance values and preset conditions;
the dividing unit is used for dividing the plurality of nodes according to the standard node to obtain a plurality of storage node intervals, wherein the plurality of storage node intervals comprise a priority storage node interval and a plurality of secondary storage node intervals;
And the storage unit is used for storing the metadata on the nodes of the priority storage node intervals in a centralized manner and storing the file data on the nodes of the secondary storage node intervals.
In one embodiment, the fourth obtaining unit includes:
a first acquiring subunit, configured to acquire a total capacity and a used capacity of each node;
the real-time acquisition subunit is used for acquiring the data volume sent to each node in real time;
a calculating subunit, configured to calculate a capacity usage rate of the node according to the total capacity, the used capacity, and the data amount, where the calculation formula is:
S=(X a +X b )/X c ;
wherein, S represents the total capacity,X a indicating that the capacity has been used and,X b represents the amount of data;
the first value marking unit is used for sequentially marking a first weight value for each node according to the capacity utilization rates of the nodes and a preset rule, wherein the higher the capacity utilization rate is, the lower the first weight value corresponding to the node is;
the second acquiring subunit is used for acquiring the average consumed time of the plurality of nodes;
the third acquiring subunit is configured to send the same blank file to the multiple nodes, and acquire first time consumption for the multiple nodes to store the blank file;
A calculating subunit, configured to calculate unit storage time consumptions of the plurality of nodes according to the average time consumption, the first time consumption, and a total capacity of the node, where the calculation formula is:
T d =(T e -T f )/X c ;
wherein, theT d Represents a unit storage elapsed time, saidT e Represents a first elapsed time, saidT f Represents the average elapsed time;
and the second value marking unit is used for sequentially marking the second weight value of each node according to the unit storage time consumption of the plurality of nodes and a preset rule, wherein the higher the unit storage time consumption is, the lower the second weight value corresponding to the node is.
In one embodiment, the second receiving module 4 includes:
the second receiving unit is used for receiving a download request instruction sent by the vehicle diagnosis equipment and analyzing the download request instruction to obtain download demand information and an IP address of the vehicle diagnosis equipment;
a fifth obtaining unit, configured to obtain a node corresponding to the download demand information according to the download demand information, where storage information corresponding to the download demand is stored in the node;
and the association unit is used for associating the information of the node on the IP address to obtain the address of the vehicle diagnosis equipment comprising the node information.
In one embodiment, the distributed file storing and downloading apparatus further includes:
a sixth obtaining unit, configured to obtain a download path of the vehicle diagnostic apparatus according to the address;
a seventh obtaining unit, configured to obtain, according to the download path, a storable capacity corresponding to the download path;
the first judging unit is used for judging whether the storable capacity meets a first preset capacity or not;
the confirmation downloading unit is used for sending a confirmation downloading instruction to the vehicle diagnosis equipment if the storable capacity meets a first preset capacity;
a second determination unit, configured to, if the storable capacity does not satisfy a first preset capacity, obtain an overall storage capacity of the vehicle diagnostic apparatus, and determine whether the overall storage capacity satisfies a second preset capacity;
and the combined downloading unit is used for sending a combined downloading instruction to the vehicle diagnosis equipment if the integral storage capacity meets a second preset capacity.
In one embodiment, the lookup module 5 includes:
an eighth obtaining unit, configured to obtain a second address of each node in the cloud server;
a first distance calculating unit, configured to calculate a first distance between the vehicle diagnostic apparatus and each of the nodes according to the address of the vehicle diagnostic apparatus and the second address of each of the nodes, so as to obtain a plurality of first distance values;
The first node unit is used for selecting a first distance value as a standard distance value, screening out nodes corresponding to the first distance value smaller than the standard distance value and marking the nodes as first nodes to obtain a set of the first nodes;
a ninth acquiring unit, configured to acquire network states of a plurality of the first nodes;
the second judging unit is used for judging whether the network state of each first node meets a preset network state or not;
the second node unit is used for marking the first node as a second node if the network state of the first node meets a preset network state, so as to obtain a plurality of second nodes meeting the preset network state;
and the tenth acquisition unit is used for acquiring a second address corresponding to the second node and the address of the vehicle diagnosis equipment, searching the second node closest to the address of the vehicle diagnosis equipment based on an edge calculation mode according to the second address and the address, and taking the second node as a download node.
As shown in fig. 3, the present application also provides a computer device, which may be a server, and the internal structure of which may be as shown in fig. 3. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the computer designed processor is used to provide computational and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store all the data required by the process of the distributed file storage and download method. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program when executed by a processor implements a distributed file storage and download method.
It will be understood by those skilled in the art that the structure shown in fig. 3 is only a block diagram of a part of the structure related to the present application, and does not constitute a limitation to the computer device to which the present application is applied.
An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the computer program implements any one of the above-mentioned distributed file storage and downloading methods.
It will be understood by those skilled in the art that all or part of the processes of the methods of the above embodiments may be implemented by hardware associated with instructions of a computer program, which may be stored on a non-volatile computer-readable storage medium, and when executed, may include processes of the above embodiments of the methods. Any reference to memory, storage, database or other medium provided herein and used in the examples may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), double-rate SDRAM (SSRSDRAM), Enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, apparatus, article or method that comprises the element.
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application, or which are directly or indirectly applied to other related technical fields, are also included in the scope of the present application.
Claims (9)
1. A distributed file storage and download method is applied to a cloud server and is characterized by comprising the following steps:
receiving vehicle diagnostic data;
analyzing and encrypting the vehicle diagnosis data to obtain metadata and file data;
The metadata are stored in a centralized mode, and the file data are stored in a scattered mode, wherein the metadata and the file data are stored on a plurality of nodes in a cloud server respectively;
receiving a request downloading instruction sent by vehicle diagnosis equipment, and acquiring an address of the vehicle diagnosis equipment according to the request downloading instruction;
according to the address of the vehicle diagnosis equipment, searching a node closest to the address of the vehicle diagnosis equipment as a downloading node based on an edge calculation mode;
sending the file data and/or the metadata stored on the downloading node to the vehicle diagnosis equipment to complete downloading of the file data;
the step of analyzing and encrypting the vehicle diagnosis data to obtain metadata and file data includes:
classifying the vehicle diagnosis data according to parameter types to obtain vehicle type data, fault diagnosis data and maintenance data;
respectively carrying out calculation analysis on the vehicle model data, the fault diagnosis data and the maintenance data based on preset keywords to obtain vehicle model outline data, fault diagnosis outline data and maintenance outline data;
acquiring a first encryption key;
Sending the first encryption key to a plurality of nodes of a cloud server, wherein each node is provided with a random number, and the plurality of nodes generate a plurality of different second encryption keys according to the random number and the first encryption key;
receiving a plurality of second encryption keys and encrypting the vehicle type data, the fault diagnosis data and the maintenance data according to the second encryption keys respectively;
acquiring a third encryption key, and encrypting the vehicle model outline data, the fault diagnosis outline data and the maintenance outline data according to the third encryption key;
acquiring a plurality of encrypted blank data, and naming a plurality of blank data, wherein the file naming comprises: first vehicle type data, first fault diagnosis data and first maintenance data;
binding the first vehicle model data, the vehicle model data and vehicle model outline data respectively, binding first fault diagnosis data, fault diagnosis data and fault diagnosis outline data, and binding first maintenance data, maintenance data and maintenance outline data to obtain a vehicle data set and a fault diagnosis data set;
marking the vehicle dataset, the fault diagnosis dataset, the maintenance dataset as file data;
And calculating the second encryption key and the third encryption key based on an SHA-2 algorithm to obtain metadata.
2. The distributed file storage and download method as claimed in claim 1, wherein the step of centrally storing the metadata and the step of dispersedly storing the file data comprises:
acquiring the capacity utilization rates and the storage consumption time of a plurality of nodes, performing first weight value marking on the capacity utilization rate acquired each time, and performing second weight value marking on the storage consumption time acquired each time;
calculating the use performance values of the nodes according to the first weight value and the second weight value to obtain a plurality of use performance values;
sequencing the plurality of use performance values in sequence from big to small, and calculating the total number of the use performance values;
selecting a node corresponding to at least one service performance value as a standard node according to the total number and the service performance values and preset conditions;
dividing a plurality of nodes according to the standard nodes to obtain a plurality of storage node intervals, wherein the plurality of storage node intervals comprise a priority storage node interval and a plurality of secondary storage node intervals;
And intensively storing the metadata on the nodes of the priority storage node intervals, and storing the file data on the nodes of the secondary storage node intervals.
3. The distributed file storing and downloading method according to claim 2, wherein the step of obtaining the capacity utilization rates and the storage consumption times of the plurality of nodes, performing a first weight value scaling on each obtained capacity utilization rate, and performing a second weight value scaling on each obtained storage consumption time comprises:
acquiring the total capacity and the used capacity of each node;
acquiring the data volume sent to each node in real time;
calculating the capacity utilization rate of the node according to the total capacity, the used capacity and the data volume, wherein the calculation formula is as follows:
S=(X a +X b )/X c ;
wherein, S represents the total capacity,X a indicating that the capacity has been used and,X b represents the amount of data;
sequentially carrying out first weight value marking on each node according to the capacity utilization rate of a plurality of nodes and a preset rule, wherein the higher the capacity utilization rate is, the lower the first weight value corresponding to the node is;
acquiring average time consumption of a plurality of nodes;
sending the same blank file to a plurality of nodes, and acquiring first time consumption for the plurality of nodes to store the blank file;
Calculating unit storage time consumption of a plurality of nodes according to the average time consumption, the first time consumption and the total capacity of the nodes, wherein the calculation formula is as follows:
T d =(T e -T f )/X c ;
wherein, theT d Represents a unit storage elapsed time, saidT e Represents a first elapsed time, saidT f Represents the average elapsed time;
and sequentially carrying out second weight value marking on each node according to the unit storage time consumption of the plurality of nodes and a preset rule, wherein the higher the unit storage time consumption is, the lower the second weight value corresponding to the node is.
4. The distributed file storage and download method according to claim 1, wherein the step of receiving a download request instruction sent by the vehicle diagnostic device and obtaining an address of the vehicle diagnostic device according to the download request instruction comprises:
receiving a download request instruction sent by vehicle diagnosis equipment, and analyzing the download request instruction to obtain download demand information and an IP address of the vehicle diagnosis equipment;
acquiring a node corresponding to the downloading demand information according to the downloading demand information, wherein the node stores storage information corresponding to the downloading demand;
and associating the information of the node on the IP address to obtain the address of the vehicle diagnosis equipment comprising the node information.
5. The distributed file storage and download method according to claim 1, wherein after the step of receiving a download request command sent by the vehicle diagnostic device and obtaining an address of the vehicle diagnostic device according to the download request command, the method further comprises:
acquiring a download path of the vehicle diagnosis equipment according to the address;
acquiring the storable capacity corresponding to the download path according to the download path;
judging whether the storable capacity meets a first preset capacity or not;
if the storable capacity meets a first preset capacity, sending a download confirmation instruction to the vehicle diagnosis equipment;
if the storable capacity does not meet the first preset capacity, acquiring the whole storage capacity of the vehicle diagnosis equipment, and judging whether the whole storage capacity meets a second preset capacity or not;
and if the overall storage capacity meets a second preset capacity, sending a combined downloading instruction to the vehicle diagnosis equipment.
6. The distributed file storage and download method according to claim 1, wherein the step of searching for a node closest to the address of the vehicle diagnostic device based on an edge calculation method as a download node according to the address of the vehicle diagnostic device comprises:
Acquiring a second address of each node in the cloud server;
calculating a first distance between the vehicle diagnosis device and each node according to the address of the vehicle diagnosis device and the second address of each node to obtain a plurality of first distance values;
selecting a first distance value as a standard distance value, screening out nodes corresponding to the first distance value smaller than the standard distance value and marking the nodes as first nodes to obtain a first node set;
acquiring network states of a plurality of first nodes;
judging whether the network state of each first node meets a preset network state or not;
if the network state of the first node meets a preset network state, marking the first node as a second node to obtain a plurality of second nodes meeting the preset network state;
and acquiring a second address corresponding to the second node and the address of the vehicle diagnosis equipment, searching a second node closest to the address of the vehicle diagnosis equipment based on an edge calculation mode according to the second address and the address, and taking the second node as a downloading node.
7. A distributed file storage and download apparatus, comprising:
A first receiving module for receiving vehicle diagnostic data;
the encryption module is used for analyzing and encrypting the vehicle diagnosis data to obtain metadata and file data;
the storage module is used for performing centralized storage on the metadata and performing dispersed storage on the file data, wherein the metadata and the file data are respectively stored on a plurality of nodes in a cloud server;
the second receiving module is used for receiving a download request instruction sent by the vehicle diagnosis equipment and acquiring the address of the vehicle diagnosis equipment according to the download request instruction;
the searching module is used for searching a node closest to the address of the vehicle diagnosis equipment as a downloading node based on an edge calculation mode according to the address of the vehicle diagnosis equipment;
the downloading module is used for sending the file data and/or the metadata stored on the downloading node to the vehicle diagnosis equipment so as to finish downloading of the file data;
wherein, the encryption module includes:
the classification unit is used for classifying the vehicle diagnosis data according to parameter types to obtain vehicle type data, fault diagnosis data and maintenance data;
the analysis unit is used for performing calculation analysis on the vehicle model data, the fault diagnosis data and the maintenance data based on preset keywords respectively to obtain vehicle model outline data, fault diagnosis outline data and maintenance outline data;
A first acquisition unit configured to acquire a first encryption key;
the cloud server comprises a first sending unit, a second sending unit and a first processing unit, wherein the first sending unit is used for sending the first encryption key to a plurality of nodes of the cloud server, each node is provided with a random number, and the plurality of nodes generate a plurality of different second encryption keys according to the random number and the first encryption key;
the first receiving unit is used for receiving a plurality of second encryption keys and encrypting the vehicle type data, the fault diagnosis data and the maintenance data according to the second encryption keys;
a second obtaining unit, configured to obtain a third encryption key, and encrypt the vehicle model outline data, the fault diagnosis outline data, and the maintenance outline data according to the third encryption key, respectively;
a third obtaining unit, configured to obtain multiple encrypted blank data, and perform file naming on the plurality of blank data, where the file naming includes: first vehicle type data, first fault diagnosis data and first maintenance data;
the binding unit is used for binding the first vehicle type data, the vehicle type data and the vehicle type outline data respectively, binding the first fault diagnosis data, the fault diagnosis data and the fault diagnosis outline data, and binding the first maintenance data, the maintenance data and the maintenance outline data to obtain a vehicle data set and a fault diagnosis data set;
A labeling unit for labeling the vehicle data set, the failure diagnosis data set, and the maintenance data set as file data;
and the operation unit is used for performing operation on the second encryption key and the third encryption key based on an SHA-2 algorithm to obtain metadata.
8. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor when executing the computer program implements the steps of the distributed file storage and download method of any of claims 1 to 6.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the distributed file storage and download method according to any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210362528.8A CN114443608B (en) | 2022-04-07 | 2022-04-07 | Distributed file storage and download method, device, equipment and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210362528.8A CN114443608B (en) | 2022-04-07 | 2022-04-07 | Distributed file storage and download method, device, equipment and medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114443608A CN114443608A (en) | 2022-05-06 |
CN114443608B true CN114443608B (en) | 2022-07-29 |
Family
ID=81359400
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210362528.8A Active CN114443608B (en) | 2022-04-07 | 2022-04-07 | Distributed file storage and download method, device, equipment and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114443608B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117708202A (en) * | 2024-01-09 | 2024-03-15 | 南京雄风清角劲大数据有限公司 | Cloud database service system |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2021088278A1 (en) * | 2019-11-04 | 2021-05-14 | 北京海益同展信息科技有限公司 | File storage method, terminal, and storage medium |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8315999B2 (en) * | 2007-08-29 | 2012-11-20 | Nirvanix, Inc. | Policy-based file management for a storage delivery network |
CN107528865B (en) * | 2016-06-21 | 2020-07-28 | 平安科技(深圳)有限公司 | File downloading method and system |
CN113535648B (en) * | 2021-07-27 | 2024-09-03 | 浪潮卓数大数据产业发展有限公司 | IPFS-based distributed cloud storage method, IPFS-based distributed cloud storage equipment and storage medium |
CN114043994B (en) * | 2021-11-17 | 2024-06-04 | 国汽智控(北京)科技有限公司 | Vehicle fault processing method, device, equipment and storage medium |
-
2022
- 2022-04-07 CN CN202210362528.8A patent/CN114443608B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2021088278A1 (en) * | 2019-11-04 | 2021-05-14 | 北京海益同展信息科技有限公司 | File storage method, terminal, and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN114443608A (en) | 2022-05-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109474578B (en) | Message checking method, device, computer equipment and storage medium | |
CN108512854B (en) | System information safety monitoring method and device, computer equipment and storage medium | |
CN111639363B (en) | Data analysis method based on block chain and edge computing server | |
EP3529710B1 (en) | System and method for controlling access to encrypted vehicular data | |
CN110224855B (en) | Registration method and device of micro service instance, computer equipment and storage medium | |
CN110555779A (en) | data processing method, data processing device, computer equipment and storage medium | |
CN110727949B (en) | Data storage method and device, computer equipment and storage medium | |
CN110717156B (en) | Identity authentication method, system, computer device and storage medium | |
CN114443608B (en) | Distributed file storage and download method, device, equipment and medium | |
CN110569389A (en) | Environment monitoring method and device, computer equipment and storage medium | |
US10805305B2 (en) | Detection of operational threats using artificial intelligence | |
CN114389874B (en) | Response method and device for cloud application service, server and storage medium | |
CN111858611B (en) | Data access method, device, computer equipment and storage medium | |
CN111506710A (en) | Information sending method and device based on rumor prediction model and computer equipment | |
CN112035437A (en) | Method and device for transmitting medical record data, computer equipment and storage medium | |
CN112714172A (en) | Data synchronization method and device based on block chain technology and computer equipment | |
CN113051605A (en) | Individual privacy information use management system and method based on block chain | |
CN112087335A (en) | Flow experiment method, device and storage medium | |
CN111382976A (en) | Early warning data processing method and device, computer equipment and storage medium | |
CN112685502A (en) | Data acquisition method, device, equipment and storage medium based on Internet of things | |
CN110648052B (en) | Wind control decision method and device, computer equipment and storage medium | |
CN116723002B (en) | Intelligent encryption method for power report based on situation awareness | |
CN113312481B (en) | Text classification method, device, equipment and storage medium based on blockchain | |
CN115225636A (en) | Request processing method and device, computer equipment and storage medium | |
CN113849139A (en) | Consumable management method and system and printing device |
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 | ||
CB02 | Change of applicant information | ||
CB02 | Change of applicant information |
Address after: 518000 2606, building 4, phase II, Tian'an Yungu Industrial Park, Gangtou community, Bantian street, Longgang District, Shenzhen, Guangdong Applicant after: Shenzhen xingka Technology Co.,Ltd. Address before: 518000 2606, building 4, phase II, Tian'an Yungu Industrial Park, Gangtou community, Bantian street, Longgang District, Shenzhen, Guangdong Applicant before: Shenzhen Star Card Technology Co.,Ltd. |
|
GR01 | Patent grant | ||
GR01 | Patent grant |