CN117294752A - Configuration file synchronization method and device - Google Patents

Configuration file synchronization method and device Download PDF

Info

Publication number
CN117294752A
CN117294752A CN202311279000.5A CN202311279000A CN117294752A CN 117294752 A CN117294752 A CN 117294752A CN 202311279000 A CN202311279000 A CN 202311279000A CN 117294752 A CN117294752 A CN 117294752A
Authority
CN
China
Prior art keywords
file
server
configuration file
clients
download
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.)
Pending
Application number
CN202311279000.5A
Other languages
Chinese (zh)
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.)
Dawning Information Industry Beijing Co Ltd
Dawning Information Industry Co Ltd
Original Assignee
Dawning Information Industry Beijing Co Ltd
Dawning Information Industry 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 Dawning Information Industry Beijing Co Ltd, Dawning Information Industry Co Ltd filed Critical Dawning Information Industry Beijing Co Ltd
Priority to CN202311279000.5A priority Critical patent/CN117294752A/en
Publication of CN117294752A publication Critical patent/CN117294752A/en
Pending legal-status Critical Current

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/2866Architectures; Arrangements
    • H04L67/30Profiles
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes

Landscapes

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

Abstract

The application relates to a configuration file synchronization method and device. The method comprises the following steps: responding to a configuration file downloading notification sent by a server side, and acquiring a seed file of the configuration file from the server side; the seed file is a shared file of a peer-to-peer network formed by the server and a plurality of clients; acquiring a download list of the configuration file from the server according to the seed file; the download list comprises download records of configuration files from other clients except the target client in the plurality of clients; and acquiring configuration files from other clients according to the download list. According to the method, the peer-to-peer network technology and the seed file are introduced, so that each client obtains the configuration file from other clients according to the seed file through the peer-to-peer network technology, namely, each client does not need to obtain the configuration file from the server, but obtains the configuration file from other clients, and the pressure of synchronizing the configuration file by the server is relieved.

Description

Configuration file synchronization method and device
Technical Field
The present disclosure relates to the technical field of peer-to-peer networks, and in particular, to a method and an apparatus for synchronizing configuration files.
Background
A configuration file is a computer file that can configure parameters and initial settings for some computer programs, and in a system, the configuration file will always affect the functioning and results of the system.
In the related art, a configuration file is usually stored in a client, and since the content of the configuration file is changed from time to time, once the content of the configuration file is changed, the server is required to synchronize the changed configuration file to the client.
However, in the related art, when the server synchronizes the configuration file to the client, there is a technical problem that the synchronization pressure of the server is high.
Disclosure of Invention
Based on this, it is necessary to provide a method and an apparatus for synchronizing configuration files according to the above technical problems, by introducing peer-to-peer network technology and seed files, so that each client obtains the configuration files from other clients according to the seed files through peer-to-peer network technology, thereby reducing the pressure of synchronizing the configuration files by the server.
In a first aspect, an embodiment of the present application provides a method for synchronizing configuration files. Applied to any one of a plurality of clients, the method comprising:
responding to a configuration file downloading notification sent by a server side, and acquiring a seed file of the configuration file from the server side; the seed file is a shared file of a peer-to-peer network formed by the server and a plurality of clients;
acquiring a download list of the configuration file from the server according to the seed file; the download list comprises download records of configuration files from other clients except the target client in the plurality of clients;
And acquiring configuration files from other clients according to the download list.
According to the technical scheme, the seed file of the configuration file is acquired from the server side by responding to the configuration file downloading notification sent by the server side, the seed file is a shared file of a peer-to-peer network formed by the server side and the plurality of clients, further, a downloading list of the configuration file is acquired from the server side according to the seed file, the downloading list comprises downloading records of the configuration file by other clients except the target client side in the plurality of clients, and finally, the configuration file is acquired from the other clients according to the downloading list. According to the method, the server and the clients form the peer-to-peer network, so that each client can directly communicate with each other, and each client can acquire the configuration file from other clients according to the seed file issued by the server through the peer-to-peer network technology, namely, each client does not need to acquire the configuration file from the server, but acquires the configuration file from other clients, and the pressure of synchronizing the configuration file by the server is relieved.
In one embodiment, the server includes an application server, and the configuration file download notification is sent by the application server; before acquiring the seed file of the configuration file from the server, the method further comprises the following steps:
Feeding back a download agent without a configuration file to an application server;
if receiving the download agent of the configuration file issued by the application server, feeding back the download agent with the configuration file to the application server;
and starting the download agent of the configuration file according to the start notification of the download agent issued by the application server.
In the technical scheme of the embodiment of the application, since the client has no download tool capable of downloading the configuration file, the application server downloads the download agent of the configuration file to the client, so that the client can perform the download operation of the configuration file by starting the download agent.
In one embodiment, the server includes a file server, the configuration file download notification includes address information of the file server, and before acquiring the seed file of the configuration file from the server, the method further includes:
sending a configuration file detection request to a file server according to the address information of the file server;
receiving configuration file information fed back by a file server;
in case there is a difference between the profile information and the pre-stored local profile, the step of obtaining a seed file of the profile is performed.
In the technical scheme of the embodiment of the application, whether the local configuration file is different from the configuration file on the server is verified through the ETag protocol, if the local configuration file is not different from the configuration file on the server, the client does not need to update the configuration file any more, the transmission data volume of the network is reduced, and the network bandwidth pressure of the server is reduced.
In one embodiment, obtaining a seed file of a configuration file from a server includes:
sending an acquisition request of a seed file to a file server; the file name of the configuration file is included in the acquisition request;
and receiving a seed file of the configuration file fed back by the file server according to the file name.
According to the technical scheme, the seed file of the configuration file is obtained from the file server by introducing the file name of the configuration file, so that an optional mode is provided for quickly obtaining the seed file.
In one embodiment, the server side comprises a tracking server, and the seed file comprises address information of the tracking server; according to the seed file, obtaining a download list of the configuration file from the server side, including:
sending a list acquisition request to the tracking server according to the address information of the tracking server; the tracking server represents a server for realizing direct transmission of configuration files among a plurality of clients;
And receiving a download list of the configuration file sent by the tracking server.
In the technical scheme of the embodiment of the application, an optional mode for acquiring a download list of a configuration file is provided; the download manifest needed to download the configuration file from other clients can be obtained through the information about the tracking server included in the seed file.
In one embodiment, the configuration file includes a plurality of block files, the download list includes a download record of each block file by other clients, and the configuration file is obtained from the other clients according to the download list, including:
acquiring at least one target block file to be downloaded in a configuration file;
determining other clients corresponding to each target block file according to the download list of each target block file and other clients for each block file;
a block file acquisition request is respectively sent to other clients corresponding to each target block file;
and receiving the target block files returned by other clients corresponding to the target block files.
According to the technical scheme, the configuration files are acquired from the plurality of other clients, so that the network pressure of the server is reduced, and the downloading speed of the configuration files is increased by using a plurality of nodes in the peer-to-peer network as seeds of the configuration files.
In one embodiment, the server includes a tracking server, where address information of the file server is stored, and the method further includes:
under the condition that all target block files do not exist in other clients, sending an acquisition request of address information of a file server to a tracking server;
receiving address information of a file server fed back by a tracking server;
and acquiring each target block file from the file server according to the address information of the file server.
In the technical scheme of the embodiment of the application, the file server is used as a node capable of downloading all the partitioned files of the configuration file, so that the effect that the configuration file can be obtained from the file server is achieved under the condition that no configuration file exists in other clients.
In a second aspect, an embodiment of the present application provides a method for synchronizing a configuration file. The method is applied to the server, and comprises the following steps:
respectively sending a configuration file downloading notification to a plurality of clients to instruct each client to acquire a seed file of the configuration file; the seed file is a shared file of a peer-to-peer network formed by the server and each client;
receiving a downloading request sent by each client according to the seed file; the downloading request is used for acquiring a downloading list of the configuration file; the download list comprises a download record of each client to the configuration file;
And downloading a download list to each client to instruct each client to acquire the configuration files from other clients.
According to the technical scheme, the server side sends the configuration file downloading notification to the clients to instruct the clients to acquire the seed files of the configuration files, the seed files are shared files of a peer-to-peer network formed by the server side and the clients, further, the clients receive downloading requests sent by the clients according to the seed files, the downloading requests are used for acquiring downloading lists of the configuration files, the downloading lists comprise downloading records of each client in the clients on the configuration files, and finally the downloading lists are issued to the clients to instruct the clients to acquire the configuration files from other clients according to the downloading lists. According to the method, the peer-to-peer network technology and the seed file are introduced, so that each client side obtains the configuration file from other client sides according to the seed file, and the network pressure of the server side is greatly reduced.
In one embodiment, the server includes an application server, a file server, and a tracking server, and before sending the configuration file download notification to the plurality of clients, the method further includes:
The application server uploads the seed file to the file server and notifies the tracking server to start a downloading channel of the configuration file; the download channel represents a management channel for transmitting configuration files in the peer-to-peer network.
In the technical scheme of the embodiment of the application, before the server side sends the configuration file downloading notification to the plurality of client sides respectively, the tracking server is notified to start the downloading channel of the configuration file, so that the client sides directly communicate with each other through a peer-to-peer network, and the configuration file is directly transmitted between the client sides.
In a third aspect, an embodiment of the present application further provides a configuration file synchronization device. Configured in any one of a plurality of clients, the apparatus includes:
the seed file acquisition module is used for responding to the configuration file downloading notification sent by the server and acquiring a seed file of the configuration file from the server; the seed file is a shared file of a peer-to-peer network formed by the server and a plurality of clients;
the download list acquisition module is used for acquiring a download list of the configuration file from the server according to the seed file; the download list comprises download records of configuration files from other clients except the target client in the plurality of clients;
And the configuration file acquisition module is used for acquiring configuration files from other clients according to the download list.
In a fourth aspect, an embodiment of the present application further provides a configuration file synchronization device. Configured in a server, the apparatus includes:
the notification sending module is used for respectively sending configuration file downloading notifications to a plurality of clients so as to instruct each client to acquire seed files of the configuration files; the seed file is a shared file of a peer-to-peer network formed by the server and each client;
the request receiving module is used for receiving a downloading request sent by each client according to the seed file; the downloading request is used for acquiring a downloading list of the configuration file; the download list comprises a download record of each client to the configuration file;
and the list sending module is used for sending a download list to each client so as to instruct each client to acquire the configuration file from other clients.
In a fifth aspect, embodiments of the present application also provide a computer device. The computer device comprises a memory storing a computer program and a processor implementing the steps of any of the embodiments of the first aspect described above when the processor executes the computer program.
In a sixth aspect, embodiments of the present application also provide a computer-readable storage medium. A computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of any of the embodiments of the first aspect described above.
In a seventh aspect, embodiments of the present application also provide a computer program product. A computer program product comprising a computer program which when executed by a processor performs the steps of any of the embodiments of the first aspect described above.
According to the configuration file synchronization method and device, the seed file of the configuration file is acquired from the server side by responding to the configuration file downloading notification sent by the server side, the seed file is the shared file of the peer-to-peer network formed by the server side and the plurality of clients, further, a downloading list of the configuration file is acquired from the server side according to the seed file, the downloading list comprises downloading records of the configuration file by other clients except the target client side in the plurality of clients, and finally, the configuration file is acquired from the other clients according to the downloading list. The server and the clients form a peer-to-peer network, so that each client can directly communicate with each other, and each client can acquire the configuration files from other clients according to the seed files issued by the server through the peer-to-peer network technology, namely, each client does not need to acquire the configuration files from the server, but acquires the configuration files from other clients, thereby reducing the pressure of synchronizing the configuration files of the server.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the related art, the drawings that are required to be used in the embodiments or the related technical descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to the drawings without inventive effort for a person having ordinary skill in the art.
FIG. 1 is an application environment diagram of a profile synchronization method in one embodiment;
FIG. 2 is a flow diagram of a method of profile synchronization in one embodiment;
FIG. 3 is a flow diagram of a download agent installed in one embodiment;
FIG. 4 is a flow diagram of validating a local profile in one embodiment;
FIG. 5 is a flow diagram of a seed file for acquiring a configuration file in one embodiment;
FIG. 6 is a flow chart of a method for obtaining a download manifest of a configuration file according to one embodiment;
FIG. 7 is a flow diagram of a configuration file obtained from another client in one embodiment;
FIG. 8 is a flow diagram of a configuration file obtained from a file server in one embodiment;
FIG. 9 is a flow chart of verifying whether a configuration file is downloaded accurately in one embodiment;
FIG. 10 is a flow chart of a method for synchronizing configuration files according to another embodiment;
FIG. 11 is a flow diagram of generating a seed file in one embodiment;
FIG. 12a is a flowchart of another embodiment of a method for synchronizing configuration files;
FIG. 12b is a timing diagram of a method of profile synchronization in one embodiment;
FIG. 13 is a schematic diagram of a configuration file synchronization device in one embodiment;
FIG. 14 is a schematic diagram of another embodiment of a configuration file synchronization device;
FIG. 15 is an internal block diagram of a computer device in one embodiment;
fig. 16 is an internal structural view of a computer device in another embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
The configuration file synchronization method provided by the embodiment of the application can be applied to an application environment shown in fig. 1, and can be realized by matching a server side with a plurality of clients with configuration file synchronization requirements. Wherein the client 102 communicates with the server 104 via a network. The data storage system may store data that the server 104 needs to process. The data storage system may be integrated on the server 104 or may be located on a cloud or other network server. Alternatively, only two clients 102 are shown in fig. 1, and in a practical scenario, there may be a plurality of clients 102, and each client 102 may directly communicate with the other client via a peer-to-peer network. The terminal 102 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and the like. The server 104 may be implemented as a stand-alone server or as a server cluster of multiple servers.
In an exemplary embodiment, as shown in fig. 2, a method for synchronizing a configuration file is provided, which may be performed by a target client, that is, any client 102 of a plurality of clients, including the following steps 201 to 203. Wherein:
s201, responding to a configuration file downloading notification sent by a server, and acquiring a seed file of the configuration file from the server.
In the embodiment of the application, the seed file is a shared file of a peer-to-peer network formed by the server and a plurality of clients.
The peer-to-peer network is essentially different from the client/server architecture that is currently dominant in the network, i.e., there is no central node (or central server) in the overall network architecture; participants (nodes) in the network share a portion of the owned resources that can be directly accessed by other peer nodes in the network without going through an intermediate entity. Based on the characteristic of the peer-to-peer network, the peer-to-peer network formed in the application can realize direct transmission of the configuration file between the client and the client, and can realize that the target client obtains the configuration file from other clients.
In practical applications, when a peer-to-peer network technology is used to download a file, it is necessary to know which nodes in the peer-to-peer network include the file, and then the seed file is used. Typically, the seed file includes two parts of content, tracking server address and file information, respectively; the tracking server is a server for realizing direct transmission of a file among a plurality of nodes, and the file information generally comprises a plurality of block files of the file, a block file verification code of each block file and the like.
For example, the server may send a profile download notification to each client after preparing the seed file of the profile; for each client, after receiving the configuration file downloading notification sent by the server, the client may acquire the seed file of the configuration file from the server, for example, may send a seed file acquisition request of the configuration file to the server, and after receiving the seed file acquisition request, the server may send the seed file of the configuration file to the client.
S202, acquiring a download list of the configuration file from the server according to the seed file.
In the embodiment of the present application, the download manifest includes download records of configuration files by other clients than the target client among the plurality of clients. Since the target client refers to any one of the clients, any one of the clients may be another client of another client, it may be understood that the download record of the configuration file by the target client may also be included in the download manifest.
The tracking server is configured with a tracking function, i.e. how many nodes can be tracked and the same file is downloaded at the same time, can record information such as internet protocol (IP, internet Protocol) address and port of each node, and provides a node list for other nodes to acquire files from each node in the node list. The node here means each node in the peer-to-peer network, that is, the above-mentioned multiple clients, or may be any one server in the server.
For example, if the seed file includes the address of the tracking server, the target client may first obtain the address of the tracking server from the seed file, and then send a manifest obtaining request to the tracking server according to the address, so as to obtain the download manifest of the configuration file.
And S203, acquiring configuration files from other clients according to the download list.
Optionally, the download list further includes location information of other clients that have downloaded the configuration file, such as IP address and port information.
In addition, the server and the clients form a peer-to-peer network, and resources can be shared among all participants in the peer-to-peer network, namely, configuration files can be directly transmitted between the clients in the application, and further, the target client can directly acquire the configuration files from other clients.
Based on this, the target client may first obtain the location information of each other client according to the download manifest, and then send a configuration file obtaining request to each other client according to each location information, so as to obtain the configuration file from the other clients.
According to the configuration file synchronization method, the seed file of the configuration file is acquired from the server side by responding to the configuration file downloading notification sent by the server side, the seed file is a shared file of a peer-to-peer network formed by the server side and the plurality of clients, further, a downloading list of the configuration file is acquired from the server side according to the seed file, the downloading list comprises downloading records of the configuration file by other clients except the target client side in the plurality of clients, and finally, the configuration file is acquired from the other clients according to the downloading list. According to the method, the server and the clients form the peer-to-peer network, so that each client can directly communicate with each other, and each client can acquire the configuration file from other clients according to the seed file issued by the server through the peer-to-peer network technology, namely, each client does not need to acquire the configuration file from the server, but acquires the configuration file from other clients, and the pressure of synchronizing the configuration file by the server is relieved.
And downloading configuration files among all clients by adopting a peer-to-peer network technology, wherein the downloading of the configuration files is required to be carried out through an agent on the client. In some scenarios, when the client downloads the configuration file directly from other clients, it does not have a downloading tool that can download the configuration file, and in this case, a downloading agent needs to be installed in the client to implement the downloading function of the client. Based on this, in one exemplary embodiment, an alternative way of installing a download agent is provided. As shown in fig. 3, steps 301 to 303 may be included before the seed file of the configuration file is obtained from the server side. Wherein:
s301, feeding back a download agent without a configuration file to an application server.
In this embodiment of the present application, the server includes an application server, and the application server may send a configuration file download notification to the client, and may further schedule a download agent of the configuration file of the client, and when the client needs, send the download agent of the configuration file to the client.
Before acquiring a seed file of a configuration file from a server, determining whether a download agent exists in a target client; if there is no download agent, the target client may feed back to the application server the download agent for which no configuration file exists.
S302, if the download agent of the configuration file issued by the application server is received, the download agent with the configuration file is fed back to the application server.
After receiving the download agent of the configuration file fed back by the target client, the application server downloads the download agent of the configuration file to the target client. It should be noted that, here, the download agent that the application server issues the configuration file to the target client may be directly copying the download agent of the configuration file to the target client.
If the target client receives the download agent of the configuration file issued by the application server, the download agent of the configuration file already existing needs to be fed back to the application server.
S303, according to the starting notice of the download agent issued by the application server, starting the download agent of the configuration file.
When the application server receives the download agent with the configuration file fed back by the target client, the application server sends a start notification of the download agent to the target client so that the target client starts the download agent with the configuration file to perform the download operation of the configuration file. And the client starts the download agent of the configuration file according to the start notice of the download agent issued by the application server so as to perform the subsequent download operation of the configuration file.
It should be noted that, the download agent is a program allowed only in the process of updating the configuration file, and the configuration file will exit from the memory of the client after updating, so that the download agent is green software for the client, and will not affect the system performance of the client.
In this embodiment of the present application, since there is no download tool capable of downloading the configuration file in the client, the application server downloads the download agent of the configuration file to the client, so that the client may perform the downloading operation of the configuration file by starting the download agent.
When the server synchronizes the configuration file to each client, the configuration files in all the clients are updated, and there may be some cases that the configuration files in some clients do not need to be updated, i.e., the configuration files in some clients are already the latest configuration files and do not need to be updated; at this time, a lot of network bandwidth needs to be consumed, and the pressure of the server is too high, so that the problem needs to be solved by considering the method of the capacity expansion server, if the capacity expansion is not performed, the synchronous configuration file is delayed, and the effect of quick response of the system cannot be realized. Based on this, the present application considers that before the client obtains the seed file of the configuration file, whether the local configuration file has a difference from the configuration file on the server is verified through an Entity Tag (ETag) protocol, and if the difference does not exist, the client does not need to update the configuration file any more. As shown in fig. 4, in one embodiment, before the seed file of the configuration file is obtained from the server, steps 401 to 403 are further included. Wherein:
S401, sending a configuration file detection request to the file server according to the address information of the file server.
In this embodiment of the present application, the server further includes a file server, where a configuration file is stored in the file server.
The configuration file downloading notification comprises address information of the file server, the target client can acquire the address information of the file server after receiving the configuration file downloading notification, and then a configuration file detection request is sent to the file server through an ETag protocol according to the address information of the file server so as to verify whether the difference exists between the local configuration file and the configuration file on the server.
S402, receiving configuration file information fed back by a file server.
In the embodiment of the present application, the configuration file information may be information such as a file identifier or a file verification code.
After receiving the configuration file detection request sent by the target client, the file server sends configuration file information to the target client, and the target client can receive the configuration file information fed back by the file server.
S403, in the case that a difference exists between the configuration file information and the pre-stored local configuration file, executing the step of acquiring the seed file of the configuration file.
After receiving the configuration file information fed back by the file server, the target client can compare the configuration file information with the pre-stored file information of the local configuration file to determine whether the local configuration file is different from the configuration file on the file server; executing the step of acquiring the seed file of the configuration file under the condition that the difference exists between the configuration file information and the pre-stored local configuration file; if there is no difference between the configuration file information and the pre-stored local configuration file, the configuration file does not need to be updated.
In the embodiment of the application, whether the local configuration file is different from the configuration file on the server is verified through the ETag protocol, and if the local configuration file is not different from the configuration file on the server, the client does not need to update the configuration file, so that the transmission data volume of the network is reduced, and the network bandwidth pressure of the server is reduced.
The seed file is also stored in the file server, and when the client acquires the seed file of the configuration file from the server, a request needs to be sent to the file server to acquire the seed file of the configuration file. Based on this, in one embodiment, an alternative way of obtaining a seed file for a configuration file is provided. As shown in fig. 5, a seed file of a configuration file is obtained from a server, which includes steps 501 to 502. Wherein:
S501, sending an acquisition request of the seed file to a file server.
In the embodiment of the present application, the file name of the configuration file is included in the acquisition request.
If a plurality of configuration files and corresponding seed files may be stored in the file server, when the seed files of the configuration files are acquired, the corresponding seed files need to be acquired according to the file information about the configuration files. In this embodiment of the present application, the seed file corresponding to the configuration file may be determined according to the file name of the configuration file, and when an obtaining request of the seed file is sent to the file server, the obtaining request needs to carry the file name of the configuration file, so that the file server screens out the corresponding seed file according to the file name of the configuration file.
S502, receiving a seed file of the configuration file fed back by the file server according to the file name.
After receiving the acquisition request of the seed file, the file server screens seed files corresponding to the file names from a plurality of seed files according to the file names of the configuration files carried in the acquisition request, and then sends the screened seed files of the configuration files to the target client, and the target client can receive the seed files of the configuration files, namely the seed files of the configuration files are successfully acquired.
In the embodiment of the application, the seed file of the configuration file is obtained from the file server by introducing the file name of the configuration file, so that an optional mode is provided for quickly obtaining the seed file.
The download manifest of the configuration file is tracked in real time by a tracking server in the peer-to-peer network, and a request needs to be sent to the tracking server in the client when it is acquired. Based on this, in one embodiment, an alternative way of obtaining a download manifest for a configuration file is provided. As shown in fig. 6, a download manifest of a configuration file is obtained from a server, including steps 601 to 602. Wherein:
s601, according to address information of the tracking server, a list acquisition request is sent to the tracking server.
In this embodiment of the present application, the server further includes a tracking server, where the tracking server represents a server that implements direct transmission of the configuration file between multiple clients. In a practical scenario, when a file is transmitted in each node by constituting a peer-to-peer network, it is necessary to acquire the information of the downloadable file by using the tracking function of the tracking server.
The seed file includes address information of the tracking server, namely, the address information of the tracking server can be resolved from the seed file, and a list acquisition request is sent to the tracking server according to the address information.
S602, receiving a download list of the configuration file sent by the tracking server.
The list acquisition request can carry file information of the configuration file which needs to be acquired by the target client, the tracking server determines a download list according to the file information of the configuration file carried in the list acquisition request after receiving the list acquisition request, and sends the download list of the configuration file to the target client, and then the client receives the download list of the configuration file sent by the tracking server, and then the configuration file can be acquired according to the download list.
In the embodiment of the application, an optional way for acquiring a download list of a configuration file is provided; the download manifest needed to download the configuration file from other clients can be obtained through the information about the tracking server included in the seed file.
The configuration file comprises a plurality of block files, each client acquires each block file in the configuration file in a block mode when acquiring the configuration file, and finally, all block files are combined to form the configuration file. Based on this, in one embodiment, an alternative way of obtaining configuration files from other clients is provided. As shown in fig. 7, the configuration file is obtained from other clients, including steps 701 to 704. Wherein:
S701, at least one target block file to be downloaded in the configuration file is obtained.
In the embodiment of the present application, at least one target blocking file to be downloaded in the configuration file, that is, the blocking file that needs to be acquired by the target client itself.
When each client obtains the configuration file, the partition file to be obtained in each time can be set according to the own requirement, and at least one target partition file to be downloaded in the configuration file is obtained at this time, namely the target partition file preset by the target client is obtained.
S702, determining other clients corresponding to each target block file according to the download list of each target block file and other clients for each block file.
In this embodiment of the present application, the download manifest includes a record of the download of each chunk file by other clients.
According to each target block file, determining which other clients download each target block file from a download list of the configuration file, namely determining other clients corresponding to each target block file; at this time, when determining other clients corresponding to each target block file, for example, each target block file to be downloaded is files 1, 2 and 3, respectively, and client a downloads 1, 2 and 3, client B downloads 1, 2 and 3, and client C downloads 1, then 2 may be downloaded from client a, 3 may be downloaded from client B, and 1 may be downloaded from client C.
S703, sending a block file acquisition request to other clients corresponding to each target block file respectively.
In this embodiment of the present application, the download manifest includes address information of other clients, and after determining other clients corresponding to each target block file, the target client may obtain address information of other clients corresponding to each target block file from the download manifest, and according to each address information, send a block file obtaining request to other clients corresponding to each target block file respectively.
S704, receiving the target block files returned by other clients corresponding to the target block files.
In this embodiment of the present application, the block file obtaining request sent to each other client includes information of a target block file to be obtained from the client, and after each other client receives the block file obtaining request, according to the information of the target block file included in the block file obtaining request, the target block file is sent to the target client, and the target client may receive the target block files returned by other clients corresponding to the target block files.
In the embodiment of the application, the configuration files are acquired from the plurality of other clients, so that the network pressure of the server is reduced, and the downloading speed of the configuration files is increased by using a plurality of nodes in the peer-to-peer network as seeds of the configuration files.
When the configuration files are acquired among the clients, the configuration files are acquired from a plurality of other clients in the form of blocks. When a certain client acquires a block file from other clients, other clients may acquire the block file to be downloaded at the same time, and at this time, the situation that a certain block file is not downloaded in each client exists. Based on this, in one embodiment, an alternative way of obtaining a configuration file from a file server is provided. As shown in fig. 8, steps 801 to 803 may be included. Wherein:
s801, when the target block files are not present in any other client, an acquisition request of the address information of the file server is transmitted to the tracking server.
In the embodiment of the application, the file server stores the configuration file in addition to the seed file of the configuration file; typically, after the user modifies the configuration file in the application server, the configuration file is uploaded to the file server. In addition, address information of the file server is stored in the tracking server; after uploading the configuration file and the seed file to the file server, the application server sends address information of the file server to the tracking server, so that the file server serves as a node capable of downloading all the blocked files of the configuration file.
When the target client acquires the download list of the configuration file from the tracking server, if the download list fed back by the tracking server does not have download records for each target block file in the download list fed back by the tracking server, the target client indicates that each target block file does not exist in the other clients, and at the moment, an acquisition request of address information of the file server is sent to the tracking server, so that the target client can acquire each target block file from the servers storing a plurality of block files of the configuration file.
S802, receiving address information of a file server fed back by a tracking server.
The address information of the file server, which is sent by the target client to the tracking server, may include identification information of the configuration file, for example, a file name of the configuration file, etc., and after the tracking server receives the address information of the file server, which is sent by the target client, the tracking server may screen out the address information of the file server corresponding to the identification information according to the identification information of the configuration file included in the acquisition request, and feed back the address information of the screened file server to the target client.
S803, according to the address information of the file server, each target block file is acquired from the file server.
After the address information of the file server is obtained, the target client can send a target block file obtaining request to the corresponding file server according to the address information of the file server, wherein the target block file obtaining request can comprise file information of each target block file, so that the file server can send each target block file to the target client according to the file information of each target block file.
In the embodiment of the application, the file server is used as a node capable of downloading all the partitioned files of the configuration file, so that the effect that the configuration file can be obtained from the file server is achieved under the condition that no configuration file exists in other clients.
After receiving the target block files returned by other clients corresponding to the target block files, it is also required to determine whether the target block files are accurately downloaded. Based on this, in one embodiment, an alternative way of verifying whether the configuration file is downloaded accurately is provided. As shown in fig. 9, steps 901 to 902 may be included. Wherein:
and S901, verifying the target block files returned by other clients corresponding to the target block files according to the verification codes of the block files.
In the embodiment of the application, the seed file includes a block file verification code of each block file, and the block files acquired from other clients are verified.
After receiving target block files returned by other clients corresponding to each target block file, calculating a target file verification code of the target block file according to any target block file, comparing the target file verification code with the block file verification codes of the target block files included in the seed file, and if the target file verification codes are consistent with the block file verification codes of the target block files, determining that the target block files are accurately acquired.
S902, under the condition that all target block files returned by other clients corresponding to the target block files pass verification, the success of acquiring the configuration files from the other clients is determined.
And for each target block file, after verification of the block file verification code included in the seed file is passed, the success of obtaining the configuration file from other clients can be determined.
In the embodiment of the application, the target block files obtained from other clients are verified through the block file verification codes of the block files included in the seed files, so that the accuracy of obtaining the configuration files is ensured.
In one exemplary embodiment, a method of profile synchronization is provided, which may be performed by a server. As shown in fig. 10, the following steps 1001 to 1003 are included. Wherein:
s1001, respectively sending a configuration file downloading notification to a plurality of clients to instruct each client to acquire a seed file of the configuration file.
In the embodiment of the application, the seed file is a shared file of a peer-to-peer network formed by the server and each client.
Optionally, a client whitelist may be maintained in advance in the server, that is, a client that may download the configuration file; and respectively sending a configuration file downloading notification to a plurality of clients according to the client whitelist so as to instruct each client to acquire the seed file of the configuration file.
S1002, receiving a downloading request sent by each client according to the seed file.
In the embodiment of the application, the downloading request is used for acquiring a downloading list of the configuration file; the download manifest includes a download record of the configuration file for each of the clients.
For example, after receiving the configuration file downloading notification, each client may request, from the server, according to information included in the configuration file downloading notification, to obtain a seed file of the configuration file; and after each client receives the seed file of the configuration file, the configuration file needs to be acquired according to the seed file, and before the configuration file is acquired, the configuration file needs to be acquired from which clients, and then the downloading list of the configuration file is used. The download list needs to be obtained from the server, and a download request can be sent to the server according to the seed file to obtain the download list of the configuration file.
And S1003, downloading a download list to each client to instruct each client to acquire configuration files from other clients.
After receiving the request sent by each client, the server side issues a download list to each client side so as to instruct each client side to acquire configuration files from other client sides according to the download list.
In this embodiment of the present application, a server sends a configuration file download notification to a plurality of clients, so as to instruct each client to obtain a seed file of the configuration file, where the seed file is a shared file of a peer-to-peer network formed by the server and each client, and further receives a download request sent by each client according to the seed file, where the download request is used to obtain a download list of the configuration file, the download list includes a download record of each client to the configuration file in each client, and finally, the download list is issued to each client, so as to instruct each client to obtain the configuration file from other clients according to the download list. According to the method, the peer-to-peer network technology and the seed file are introduced, so that each client side obtains the configuration file from other client sides according to the seed file, and the network pressure of the server side is greatly reduced.
The seed file is a file necessary for each client to acquire the configuration file from other clients, and the server needs to be manufactured before sending the configuration file downloading notification to each client. Based on this, in one embodiment, an alternative way of generating a seed file is provided. As shown in fig. 11, before the configuration file download notification is sent to each of the plurality of clients, steps 1101 to 1104 are included. Wherein:
s1101, the application server acquires the tracking server address and the configuration file of the tracking server.
In the embodiment of the application, the server side comprises an application server and a tracking server. The operation of creating the seed file needs to be completed by the application server, and the seed file needs to include the tracking server information and the file information, so that the application server needs to acquire the tracking server address and the configuration file of the tracking server first.
S1102, the application server blocks the configuration file to obtain a plurality of block files.
In this embodiment of the present application, if the file information of the seed file needs to include the partition file information of the configuration file, the application server needs to partition the configuration file first to obtain a plurality of partition files.
S1103, the application server determines the block file verification code of each block file according to each block file.
The block file information generally refers to verification codes of the block files, and then the application server needs to determine the block file verification codes of the block files according to the block files. For example, a hash algorithm may be employed to generate a chunk file validation code for each chunk file.
S1104, the application server generates a seed file according to the address of the tracking server and the verification codes of the partitioned files.
Alternatively, a seed file generator may be utilized and used to generate a seed file in combination with the tracking server address and each of the blocked file verification codes.
In the embodiment of the present application, an optional manner of generating a seed file is provided, and by introducing a tracking server address and a partition file of a configuration file, the seed file may be obtained according to the tracking server address and a file verification code of each partition file.
In an exemplary embodiment, before sending the configuration file download notification to the plurality of clients, respectively, the method further comprises: the application server uploads the seed file to the file server and notifies the tracking server to open the download channel of the configuration file.
In the embodiment of the application, the server side further comprises a file server; the download channel represents a management channel for transmitting configuration files in the peer-to-peer network.
Optionally, to implement that each client directly obtains a configuration file from other clients through peer-to-peer network technology, the tracking server needs to start a peer-to-peer network for managing the configuration file through a channel, so that each client can directly communicate with each other. Before the application server sends the configuration file downloading notification to the clients, the application server uploads the manufactured seed file to the file server and notifies the tracking server to start a downloading channel of the configuration file so as to realize direct transmission of the configuration file between the clients.
In the embodiment of the application, before the server side sends the configuration file downloading notification to the plurality of client sides respectively, the tracking server is notified to start the downloading channel of the configuration file, so that the client sides directly communicate with each other through a peer-to-peer network, and the configuration file is directly transmitted between the client sides.
In addition, in an exemplary embodiment, the present application further provides an alternative example of a profile synchronization method, as shown in fig. 12a and fig. 12b, where fig. 12a is a schematic flow chart of the profile synchronization method in the embodiment of the present application, and fig. 12b is a timing chart of the profile synchronization method in the embodiment of the present application, and the embodiment includes the following steps:
S1201, the application server generates a seed file according to the tracking server address and the configuration file of the tracking server.
S1202, the application server uploads the seed file to the file server and notifies the tracking server to start the download channel of the configuration file.
Wherein the download channel represents a management channel for transmitting configuration files in the peer-to-peer network.
S1203, the application server sends a configuration file download notification to the client.
And S1204, the client feeds back the download agent without the configuration file to the application server.
S1205, the application server issues a download agent of the configuration file.
S1206, the client feeds back to the application server the download agent that has the configuration file.
S1207, the application server issues a start notification of the download agent.
S1208, the client starts a download agent for the configuration file.
S1209, the client sends a profile detection request to the file server.
S1210, the file server feeds back that the local configuration file of the client is different from the configuration file of the server.
S1211, the client transmits an acquisition request of the seed file to the file server.
S1212, the file server issues the seed file to the client.
And S1213, the client acquires the configuration file from other clients according to the seed file.
The above processes of S1201-S1213 may be referred to the description of the above method embodiments, and the implementation principle and technical effects are similar, and are not repeated here.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a configuration file synchronization device for realizing the above related configuration file synchronization method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in the embodiments of one or more configuration file synchronization devices provided below may be referred to the limitation of the configuration file synchronization method hereinabove, and will not be repeated herein.
In an exemplary embodiment, as shown in fig. 13, there is provided a profile synchronization apparatus 1, which is configurable in any one of a plurality of clients, including: a seed file acquisition module 10, a download manifest acquisition module 20, and a configuration file acquisition module 30, wherein:
the seed file obtaining module 10 is configured to obtain a seed file of a configuration file from a server in response to a configuration file download notification sent by the server; the seed file is a shared file of a peer-to-peer network formed by the server and a plurality of clients;
the download manifest acquiring module 20 is configured to acquire a download manifest of the configuration file from the server according to the seed file; the download list comprises download records of configuration files from other clients except the target client in the plurality of clients;
and the configuration file obtaining module 30 is configured to obtain the configuration file from the other clients according to the download manifest.
In one embodiment, the profile synchronization device 1 is further configured to:
feeding back a download agent without a configuration file to an application server; if receiving the download agent of the configuration file issued by the application server, feeding back the download agent with the configuration file to the application server; and starting the download agent of the configuration file according to the start notification of the download agent issued by the application server.
In one embodiment, the profile synchronization device 1 is further configured to:
sending a configuration file detection request to a file server according to the address information of the file server; receiving configuration file information fed back by a file server; in case there is a difference between the profile information and the pre-stored local profile, the step of obtaining a seed file of the profile is performed.
In one embodiment, the seed file obtaining module 10 may be configured to:
sending an acquisition request of a seed file to a file server; the file name of the configuration file is included in the acquisition request; and receiving a seed file of the configuration file fed back by the file server according to the file name.
In one embodiment, the download manifest acquisition module 20 may be configured to:
sending a list acquisition request to the tracking server according to the address information of the tracking server; the tracking server represents a server for realizing direct transmission of configuration files among a plurality of clients; and receiving a download list of the configuration file sent by the tracking server.
In one embodiment, the profile acquisition module 30 may be configured to:
acquiring at least one target block file to be downloaded in a configuration file; determining other clients corresponding to each target block file according to the download list of each target block file and other clients for each block file; a block file acquisition request is respectively sent to other clients corresponding to each target block file; and receiving the target block files returned by other clients corresponding to the target block files.
In one embodiment, the profile synchronization device 1 is further configured to:
under the condition that all target block files do not exist in other clients, sending an acquisition request of address information of a file server to a tracking server; receiving address information of a file server fed back by a tracking server; and acquiring each target block file from the file server according to the address information of the file server.
In an exemplary embodiment, as shown in fig. 14, there is provided a profile synchronization apparatus 2, which is configurable in a server, and includes: a notification transmission module 40, a request reception module 50, and a manifest transmission module 60, wherein:
a notification sending module 40, configured to send configuration file downloading notifications to a plurality of clients, respectively, so as to instruct each client to obtain a seed file of the configuration file; the seed file is a shared file of a peer-to-peer network formed by the server and each client;
a request receiving module 50, configured to receive a download request sent by each client according to the seed file; the downloading request is used for acquiring a downloading list of the configuration file; the download list comprises a download record of each client to the configuration file;
The manifest sending module 60 is configured to send a download manifest to each client, so as to instruct each client to obtain a configuration file from other clients.
In one embodiment, the profile synchronization device 2 is further configured to:
the application server uploads the seed file to the file server and notifies the tracking server to start a downloading channel of the configuration file; the download channel represents a management channel for transmitting configuration files in the peer-to-peer network.
The various modules in the profile synchronization apparatus described above may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In an exemplary embodiment, a computer device is provided, which may be a server, and an internal structure thereof may be as shown in fig. 15. The computer device includes a processor, a memory, an Input/Output interface (I/O) and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is for storing profile synchronization data. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a profile synchronization method.
In one exemplary embodiment, a computer device is provided, which may be a client, and the internal structure of which may be as shown in fig. 16. The computer device includes a processor, a memory, an input/output interface, a communication interface, a display unit, and an input means. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a XXX method. The display unit of the computer device is used for forming a visual picture, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be a key, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structures shown in fig. 15 and 16 are merely block diagrams of portions of structures related to the present application and do not constitute a limitation of the computer device on which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one exemplary embodiment, a computer device is provided comprising a memory and a processor, the memory having stored therein a computer program, the processor when executing the computer program performing the steps of:
responding to a configuration file downloading notification sent by a server side, and acquiring a seed file of the configuration file from the server side; the seed file is a shared file of a peer-to-peer network formed by the server and a plurality of clients;
acquiring a download list of the configuration file from the server according to the seed file; the download list comprises download records of configuration files from other clients except the target client in the plurality of clients;
and acquiring configuration files from other clients according to the download list.
In one embodiment, the processor when executing the computer program further performs the steps of:
Feeding back a download agent without a configuration file to an application server; if receiving the download agent of the configuration file issued by the application server, feeding back the download agent with the configuration file to the application server; and starting the download agent of the configuration file according to the start notification of the download agent issued by the application server.
In one embodiment, the processor when executing the computer program further performs the steps of:
sending a configuration file detection request to a file server according to the address information of the file server; receiving configuration file information fed back by a file server; in case there is a difference between the profile information and the pre-stored local profile, the step of obtaining a seed file of the profile is performed.
In one embodiment, when the processor executes logic in the computer program for obtaining the seed file of the configuration file from the server, the following steps are specifically implemented:
sending an acquisition request of a seed file to a file server; the file name of the configuration file is included in the acquisition request; and receiving a seed file of the configuration file fed back by the file server according to the file name.
In one embodiment, when the processor executes logic in the computer program for obtaining the download list of the configuration file from the server according to the seed file, the following steps are specifically implemented:
Sending a list acquisition request to the tracking server according to the address information of the tracking server; the tracking server represents a server for realizing direct transmission of configuration files among a plurality of clients; and receiving a download list of the configuration file sent by the tracking server.
In one embodiment, when the processor executes logic in the computer program to obtain the configuration file from the other clients according to the download manifest, the following steps are specifically implemented:
acquiring at least one target block file to be downloaded in a configuration file; determining other clients corresponding to each target block file according to the download list of each target block file and other clients for each block file; a block file acquisition request is respectively sent to other clients corresponding to each target block file; and receiving the target block files returned by other clients corresponding to the target block files.
In one embodiment, the processor when executing the computer program further performs the steps of:
under the condition that all target block files do not exist in other clients, sending an acquisition request of address information of a file server to a tracking server; receiving address information of a file server fed back by a tracking server; and acquiring each target block file from the file server according to the address information of the file server.
In one embodiment, a computer device is provided comprising a memory and a processor, the memory having stored therein a computer program, the processor when executing the computer program performing the steps of:
respectively sending a configuration file downloading notification to a plurality of clients to instruct each client to acquire a seed file of the configuration file; the seed file is a shared file of a peer-to-peer network formed by the server and each client;
receiving a downloading request sent by each client according to the seed file; the downloading request is used for acquiring a downloading list of the configuration file; the download list comprises a download record of each client to the configuration file;
and downloading a download list to each client to instruct each client to acquire the configuration files from other clients.
In one embodiment, the processor when executing the computer program further performs the steps of:
the application server uploads the seed file to the file server and notifies the tracking server to start a downloading channel of the configuration file; the download channel represents a management channel for transmitting configuration files in the peer-to-peer network.
The principles and specific processes of implementing the foregoing embodiments of the computer device provided in the foregoing embodiments may be referred to the description of the embodiments of the configuration file synchronization method in the foregoing embodiments, which is not repeated herein.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of:
responding to a configuration file downloading notification sent by a server side, and acquiring a seed file of the configuration file from the server side; the seed file is a shared file of a peer-to-peer network formed by the server and a plurality of clients;
acquiring a download list of the configuration file from the server according to the seed file; the download list comprises download records of configuration files from other clients except the target client in the plurality of clients;
and acquiring configuration files from other clients according to the download list.
In one embodiment, the computer program when executed by the processor further performs the steps of:
feeding back a download agent without a configuration file to an application server; if receiving the download agent of the configuration file issued by the application server, feeding back the download agent with the configuration file to the application server; and starting the download agent of the configuration file according to the start notification of the download agent issued by the application server.
In one embodiment, the computer program when executed by the processor further performs the steps of:
Sending a configuration file detection request to a file server according to the address information of the file server; receiving configuration file information fed back by a file server; in case there is a difference between the profile information and the pre-stored local profile, the step of obtaining a seed file of the profile is performed.
In one embodiment, the logic of obtaining the seed file of the configuration file from the server in the computer program is executed by the processor, and specifically implements the following steps:
sending an acquisition request of a seed file to a file server; the file name of the configuration file is included in the acquisition request; and receiving a seed file of the configuration file fed back by the file server according to the file name.
In one embodiment, the logic for obtaining the download manifest of the configuration file from the server according to the seed file in the computer program is executed by the processor, and specifically implements the following steps:
sending a list acquisition request to the tracking server according to the address information of the tracking server; the tracking server represents a server for realizing direct transmission of configuration files among a plurality of clients; and receiving a download list of the configuration file sent by the tracking server.
In one embodiment, the logic for obtaining the configuration file from the other client according to the download manifest in the computer program is executed by the processor, and specifically implements the following steps:
acquiring at least one target block file to be downloaded in a configuration file; determining other clients corresponding to each target block file according to the download list of each target block file and other clients for each block file; a block file acquisition request is respectively sent to other clients corresponding to each target block file; and receiving the target block files returned by other clients corresponding to the target block files.
In one embodiment, the computer program when executed by the processor further performs the steps of:
under the condition that all target block files do not exist in other clients, sending an acquisition request of address information of a file server to a tracking server; receiving address information of a file server fed back by a tracking server; and acquiring each target block file from the file server according to the address information of the file server.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of:
Respectively sending a configuration file downloading notification to a plurality of clients to instruct each client to acquire a seed file of the configuration file; the seed file is a shared file of a peer-to-peer network formed by the server and each client;
receiving a downloading request sent by each client according to the seed file; the downloading request is used for acquiring a downloading list of the configuration file; the download list comprises a download record of each client to the configuration file;
and downloading a download list to each client to instruct each client to acquire the configuration files from other clients.
In one embodiment, the computer program when executed by the processor further performs the steps of:
the application server uploads the seed file to the file server and notifies the tracking server to start a downloading channel of the configuration file; the download channel represents a management channel for transmitting the configuration file in the peer-to-peer network.
The principles and specific procedures of implementing the foregoing embodiments of the present invention in the foregoing embodiments of the present invention may be referred to in the foregoing embodiments of the present invention, and are not described herein in detail.
In one embodiment, a computer program product is provided comprising a computer program which, when executed by a processor, performs the steps of:
Responding to a configuration file downloading notification sent by a server side, and acquiring a seed file of the configuration file from the server side; the seed file is a shared file of a peer-to-peer network formed by the server and a plurality of clients;
acquiring a download list of the configuration file from the server according to the seed file; the download list comprises download records of configuration files from other clients except the target client in the plurality of clients;
and acquiring configuration files from other clients according to the download list.
In one embodiment, the computer program when executed by the processor further performs the steps of:
feeding back a download agent without a configuration file to an application server; if receiving the download agent of the configuration file issued by the application server, feeding back the download agent with the configuration file to the application server; and starting the download agent of the configuration file according to the start notification of the download agent issued by the application server.
In one embodiment, the computer program when executed by the processor further performs the steps of:
sending a configuration file detection request to a file server according to the address information of the file server; receiving configuration file information fed back by a file server; in case there is a difference between the profile information and the pre-stored local profile, the step of obtaining a seed file of the profile is performed.
In one embodiment, the logic of obtaining the seed file of the configuration file from the server in the computer program is executed by the processor, and specifically implements the following steps:
sending an acquisition request of a seed file to a file server; the file name of the configuration file is included in the acquisition request; and receiving a seed file of the configuration file fed back by the file server according to the file name.
In one embodiment, the logic for obtaining the download manifest of the configuration file from the server according to the seed file in the computer program is executed by the processor, and specifically implements the following steps:
sending a list acquisition request to the tracking server according to the address information of the tracking server; the tracking server represents a server for realizing direct transmission of configuration files among a plurality of clients; and receiving a download list of the configuration file sent by the tracking server.
In one embodiment, the logic for obtaining the configuration file from the other client according to the download manifest in the computer program is executed by the processor, and specifically implements the following steps:
acquiring at least one target block file to be downloaded in a configuration file; determining other clients corresponding to each target block file according to the download list of each target block file and other clients for each block file; a block file acquisition request is respectively sent to other clients corresponding to each target block file; and receiving the target block files returned by other clients corresponding to the target block files.
In one embodiment, the computer program when executed by the processor further performs the steps of:
under the condition that all target block files do not exist in other clients, sending an acquisition request of address information of a file server to a tracking server; receiving address information of a file server fed back by a tracking server; and acquiring each target block file from the file server according to the address information of the file server.
In one embodiment, a computer program product is provided comprising a computer program which, when executed by a processor, performs the steps of:
respectively sending a configuration file downloading notification to a plurality of clients to instruct each client to acquire a seed file of the configuration file; the seed file is a shared file of a peer-to-peer network formed by the server and each client;
receiving a downloading request sent by each client according to the seed file; the downloading request is used for acquiring a downloading list of the configuration file; the download list comprises a download record of each client to the configuration file;
and downloading a download list to each client to instruct each client to acquire the configuration files from other clients.
In one embodiment, the computer program when executed by the processor further performs the steps of:
The application server uploads the seed file to the file server and notifies the tracking server to start a downloading channel of the configuration file; the download channel represents a management channel for transmitting the configuration file in the peer-to-peer network.
The principles and specific procedures of implementing the foregoing embodiments of the present invention may be referred to in the foregoing description of the embodiments of the method for synchronizing configuration files in the foregoing embodiments, which are not repeated herein.
It should be noted that, the data (including, but not limited to, data for analysis, data stored, data displayed, etc.) referred to in this application are all information and data authorized or fully authorized by each party, and the collection, use, and processing of the relevant data are required to meet the relevant regulations.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the various embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the various embodiments provided herein may include at least one of relational databases and non-relational databases. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic units, quantum computing-based data processing logic units, etc., without being limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples only represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application shall be subject to the appended claims.

Claims (11)

1. A profile synchronization method for use with any one of a plurality of clients, the method comprising:
responding to a configuration file downloading notification sent by a server, and acquiring a seed file of the configuration file from the server; the seed file is a shared file of a peer-to-peer network formed by the server and the clients;
Acquiring a download list of the configuration file from the server according to the seed file; the download list comprises download records of the configuration files from other clients except the target client in the plurality of clients;
and acquiring the configuration file from the other clients according to the download list.
2. The method of claim 1, wherein the server comprises an application server, and wherein the profile download notification is sent by the application server; before the seed file of the configuration file is obtained from the server, the method further comprises:
feeding back to the application server a download agent for which the configuration file does not exist;
if the download agent of the configuration file issued by the application server is received, feeding back the download agent of the configuration file to the application server;
and starting the download agent of the configuration file according to the start notification of the download agent issued by the application server.
3. The method of claim 1, wherein the server includes a file server, the configuration file download notification includes address information of the file server, and the method further includes, prior to the obtaining the seed file of the configuration file from the server:
Sending a configuration file detection request to the file server according to the address information of the file server;
receiving configuration file information fed back by the file server;
and executing the step of acquiring the seed file of the configuration file under the condition that the difference exists between the configuration file information and the pre-stored local configuration file.
4. The method of claim 3, wherein the obtaining the seed file of the configuration file from the server comprises:
sending an acquisition request of the seed file to the file server; the acquisition request comprises the file name of the configuration file;
and receiving a seed file of the configuration file fed back by the file server according to the file name.
5. The method according to any one of claims 1 to 4, wherein the server side includes a tracking server, and the seed file includes address information of the tracking server; the step of obtaining the download list of the configuration file from the server according to the seed file includes:
sending a list acquisition request to the tracking server according to the address information of the tracking server; the tracking server represents a server that enables direct transmission of the configuration file between the plurality of clients;
And receiving a download list of the configuration file sent by the tracking server.
6. The method according to any one of claims 1-4, wherein the configuration file includes a plurality of block files, the download list includes a download record of each of the block files by the other clients, and the obtaining the configuration file from the other clients according to the download list includes:
acquiring at least one target block file to be downloaded in the configuration file;
determining other clients corresponding to each target block file according to the download list of each target block file and the other clients for each block file;
a block file acquisition request is respectively sent to other clients corresponding to each target block file;
and receiving the target block files returned by other clients corresponding to the target block files.
7. The method of claim 6, wherein the server includes a tracking server having address information of a file server stored therein, the method further comprising:
sending an acquisition request of the address information of the file server to the tracking server under the condition that the target block files are not existed in the other clients;
Receiving address information of the file server fed back by the tracking server;
and acquiring each target block file from the file server according to the address information of the file server.
8. A method for synchronizing configuration files, which is applied to a server, the method comprising:
respectively sending a configuration file downloading notification to a plurality of clients to instruct each client to acquire a seed file of the configuration file; the seed file is a shared file of a peer-to-peer network formed by the server and the clients;
receiving a downloading request sent by each client according to the seed file; the downloading request is used for acquiring a downloading list of the configuration file; the download list comprises a download record of each client to the configuration file;
and sending the download list to each client to instruct each client to acquire the configuration file from other clients.
9. The method of claim 8, wherein the server comprises an application server, a file server, and a tracking server, and wherein before the sending of the configuration file download notification to the plurality of clients, respectively, the method further comprises:
The application server uploads the seed file to the file server and notifies the tracking server to start a downloading channel of the configuration file; the download channel represents a management channel for transmitting the configuration file in the peer-to-peer network.
10. A profile synchronization apparatus configured in any one of a plurality of clients, the apparatus comprising:
the seed file acquisition module is used for responding to a configuration file downloading notification sent by a server and acquiring a seed file of the configuration file from the server; the seed file is a shared file of a peer-to-peer network formed by the server and the clients;
the download list acquisition module is used for acquiring a download list of the configuration file from the server according to the seed file; the download list comprises download records of the configuration files from other clients except the target client in the plurality of clients;
and the configuration file acquisition module is used for acquiring the configuration file from the other clients according to the download list.
11. A profile synchronization apparatus, configured in a server, the apparatus comprising:
The notification sending module is used for respectively sending configuration file downloading notifications to a plurality of clients so as to instruct the clients to acquire seed files of the configuration files; the seed file is a shared file of a peer-to-peer network formed by the server and the clients;
the request receiving module is used for receiving the downloading request sent by each client according to the seed file; the downloading request is used for acquiring a downloading list of the configuration file; the download list comprises a download record of each client to the configuration file;
and the list sending module is used for sending the download list to each client so as to instruct each client to acquire the configuration file from other clients.
CN202311279000.5A 2023-09-28 2023-09-28 Configuration file synchronization method and device Pending CN117294752A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311279000.5A CN117294752A (en) 2023-09-28 2023-09-28 Configuration file synchronization method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311279000.5A CN117294752A (en) 2023-09-28 2023-09-28 Configuration file synchronization method and device

Publications (1)

Publication Number Publication Date
CN117294752A true CN117294752A (en) 2023-12-26

Family

ID=89258300

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311279000.5A Pending CN117294752A (en) 2023-09-28 2023-09-28 Configuration file synchronization method and device

Country Status (1)

Country Link
CN (1) CN117294752A (en)

Similar Documents

Publication Publication Date Title
CN109522330B (en) Cloud platform data processing method, device, equipment and medium based on block chain
EP2946290B1 (en) Peer-to-peer software updates
US8725682B2 (en) Distribution and synchronization of digital objects
US9697225B2 (en) Method for synchronizing file
WO2019075978A1 (en) Data transmission method and apparatus, computer device, and storage medium
US20170177325A1 (en) Dynamic data difference generation and distribution
CN109565518B (en) Method and system for interchangeable content retrieval
EP2852093B1 (en) Method, system, and device for sharing documents
US9930063B2 (en) Random identifier generation for offline database
US20140304384A1 (en) Uploading large content items
TW201405324A (en) Cloud storage system and data storage and sharing method based on the system
US11068345B2 (en) Method and system for erasure coded data placement in a linked node system
US20200153889A1 (en) Method for uploading and downloading file, and server for executing the same
US11848994B2 (en) Communication protocols for an online content management system
US11310272B2 (en) Method and system creating and using data confidence fabric processing paths
US9432238B2 (en) Communicating large amounts of data over a network with improved efficiency
US11294734B2 (en) Method and system optimizing the use of sub-data confidence fabrics
CN117294752A (en) Configuration file synchronization method and device
US11481293B2 (en) Method and system for replica placement in a linked node system
US20210097034A1 (en) Method and system for efficient updating of data in a linked node system
EP3080706B1 (en) Method of backup of data stored in a terminal
US11604771B2 (en) Method and system for data placement in a linked node system
US11422741B2 (en) Method and system for data placement of a linked node system using replica paths
WO2023051096A1 (en) Method for accessing resources, and electronic device
CN116016134A (en) Cross-cluster communication deployment method and device and computer 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