Decentralized electronic file synchronization method, medium and equipment

By establishing a decentralized communication network between terminal devices, matching and updating the electronic file information list is solved, and the problems of low electronic file synchronization efficiency and high cloud load in the prior art are solved, and the update efficiency and system reliability are improved.

CN119788662APending Publication Date: 2025-04-08FUJIAN KAIMI NETWORK TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411775486.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

Existing electronic file synchronization methods rely on cloud notifications and loads, resulting in low efficiency in terminal equipment updates and excessive load on cloud servers.

Method used

The decentralized electronic file synchronization method is adopted to obtain the list of adjacent terminals after authentication to the cloud server through the terminal device, and establish a communication connection with the adjacent terminals to achieve matching and updating the electronic file information list.

Benefits of technology

It improves the efficiency of electronic files and reduces the load on cloud servers. Terminal devices can obtain update notifications from neighboring terminals nearby, improving the efficiency and reliability of synchronous updates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119788662A_ABST
    Figure CN119788662A_ABST
Patent Text Reader

Abstract

The invention discloses a decentralized electronic file synchronization method, a medium and equipment, and the method comprises the steps: receiving an electronic file information list sent by other adjacent terminals, and matching the received electronic file information list with an electronic file information list stored locally; and when the feature codes of the electronic files with the same identification are inconsistent and the updating time of the electronic files in the received electronic file information list is later than the updating time of the electronic files with the same identification in the local electronic file information list, updating the local electronic file information list according to the received electronic file information list. And downloading the corresponding electronic file according to the downloading address of the electronic file and updating the electronic file to the local. According to the scheme, the terminal equipment can acquire the electronic file updating notification from the nearby credible terminal equipment, so that the file updating efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electronic file synchronization, and in particular to a decentralized electronic file synchronization method, medium and device. Background Art

[0002] Electronic files such as operating system files and data files in terminal devices need to be updated to obtain benefits such as system upgrades and improved operating efficiency. At present, when a terminal device needs to update an electronic file, the administrator usually uploads the electronic file to be updated to the cloud first, and then notifies the terminal device to pull the latest file list. After receiving the notification sent by the cloud, the terminal device will download the file from the cloud according to the file name and download address in the list, thereby completing the update of the local file. This update method has the following disadvantages:

[0003] (1) If the terminal device does not receive the notification broadcast by the cloud, the electronic file will not be updated;

[0004] (2) If the terminal devices collectively obtain files from the cloud after receiving the notification, the cloud load will increase. For example, if the size of an electronic file is X and the file update notification is broadcast to Y terminal devices, the traffic consumed by the cloud is X*Y, resulting in an increase in the cloud server load.

[0005] (3) When a terminal device downloads files from the cloud, the download speed is limited by the cloud load. If the cloud load is high, the download speed of the terminal device will be slow, affecting the efficiency of synchronous updating of electronic files. Summary of the invention

[0006] In view of the above problems, the present application provides a technical solution for decentralized electronic file synchronization to solve the technical problem that the existing electronic files are restricted by cloud notifications, loads, etc. when updating, resulting in increased cloud server load and low electronic file update efficiency.

[0007] To achieve the above objectives, in a first aspect, the present application provides a decentralized electronic file synchronization method, applicable to a first terminal, the method comprising:

[0008] Initiate an authentication request to the cloud server, obtain a list of other adjacent terminals after the authentication is passed, and establish a communication connection with other adjacent terminals;

[0009] Receiving an electronic file information list sent by other adjacent terminals, and matching the received electronic file information list with an electronic file information list stored locally, wherein the electronic file information list stores at least one set of file summary information, and the file summary information includes an electronic file identifier, a feature code, an update time, and a download address;

[0010] If the characteristic codes of the electronic files with the same identifier in the received electronic file information list are consistent, there is no need to update the current electronic file;

[0011] When the characteristic codes of electronic files with the same identifier are inconsistent, and the update time of the electronic file in the received electronic file information list is later than the update time of the electronic file with the same identifier in the local electronic file information list, the local electronic file information list is updated according to the received electronic file information list, and the corresponding electronic file is downloaded according to the download address of the electronic file and updated locally;

[0012] When the characteristic codes of electronic files with the same identifier are inconsistent, and the update time of the electronic file in the received electronic file information list is earlier than the update time of the electronic file with the same identifier in the local electronic file information list, the electronic file information list stored locally is sent to other adjacent terminals.

[0013] Furthermore, the method further comprises:

[0014] When it is detected that the file summary information in the electronic file information list stored locally changes, the electronic file information list stored locally is actively sent to other adjacent terminals.

[0015] Furthermore, the method further comprises:

[0016] When detecting that the file summary information in the electronic file information list stored locally changes, obtaining an update strategy for the corresponding electronic file, and performing electronic file synchronization according to the update strategy;

[0017] The update strategy includes full network synchronization, partial synchronization or no synchronization, and the electronic file synchronization according to the update strategy includes:

[0018] When the update strategy of the acquired electronic file is asynchronous, the electronic file information list currently stored locally is not sent to other adjacent terminals;

[0019] When the update strategy of the acquired electronic file is partial synchronization, the electronic file information list currently stored locally is sent to other adjacent terminals;

[0020] When the update strategy of the acquired electronic file is full network synchronization, the electronic file information list currently stored locally is sent to all other terminals.

[0021] Furthermore, the method further comprises:

[0022] If electronic file information lists sent by multiple adjacent terminals are received, multiple sending source addresses are recorded, and the electronic file information lists sent by multiple adjacent terminals are compared with local electronic file information. For electronic files with the same identifier and inconsistent feature codes, only the file summary information with the latest update time is retained, and then the update time of the retained file summary information is matched with the update time corresponding to the electronic file with the same identifier stored in the local electronic file information list. If the matching result is that multiple electronic files need to be updated, the electronic files that need to be updated are synchronously downloaded from the recorded one or more sending source addresses.

[0023] Furthermore, the other adjacent terminals include terminals located in the same digital audio-visual venue as the first terminal or terminals located in the same geographical area as the first terminal.

[0024] Furthermore, the first terminal is located in a digital audio-visual venue, wherein a plurality of boxes are arranged in the digital audio-visual venue, each box is provided with at least one on-demand device, and the on-demand device is communicatively connected with the first terminal, and the method includes:

[0025] During the process of updating the electronic file, the original electronic file stored locally on the first terminal remains unchanged, and the newly downloaded electronic file is saved using a temporary file name;

[0026] After the electronic file to be updated is downloaded, when the locally stored original electronic file is updated, it is determined whether there is a on-demand record of the locally stored original electronic file being played. If so, the update of the local original electronic file is temporarily suspended, and the newly downloaded electronic file is used to replace the original electronic file after the playback is completed; if not, the newly downloaded electronic file is directly used to replace the original electronic file;

[0027] During the period of replacing the original electronic file with the newly downloaded electronic file, if a video-on-demand request for the current electronic file is received from the video-on-demand device, the video-on-demand request is temporarily stored, and the response to the video-on-demand request is resumed after the electronic file replacement is completed.

[0028] In a second aspect, the present application further provides a decentralized electronic file synchronization method, the method being applicable to a first terminal and a second terminal, the second terminal and the first terminal being both authenticated by a cloud server and being adjacent terminals to each other, the method comprising:

[0029] The first terminal receives the electronic file information list sent by the second terminal, and matches the received electronic file information list with the electronic file information list stored in the first terminal, wherein the electronic file information list stores at least one set of file summary information, and the file summary information includes an identification, a feature code, an update time, and a download address of the electronic file;

[0030] If the electronic files with the same identifier in the electronic file information list received by the first terminal have the same feature codes, there is no need to update the current electronic file;

[0031] When the characteristic codes of the electronic files with the same identifier are inconsistent, and the update time of the electronic file in the received electronic file information list is later than the update time of the electronic file with the same identifier currently stored in the electronic file information list of the first terminal, the electronic file information list stored locally in the first terminal is updated according to the electronic file information list received from the second terminal, and the first terminal also downloads the corresponding electronic file according to the download address of the electronic file and updates it locally;

[0032] When the feature codes of electronic files with the same identifier are inconsistent, and the update time of the electronic file in the received electronic file information list is earlier than the update time of the electronic file with the same identifier currently stored in the electronic file information list of the first terminal, the first terminal sends the electronic file information list stored in the first terminal to the second terminal.

[0033] Furthermore, the method further comprises:

[0034] The second terminal receives the electronic file information list sent by the first terminal, determines whether the update policy of the currently updated electronic file requires synchronous update, and if so, transmits the received electronic file information list to a terminal adjacent to the second terminal.

[0035] In a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the decentralized electronic file synchronization method as described in the first aspect or the second aspect of the present application.

[0036] In a fourth aspect, the present application provides an electronic device having a computer program stored thereon, including a processor and a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by the processor, the decentralized electronic file synchronization method as described in the first aspect or the second aspect of the present application is implemented.

[0037] Different from the prior art, the decentralized electronic file synchronization method, medium and device involved in the above technical solution include: initiating an authentication request to a cloud server, and obtaining a list of other adjacent terminals after the authentication is passed, and establishing a communication connection with other adjacent terminals; receiving an electronic file information list sent by other adjacent terminals, and matching the received electronic file information list with the electronic file information list stored locally; when the feature codes of electronic files with the same identifier are inconsistent, and the update time of the electronic file in the received electronic file information list is later than the update time of the electronic file with the same identifier in the local electronic file information list, the local electronic file information list is updated according to the received electronic file information list, and the corresponding electronic file is downloaded according to the download address of the electronic file and updated to the local. Through the above solution, the terminal device can obtain electronic file update notifications from nearby trusted terminal devices, improve the update efficiency of electronic files, and reduce the burden on the cloud server.

[0038] The above-mentioned records related to the invention content are only an overview of the technical solution of the present application. In order to enable ordinary technicians in the field to more clearly understand the technical solution of the present application, and then implement it according to the text of the specification and the contents recorded in the drawings, and to make the above-mentioned purpose and other purposes, features and advantages of the present application easier to understand, the following is an explanation in combination with the specific implementation mode and drawings of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] The drawings are only used to illustrate the principles, implementation methods, applications, characteristics and effects of the specific embodiments of the present invention and other related contents, and shall not be considered as limiting the present application.

[0040] In the drawings of the specification:

[0041] Figure 1 This is a flow chart of a decentralized electronic file synchronization method according to a first exemplary embodiment of the present application;

[0042] Figure 2 This is a flow chart of a decentralized electronic file synchronization method according to a second exemplary embodiment of the present application;

[0043] Figure 3 This is a flow chart of a decentralized electronic file synchronization method according to a third exemplary embodiment of the present application;

[0044] Figure 4 A schematic diagram of an electronic file synchronization system according to an exemplary embodiment of the present application;

[0045] Figure 5 A schematic diagram of an electronic device according to an exemplary embodiment of the present application;

[0046] The reference numerals in the above drawings are described as follows:

[0047] 10. Electronic equipment;

[0048] 101. Processor;

[0049] 102. Storage medium. DETAILED DESCRIPTION

[0050] In order to explain in detail the possible application scenarios, technical principles, specific schemes that can be implemented, and the purposes and effects that can be achieved, the following is a detailed description of the specific embodiments listed in conjunction with the accompanying drawings. The embodiments described herein are only used to more clearly illustrate the technical solutions of the present application, and are therefore only used as examples, and cannot be used to limit the scope of protection of the present application.

[0051] Reference to "embodiment" herein means that the specific features, structures or characteristics described in conjunction with the embodiment may be included in at least one embodiment of the present application. The term "embodiment" appearing in various places in the specification does not necessarily refer to the same embodiment, nor does it particularly limit its independence or association with other embodiments. In principle, in the present application, as long as there is no technical contradiction or conflict, the various technical features mentioned in the embodiments can be combined in any way to form a corresponding implementable technical solution.

[0052] Unless otherwise defined, the technical terms used in this document have the same meanings as those generally understood by those skilled in the art to which this application belongs; the use of relevant terms in this document is only for describing specific embodiments and is not intended to limit this application.

[0053] In the description of this application, the term "and / or" is an expression used to describe the logical relationship between objects, indicating that three relationships may exist, for example, A and / or B, which means: A exists, B exists, and A and B exist at the same time. In addition, the character " / " in this article generally indicates that the objects before and after are in an "or" logical relationship.

[0054] In the present application, terms such as “first” and “second” are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship of quantity, priority or sequence between these entities or operations.

[0055] Without further limitations, in this application, the words "include", "comprises", "has" or other similar open-ended expressions used in sentences are intended to cover non-exclusive inclusion. These expressions do not exclude the presence of additional elements in the process, method or product including the elements, so that the process, method or product including a series of elements may include not only those limited elements, but also other elements not explicitly listed, or also include elements inherent to such process, method or product.

[0056] In this application, expressions such as "greater than", "less than", "exceed" and the like are understood to exclude the number itself; expressions such as "above", "below", "within" and the like are understood to include the number itself. In addition, in the description of the embodiments of this application, "multiple" means more than two (including two), and similar expressions related to "multiple" are also understood in this way, such as "multiple groups", "multiple times", etc., unless otherwise clearly and specifically limited.

[0057] In the description of the embodiments of the present application, space-related expressions used, such as "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "vertical", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "radial", "circumferential", etc., indicate the orientation or position relationship based on the orientation or position relationship shown in the specific embodiments or drawings, and are only for the convenience of describing the specific embodiments of the present application or facilitating the reader's understanding, and do not indicate or imply that the referred device or component must have a specific position, a specific orientation, or be constructed or operated in a specific orientation, and therefore cannot be understood as a limitation on the embodiments of the present application.

[0058] Unless otherwise expressly specified or limited, in the description of the embodiments of the present application, the terms such as "install", "connect", "connect", "fix", "set", etc. used should be understood in a broad sense. For example, the "connection" can be a fixed connection, a detachable connection, or an integrated setting; it can be a mechanical connection, an electrical connection, or a communication connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium; it can be the internal connection of two elements or the interaction relationship between two elements. For technicians in the technical field to which the present application belongs, the specific meanings of the above terms in the embodiments of the present application can be understood according to the specific circumstances.

[0059] In a first aspect, the present application provides a decentralized electronic file synchronization method, applicable to a first terminal, such as Figure 1 As shown, the method includes:

[0060] Step S101: Initiate an authentication request to a cloud server, obtain a list of other adjacent terminals after the authentication is passed, and establish a communication connection with other adjacent terminals.

[0061] Step S102: receiving an electronic file information list sent by other adjacent terminals, and matching the received electronic file information list with the electronic file information list stored locally;

[0062] After step S102, step S103 may be entered: if the feature codes of the electronic files with the same identifier in the received electronic file information list are consistent, then there is no need to update the current electronic file;

[0063] After step S102, step S104 may also be entered: when the feature codes of the electronic files with the same identifier are inconsistent, and the update time of the electronic file in the received electronic file information list is later than the update time of the electronic file with the same identifier in the local electronic file information list, the local electronic file information list is updated according to the received electronic file information list, and the corresponding electronic file is downloaded according to the download address of the electronic file and updated to the local;

[0064] After step S102, step S105 may be entered: when the feature codes of electronic files with the same identifier are inconsistent, and the update time of the electronic file in the received electronic file information list is earlier than the update time of the electronic file with the same identifier in the local electronic file information list, the electronic file information list stored locally is sent to other adjacent terminals.

[0065] In this embodiment, the first terminal is a node device that needs to update the electronic file, for example, it can be a server set up in a digital audio-visual place. The digital audio-visual place can be a KTV, a practice room, a home song request machine, or it can also be used in an electronic music DJ box, a script-killing box, or a cinema hall, etc.

[0066] In step S101, the first terminal can communicate with the cloud server for authentication, and become a trusted device after passing the authentication, thereby obtaining a list of other adjacent terminals and establishing a communication connection with other adjacent terminals. In this embodiment, the other terminals are trusted devices that have been authenticated by the cloud server. Preferably, the other adjacent terminals include terminals located in the same digital audio-visual venue as the first terminal or terminals located in the same geographical area as the first terminal.

[0067] Specifically, multiple terminal devices establish communication connections to form a mesh network structure of nearby devices, and all nearby devices form a "decentralized" electronic file synchronization network through the mesh structure. Taking the digital audio-visual venue as a KTV and the first terminal as a server in the KTV as an example, the server in a single KTV is part of the overall network, and the other terminals closest to the first terminal can first be other servers in the current KTV, and secondly, servers in surrounding KTVs in the same city, servers in surrounding KTVs in the same province, etc.

[0068] In step S101, the communication connection established between the first terminal and other adjacent terminals may be a real-time communication connection or a non-real-time communication connection. When the communication connection established between the first terminal and other adjacent terminals is a non-real-time communication connection, the communication connection may be established when the content in the electronic file information list is changed.

[0069] In step S102, the electronic file information list stores at least one set of file summary information, and the file summary information includes the electronic file identifier, feature code, update time and download address. The electronic file identifier can be letters, numbers, strings or feature codes, etc., used to characterize the type or name of a certain electronic file. The feature code is a set of strings calculated based on the file content. Different file contents correspond to different feature codes. The update time refers to the timestamp information corresponding to each update of the electronic file. The download address refers to the download address of the electronic file that currently needs to be changed.

[0070] In the present application, the electronic file may be a system file, a system configuration file, a multimedia resource file, etc., and the multimedia resource file may be a playlist file, a video file, an audio file, etc.

[0071] In short, if the feature codes of the electronic files with the same identifier in the received electronic file information list are consistent, that is, the content of the electronic file stored in the current first terminal is consistent with that of the electronic file stored in other adjacent terminal devices, then there is no need to update the current electronic file. If there is a change in the content of the electronic file information list stored in other terminals adjacent to the first terminal (that is, the feature codes of the electronic files with the same identifier are inconsistent), it means that a certain electronic file needs to be updated. At this time, the other terminals adjacent to the first terminal will broadcast the electronic file information list, that is, the first terminal will receive the electronic file information list sent by other adjacent terminals.

[0072] In step S102, matching the received electronic file information list with the electronic file information list stored locally refers to comparing the file summary information in the two lists, that is, comparing whether the feature codes corresponding to the same electronic file identifiers are the same. If the feature codes are different, further comparing the update time.

[0073] In steps S103-S105, the download address of the electronic file may be a path address corresponding to a storage medium in other adjacent terminal devices, so that the first terminal can download the electronic file to be updated from other adjacent terminal devices nearby, effectively saving communication bandwidth.

[0074] In some embodiments, the method further includes: when detecting that the file summary information in the electronic file information list stored locally changes, actively sending the electronic file information list stored locally to other adjacent terminals.

[0075] In short, if the first terminal receives an electronic file information list sent by other terminal devices, it will compare the received electronic file information list with the electronic file information list stored locally in the first terminal. When the feature codes of electronic files with the same identifier are inconsistent, the update time will be further compared. If it is found that the update time corresponding to the electronic file with the identifier recorded locally is later than that recorded in the received electronic file information list, it means that the local electronic file has been updated at this time, while the other terminal devices adjacent to the first terminal have not yet completed the update. Therefore, the first terminal will actively send the locally stored electronic file information list to other adjacent terminal devices, so that the other adjacent terminal devices can update the electronic file according to the electronic file information list sent by the first terminal.

[0076] On the contrary, when the feature codes of electronic files with the same identifier are inconsistent, if it is found that the update time corresponding to an electronic file with a certain identifier recorded locally is earlier than that recorded in the received electronic file information list, it means that the electronic files in other adjacent terminal devices have been updated, but the electronic files in the first terminal have not been updated yet, so the first terminal will update the electronic files according to the received electronic file information list.

[0077] Through the above scheme, the terminal device does not need to centrally obtain electronic file update notifications or the latest electronic files from the cloud server, but can obtain electronic file update notifications from nearby trusted terminal devices to complete the update of electronic files. And each terminal device can keep the electronic files stored in each terminal device consistent by exchanging electronic file information lists and then comparing them with the local storage. That is, after an electronic file is updated in a terminal device, other terminal devices can also update the electronic file in time, so that the electronic files in all terminal devices in the network are consistent. In addition, since the process of updating electronic files no longer needs to interact with the cloud server, the cloud load and traffic consumption are effectively reduced. The terminal device can also use the local maximum bandwidth to download files, which improves the file download speed.

[0078] In some embodiments, the method further comprises:

[0079] When detecting that the file summary information in the electronic file information list stored locally changes, obtaining an update strategy for the corresponding electronic file, and performing electronic file synchronization according to the update strategy;

[0080] The update strategy includes full network synchronization, partial synchronization or no synchronization, and the electronic file synchronization according to the update strategy includes:

[0081] When the update strategy of the acquired electronic file is asynchronous, the electronic file information list currently stored locally is not sent to other adjacent terminals;

[0082] When the update strategy of the acquired electronic file is partial synchronization, the electronic file information list currently stored locally is sent to other adjacent terminals;

[0083] When the update strategy of the acquired electronic file is full network synchronization, the electronic file information list currently stored locally is sent to all other terminals.

[0084] In short, if an electronic file is updated in a terminal device, the update policy corresponding to the electronic file can be obtained first. If the update policy is found to be out of sync, there is no need to send an update notification to other terminal devices adjacent to the terminal device (the update notification contains the electronic file information list of the current terminal device); if the update policy is detected to be partially synchronized, the electronic file information list can be synchronized to other terminal devices within a specific area according to the current update policy, for example, it can be synchronized to the server in the same KTV, or to the server in the KTV in the same area. If the update policy is detected to be synchronized across the entire network, when an update is detected in the electronic file information list, the electronic file information list currently stored locally will be sent to all other terminals. The update policies of different electronic files can be set to be different, and different update policies can be used to achieve differentiated management of updates to different electronic files.

[0085] In some embodiments, the method further comprises:

[0086] If electronic file information lists sent by multiple adjacent terminals are received, multiple sending source addresses are recorded, and the electronic file information lists sent by multiple adjacent terminals are compared with local electronic file information. For electronic files with the same identifier and inconsistent feature codes, only the file summary information with the latest update time is retained, and then the update time of the retained file summary information is matched with the update time corresponding to the electronic file with the same identifier stored in the local electronic file information list. If the matching result is that multiple electronic files need to be updated, the electronic files that need to be updated are synchronously downloaded from the recorded one or more sending source addresses.

[0087] In short, when the first terminal receives electronic file information lists sent by multiple adjacent terminal devices, it can first store all received electronic file information lists in the message queue, and record the source address of each received electronic file information. If the message queue is not empty, it can be screened one by one according to the identification information of the electronic file. For electronic files with the same identification and inconsistent feature codes, only a set of file summary information with the latest update time (including the identification, feature code, update time and download address of the electronic file) is retained, and then the electronic file is downloaded according to the download address to complete the update, thereby improving the processing efficiency when updating local electronic files and ensuring that the downloaded and updated electronic files are the latest versions. At the same time, after the first terminal has updated the electronic file to the latest local version, it will actively send the updated electronic file information list to other adjacent electronic devices, so that other adjacent electronic devices can complete the update of the latest version of the electronic file in a timely manner.

[0088] In order to improve the efficiency of synchronous downloading, if the matching result of the electronic file information list stored and received this time is that multiple electronic files need to be updated, the electronic files that need to be updated are synchronously downloaded from the one or more recorded sending source addresses. In some embodiments, the first terminal is located in a digital audio-visual venue, and the digital audio-visual venue is provided with multiple boxes, each box is provided with at least one on-demand device, and the on-demand device is connected to the first terminal in communication, such as Figure 2 As shown, the method includes:

[0089] Step S201: During the process of updating the electronic file, the original electronic file stored locally in the first terminal remains unchanged, and a temporary file name is used to save the newly downloaded electronic file;

[0090] Step S202: after the electronic file to be updated is downloaded, when the locally stored original electronic file is updated, it is determined whether there is a on-demand record of the locally stored original electronic file being played. If so, the process proceeds to step S203 to temporarily suspend the update of the local original electronic file, and replace the original electronic file with the newly downloaded electronic file after the playback is completed; if not, the process proceeds to step S204 to directly replace the original electronic file with the newly downloaded electronic file;

[0091] After step S203 or step 204, step S205 may be entered: during the period of replacing the original electronic file with the newly downloaded electronic file, if a video-on-demand request for the current electronic file is received from the video-on-demand device, the video-on-demand request is temporarily stored, and the response to the video-on-demand request is resumed after the electronic file replacement is completed.

[0092] Taking the digital audio-visual venue as KTV, the first terminal as a server in KTV, the electronic file as multimedia resources, and the on-demand device as a set-top box in a private room as an example, when the multimedia resources of the server in KTV are updated, after the user orders the multimedia resources, the set-top box will send an on-demand request to the KTV server to obtain the corresponding multimedia resources ordered by the user for playback, and can also play the multimedia resources stored on the KTV server online. Before the electronic file to be updated is downloaded, the original electronic file stored locally is used to respond to the on-demand request of the set-top box; after the electronic file to be updated is downloaded, when the original electronic file stored locally is updated, it is determined whether the original electronic file stored locally has an on-demand record being played, and if so, the update of the local original electronic file is suspended, and the newly downloaded electronic file is used to replace the original electronic file after the playback is completed; if during the process of replacing the electronic file, a set-top box on-demand request for the electronic file is received, the on-demand request can be temporarily stored first, and after the electronic file is replaced, the replaced (i.e. updated) electronic file is used to respond to the on-demand request.

[0093] In the second aspect, Figure 3 As shown, the present application also provides a decentralized electronic file synchronization method, the method is applicable to a first terminal and a second terminal, the second terminal and the first terminal are both authenticated by a cloud server and are adjacent terminals to each other, the method includes:

[0094] Step S301: The first terminal receives the electronic file information list sent by the second terminal, and matches the received electronic file information list with the electronic file information list stored in the first terminal;

[0095] In step S301, the electronic file information list stores at least one set of file summary information, and the file summary information includes an electronic file identifier, a feature code, an update time, and a download address.

[0096] After step S301, the process may proceed to step S302: if the electronic files with the same identifier in the electronic file information list received by the first terminal have the same feature codes, there is no need to update the current electronic file.

[0097] After step S301, step S303 can also be entered: when the feature codes of electronic files with the same identifier are inconsistent, and the update time of the electronic file in the received electronic file information list is later than the update time of the electronic file with the same identifier currently stored in the electronic file information list of the first terminal, the electronic file information list stored locally in the first terminal is updated according to the electronic file information list received from the second terminal, and the first terminal will also download the corresponding electronic file according to the download address of the electronic file and update it locally.

[0098] After step S301, step S304 can also be entered: when the feature codes of electronic files with the same identifier are inconsistent, and the update time of the electronic file in the received electronic file information list is earlier than the update time of the electronic file with the same identifier currently stored in the electronic file information list of the first terminal, the first terminal sends the electronic file information list stored in the first terminal to the second terminal.

[0099] In some embodiments, the method further includes: the second terminal determines whether the update policy of the currently updated electronic file requires synchronous update when receiving the electronic file information list sent by the first terminal, and if so, transmits the received electronic file information list to a terminal adjacent to the second terminal.

[0100] like Figure 4As shown, the first terminal and the second terminal are adjacent terminals to each other. The terminals adjacent to the first terminal also include terminal A and terminal B. Terminal A is also adjacent to terminal B, terminal D and terminal C. Terminal D is adjacent to terminal C. The second terminal is also adjacent to terminal D, terminal E and terminal F. The first terminal, the second terminal, terminal A-terminal F together constitute an electronic file synchronization system network. If the update strategy of a certain electronic file is full network synchronization, after the electronic file is updated in the first terminal, it will be propagated to the entire system network node. At this time, terminal A, terminal B and the second terminal adjacent to the first terminal will first receive the updated electronic file information list, and then continue to propagate the received electronic file information list to their respective adjacent terminal devices. If the update strategy of a certain electronic file is partial synchronization, terminal A, terminal B and the second terminal may not continue to propagate externally after receiving the updated electronic file information list sent by the first terminal. If the update strategy of an electronic file is asynchronous, the electronic file will not be disseminated externally after downloading and updating in the first terminal. That is, after receiving the electronic file information list sent by the first terminal, the subsequent terminal A, terminal B and the second terminal will automatically skip downloading and updating the electronic file, or the relevant information of the electronic file (such as identification, feature code, update time, download address) will be directly hidden in the electronic file information list sent by the first terminal. Through this solution, the update of electronic files can be achieved in a differentiated manner, which is easy to manage.

[0101] In a third aspect, the present invention further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the decentralized electronic file synchronization method as described in the first aspect of the present invention.

[0102] The computer-readable storage medium may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories.

[0103] The non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a ferromagnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD ROM); the magnetic surface memory can be a disk memory or a tape memory.

[0104] The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), direct memory bus random access memory (DRRAM). The computer-readable storage medium described in the embodiments of the present invention is intended to include these and any other suitable types of memory.

[0105] like Figure 5 As shown, in a fourth aspect, the present invention provides an electronic device 10, comprising a processor 101 and a storage medium 102, wherein a computer program is stored on the storage medium, and when the computer program is executed by the processor, the decentralized electronic file synchronization method as described in the first aspect of the present invention is implemented.

[0106] In some embodiments, the processor can be implemented by software, hardware, firmware or a combination thereof, and can use circuits, single or multiple application specific integrated circuits (Application Specific Integrated Circuit, ASIC), digital signal processors (Digital Signal Processor, DSP), digital signal processing devices (Digital Signal Processing Device, DSPD), programmable logic devices (Programmable Logic Device, PLD), field programmable gate arrays (Field Programmable Gate Array, FPGA), central processing units (Central Processing Unit, CPU), controllers, microcontrollers, at least one of microprocessors, so that the processor can execute some or all of the steps in the decentralized electronic file synchronization method described in the various embodiments of the present application, or any combination of the steps therein.

[0107] Finally, it should be noted that although the above embodiments have been described in the specification and drawings of this application, this does not limit the scope of patent protection of this application. All technical solutions generated by replacing or modifying equivalent structures or equivalent processes based on the essential concept of this application using the contents recorded in the specification and drawings of this application, as well as directly or indirectly implementing the technical solutions of the above embodiments in other related technical fields, are included in the scope of patent protection of this application.

Claims

1. A decentralized electronic file synchronization method, characterized in that: Applicable to a first terminal, the method includes: Initiate an authentication request to the cloud server, obtain a list of other adjacent terminals after the authentication is passed, and establish a communication connection with other adjacent terminals; Receiving an electronic file information list sent by other adjacent terminals, and matching the received electronic file information list with an electronic file information list stored locally, wherein the electronic file information list stores at least one set of file summary information, and the file summary information includes an electronic file identifier, a feature code, an update time, and a download address; If the feature codes of the electronic files with the same identifier in the received electronic file information list are consistent, there is no need to update the current electronic file; When the characteristic codes of electronic files with the same identifier are inconsistent, and the update time of the electronic file in the received electronic file information list is later than the update time of the electronic file with the same identifier in the local electronic file information list, the local electronic file information list is updated according to the received electronic file information list, and the corresponding electronic file is downloaded according to the download address of the electronic file and updated locally; When the characteristic codes of electronic files with the same identifier are inconsistent, and the update time of the electronic file in the received electronic file information list is earlier than the update time of the electronic file with the same identifier in the local electronic file information list, the electronic file information list stored locally is sent to other adjacent terminals.

2. The decentralized electronic file synchronization method according to claim 1, characterized in that: The method further comprises: When it is detected that the file summary information in the electronic file information list stored locally changes, the electronic file information list stored locally is actively sent to other adjacent terminals.

3. The decentralized electronic file synchronization method according to claim 1, characterized in that: The method further comprises: When detecting that the file summary information in the electronic file information list stored locally changes, obtaining an update strategy for the corresponding electronic file, and performing electronic file synchronization according to the update strategy; The update strategy includes full network synchronization, partial synchronization or no synchronization, and the electronic file synchronization according to the update strategy includes: When the update strategy of the acquired electronic file is asynchronous, the electronic file information list currently stored locally is not sent to other adjacent terminals; When the update strategy of the acquired electronic file is partial synchronization, the electronic file information list currently stored locally is sent to other adjacent terminals; When the update strategy of the acquired electronic file is full network synchronization, the electronic file information list currently stored locally is sent to all other terminals.

4. The decentralized electronic file synchronization method according to claim 1, characterized in that: The method further comprises: If electronic file information lists sent by multiple adjacent terminals are received, multiple sending source addresses are recorded, and the electronic file information lists sent by multiple adjacent terminals are compared with local electronic file information. For electronic files with the same identifier and inconsistent feature codes, only the file summary information with the latest update time is retained, and then the update time of the retained file summary information is matched with the update time corresponding to the electronic file with the same identifier stored in the local electronic file information list. If the matching result is that multiple electronic files need to be updated, the electronic files that need to be updated are synchronously downloaded from the recorded one or more sending source addresses.

5. The decentralized electronic file synchronization method according to claim 1, characterized in that: The other adjacent terminals include terminals located in the same digital audio-visual venue as the first terminal or terminals located in the same geographical area as the first terminal.

6. The decentralized electronic file synchronization method according to claim 1, characterized in that: The first terminal is located in a digital audio-visual venue, wherein a plurality of boxes are arranged in the digital audio-visual venue, each box is provided with at least one on-demand device, and the on-demand device is communicatively connected with the first terminal, and the method comprises: During the process of updating the electronic file, the original electronic file stored locally on the first terminal remains unchanged, and the newly downloaded electronic file is saved using a temporary file name; After the electronic file to be updated is downloaded, when the locally stored original electronic file is updated, it is determined whether there is a on-demand record of the locally stored original electronic file being played. If so, the update of the local original electronic file is temporarily suspended, and the newly downloaded electronic file is used to replace the original electronic file after the playback is completed; if not, the newly downloaded electronic file is directly used to replace the original electronic file; During the period of replacing the original electronic file with the newly downloaded electronic file, if a video-on-demand request for the current electronic file is received from the video-on-demand device, the video-on-demand request is temporarily stored, and the response to the video-on-demand request is resumed after the electronic file replacement is completed.

7. A decentralized electronic file synchronization method, characterized in that: The method is applicable to a first terminal and a second terminal, where both the second terminal and the first terminal are authenticated by a cloud server and are adjacent terminals to each other, and the method includes: The first terminal receives the electronic file information list sent by the second terminal, and matches the received electronic file information list with the electronic file information list stored in the first terminal, wherein the electronic file information list stores at least one set of file summary information, and the file summary information includes an identification, a feature code, an update time, and a download address of the electronic file; If the electronic files with the same identifier in the electronic file information list received by the first terminal have the same feature codes, there is no need to update the current electronic file; When the characteristic codes of the electronic files with the same identifier are inconsistent, and the update time of the electronic file in the received electronic file information list is later than the update time of the electronic file with the same identifier currently stored in the electronic file information list of the first terminal, the electronic file information list stored locally in the first terminal is updated according to the electronic file information list received from the second terminal, and the first terminal also downloads the corresponding electronic file according to the download address of the electronic file and updates it locally; When the feature codes of electronic files with the same identifier are inconsistent, and the update time of the electronic file in the received electronic file information list is earlier than the update time of the electronic file with the same identifier currently stored in the electronic file information list of the first terminal, the first terminal sends the electronic file information list stored in the first terminal to the second terminal.

8. The decentralized electronic file synchronization method according to claim 7, characterized in that: The method further comprises: The second terminal receives the electronic file information list sent by the first terminal, determines whether the update policy of the currently updated electronic file requires synchronous update, and if so, transmits the received electronic file information list to a terminal adjacent to the second terminal.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the decentralized electronic file synchronization method as described in any one of claims 1 to 8 is implemented.

10. An electronic device having a computer program stored thereon, characterized in that: It includes a processor and a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by the processor, the decentralized electronic file synchronization method as described in any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • System for downloading files based on Bittorrent protocol

    CN101626397A

  • CDN-node file synchronization method and device

    CN103997517A

  • P2P-based data distribution method, device and system

    CN114531446A

  • Data processing method and device and readable storage medium

    CN116208782A