Metadata synchronization method and device
By maintaining the metadata resource index table and chunked encoding on the client, and using hash function to generate the index table, realizing the location sharing of metadata blocks between clients, solving the problem of low synchronization efficiency of a large number of metadata and improving the user experience and efficiency.
Patent Information
- Application Number
- CN202411188739.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2044-08-28
AI Technical Summary
In the prior art, when a large amount of metadata is updated, users need to download all changed data from the server, resulting in slow resource startup and poor user experience, and long-distance transmission leads to inefficiency in areas where users gather.
By maintaining the metadata resource index table, encode metadata blocks in blocks, and using hash functions to generate index tables, the metadata block location information is shared between clients under the same wireless LAN, reducing direct communication with the server, and realizing the local network Data synchronization.
It effectively reduces the number and distance of network nodes for metadata synchronization, improves the issuance efficiency, makes full use of terminal capabilities, reduces server pressure, and improves user experience.
Smart Images

Figure CN118714147B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of terminal technology, and in particular to a metadata synchronization method and device. Background Art
[0002] Metadata-driven BS deployment applications are defined by a large amount of metadata. After the software version is updated, users need to download a large amount of metadata when logging in for the first time, which leads to slow startup of production resources and poor user experience.
[0003] The most mainstream technical solution in the industry is to generate a diff file when a small amount of metadata is updated, and merge the diff file into the existing data through encoding on the end, so as to achieve the incremental merging capability when a small amount of data is updated, but it cannot solve the synchronization problem of a large amount of metadata. When a large amount of metadata is updated, users still need to download all metadata from the server to the client before starting the application. The existing technology relies on the network service capabilities of the server and CDN (Content Delivery Network). Each user must completely pull all the changed data after the metadata is updated. The users of tenants are often concentrated in a certain area, such as the same wifi, or the same network segment. If the distance to the nearest server or CDN is far, each user will have to bear the side effects of this ultra-long-distance transmission.
[0004] How to improve the efficiency of synchronizing large amounts of metadata is a technical problem that needs to be solved at present. Summary of the invention
[0005] The present invention provides a metadata synchronization method and device to solve the defects in the prior art.
[0006] The present invention provides a metadata synchronization method, which is applied to a first client, wherein the first client is a client that maintains a metadata resource index table; the metadata resource index table is used to store the positions of a plurality of metadata blocks that are pre-block-encoded;
[0007] The steps include:
[0008] In response to the metadata synchronization request sent by the second client, query the metadata resource index table to obtain the location information of the target metadata block; wherein the location information is used to indicate the third client storing the target metadata block;
[0009] Sending the location information of the target metadata block to the second client, so that the second client obtains the target metadata block based on the location information;
[0010] The first client, the second client and the third client are located in the same wireless local area network.
[0011] According to a metadata synchronization method provided by the present invention, before the metadata synchronization request sent by the second client is queried in the metadata resource index table to obtain the location information of the target metadata block, the method further includes:
[0012] Obtain tenant-level metadata, and process the tenant-level metadata in blocks to obtain multiple metadata blocks;
[0013] Each metadata block is encoded by a hash function to obtain the metadata resource index table.
[0014] According to a metadata synchronization method provided by the present invention, after querying the metadata resource index table in response to the metadata synchronization request sent by the second client, the method further includes:
[0015] In the case that the location information of the target metadata block does not exist in the metadata resource index table, prompt information is returned to the second client, so that the second client sends a request to the server based on the prompt information to obtain the target metadata block.
[0016] According to a metadata synchronization method provided by the present invention, after the second client sends a request to the server based on the prompt information to obtain the target metadata block, the method further includes:
[0017] Acquire the update information sent by the second client, so as to update and maintain the metadata resource index table based on the update information;
[0018] The update information is used to indicate the metadata resource information obtained by the second client from the server.
[0019] According to a metadata synchronization method provided by the present invention, after sending the location information of the target metadata block to the second client so that the second client obtains the target metadata block based on the location information, the method further includes:
[0020] The location information of the metadata block reported by at least one client located in the same wireless local area network as the first client is obtained at a preset time interval, so as to update and maintain the metadata resource index table based on the location information of the metadata block reported by the at least one client.
[0021] The present invention also provides a metadata synchronization device, which is applied to a first client, wherein the first client is a client that maintains a metadata resource index table; the metadata resource index table is used to store the positions of a plurality of metadata blocks that are pre-block-encoded;
[0022] The device comprises:
[0023] A query module, configured to query the metadata resource index table in response to the metadata synchronization request sent by the second client, and obtain the location information of the target metadata block; wherein the location information is used to indicate a third client storing the target metadata block;
[0024] A synchronization module, configured to send the location information of the target metadata block to the second client, so that the second client obtains the target metadata block based on the location information;
[0025] The first client, the second client and the third client are located in the same wireless local area network.
[0026] According to a metadata synchronization device provided by the present invention, the device also includes a block encoding module, which is specifically used to:
[0027] The step of querying the metadata resource index table in response to the metadata synchronization request sent by the second client to obtain the location information of the target metadata block, obtaining tenant-level metadata, and performing block processing on the tenant-level metadata to obtain multiple metadata blocks;
[0028] Each metadata block is encoded by a hash function to obtain the metadata resource index table.
[0029] According to a metadata synchronization device provided by the present invention, the device also includes a prompt module, which is specifically used to:
[0030] In response to the metadata synchronization request sent by the second client, after querying the metadata resource index table, if the location information of the target metadata block does not exist in the metadata resource index table, a prompt message is returned to the second client, so that the second client sends a request to the server based on the prompt message to obtain the target metadata block.
[0031] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, any of the metadata synchronization methods described above is implemented.
[0032] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the metadata synchronization method described in any one of the above is implemented.
[0033] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the metadata synchronization methods described above.
[0034] The present invention provides a metadata synchronization method and device, which are applied to a first client, wherein the first client is a client that maintains a metadata resource index table; the metadata resource index table is used to store the locations of multiple metadata blocks that are pre-block-encoded; the method includes: in response to a metadata synchronization request sent by a second client, querying the metadata resource index table to obtain the location information of the target metadata block; wherein the location information is used to indicate a third client that stores the target metadata block; sending the location information of the target metadata block to the second client, so that the second client obtains the target metadata block based on the location information; wherein the first client, the second client and the third client are located in the same wireless local area network. It can be seen from this that when a large amount of metadata is sent, the present invention synchronizes data through a terminal that has obtained some resources in a local network, rather than obtaining data by directly communicating with a remote server, which can effectively reduce the number and distance of network nodes spanned by metadata synchronization and improve the sending efficiency; and fully utilize the terminal capabilities to reduce the pressure on the service end. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0036] Figure 1 It is a flowchart of the metadata synchronization method provided by the present invention.
[0037] Figure 2 It is an interactive schematic diagram of the metadata synchronization method provided by the present invention.
[0038] Figure 3 It is a structural schematic diagram of the metadata synchronization device provided by the present invention.
[0039] Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0040] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0041] Combine the following Figure 1-Figure 4A metadata synchronization method and device of the present invention are described.
[0042] Figure 1 is a flowchart of the metadata synchronization method provided by the present invention, such as Figure 1 As shown, it is applied to a first client, and the first client is a client that maintains a metadata resource index table; the metadata resource index table is used to store the positions of multiple metadata blocks that are pre-block-encoded;
[0043] The method includes the following:
[0044] Step 100: In response to a metadata synchronization request sent by a second client, query the metadata resource index table to obtain location information of a target metadata block; wherein the location information is used to indicate a third client storing the target metadata block.
[0045] It should be noted that the client proposed in the embodiment of the present invention is a user terminal, such as a browser or a mobile phone app (Application).
[0046] Metadata delivery is common in PaaS applications (Platform as a Service). PaaS applications refer to a cloud computing service model that provides a complete platform for developing, running and managing applications. In PaaS applications, metadata delivery is a common operation, which is mainly used for application configuration, data governance, automated deployment and service integration. Through the description and management of metadata, the PaaS platform can provide users with a more efficient, flexible and reliable application development and operation environment.
[0047] Specifically, before step 100, the method further includes:
[0048] Obtain tenant-level metadata, and process the tenant-level metadata in blocks to obtain multiple metadata blocks;
[0049] Each metadata block is encoded by a hash function to obtain the metadata resource index table.
[0050] It should be noted that tenant-level metadata refers to metadata that is defined and managed separately for each tenant in multi-tenant environments such as cloud computing and SaaS (Software as a Service). These metadata are used to describe and define tenant-specific configurations, permissions, data models, business processes, and other information to ensure that each tenant's applications and data are logically isolated while meeting their own personalized needs.
[0051] In one embodiment, the tenant-level metadata of a certain version of entities, layouts, components, etc., which are not sensitive and shared, is divided into blocks, and a unique code is calculated for each block of data using md5, and the blocks are compiled into a metadata index table (hereinafter referred to as T) as the full set of metadata sent this time. MD5 (Message-Digest Algorithm 5) is a widely used hash function. The MD5 algorithm is used to calculate a unique code for each block of metadata, and these codes are compiled into a metadata resource index table. This metadata resource index table will be used as an index of metadata to quickly find and locate specific metadata blocks. Table 1 shows the structure of the metadata resource index table.
[0052] Table 1
[0053]
[0054] Furthermore, after querying the metadata resource index table in response to the metadata synchronization request sent by the second client in step 100, the method further includes:
[0055] In the case that the location information of the target metadata block does not exist in the metadata resource index table, prompt information is returned to the second client, so that the second client sends a request to the server based on the prompt information to obtain the target metadata block.
[0056] Furthermore, after the second client sends a request to the server based on the prompt information to obtain the target metadata block, the method further includes:
[0057] Acquire the update information sent by the second client, so as to update and maintain the metadata resource index table based on the update information;
[0058] The update information is used to indicate the metadata resource information obtained by the second client from the server.
[0059] Specifically, Figure 2 is an interactive schematic diagram of the metadata synchronization method provided by the present invention, such as Figure 2As shown, the embodiment of the present invention shares and propagates metadata between tenants (hereinafter referred to as shared users) in the same wifi (wireless local area network) or the same network segment. When the client user starts, a network sharing group is built between the shared users through webRTC (a technology for realizing decentralized communication on the web page), and the first user who starts becomes the coordination center (i.e., the first client mentioned above, hereinafter referred to as C). When this user exits the system (for example, turns off the device), the next user will be randomly selected as the coordination center. The coordination center user will maintain a metadata resource index to a certain client table under the indexedDB (web database assigned by the browser to each domain name) of the current CRM (Customer Relationship Management) webpage domain name, i.e., the metadata resource index table mentioned above.
[0060] Furthermore, newly started tenant users on the same wifi or network segment will inquire the first client C about the location of each resource after downloading the current version of metadata T, and initiate resource requests to the shared user through webRTC. If all metadata blocks between shared user groups are empty, they will request data from the remote service or CDN, and after the request is completed, they will notify C that they have obtained a certain resource (i.e., the update information sent by the second client above). Based on this, the total number of requests initiated to the server for synchronizing resources between shared users will be greatly reduced, and the efficiency and speed of sending metadata will be greatly improved because of the P2P capability of webRTC between shared users.
[0061] Step 200: Send the location information of the target metadata block to the second client, so that the second client obtains the target metadata block based on the location information;
[0062] The first client, the second client and the third client are located in the same wireless local area network.
[0063] It should be noted that the first client, the second client and the third client are located in the same wireless local area network or the same network segment.
[0064] The above is a description of the steps of the metadata synchronization method provided by the present invention. From the description of the above steps, it can be seen that the metadata synchronization method provided by the present invention is applied to a first client, and the first client is a client that maintains a metadata resource index table; the metadata resource index table is used to store the positions of multiple metadata blocks that are pre-blocked and encoded; the method includes: responding to a metadata synchronization request sent by a second client, querying the metadata resource index table, and obtaining the location information of the target metadata block; wherein the location information is used to indicate a third client storing the target metadata block; sending the location information of the target metadata block to the second client, so that the second client obtains the target metadata block based on the location information; wherein the first client, the second client and the third client are located in the same wireless local area network. It can be seen from this that when a large amount of metadata is sent, the present invention synchronizes data through a terminal that has obtained some resources in a local network, rather than directly communicating with a remote server to obtain data, which can effectively reduce the number and distance of network nodes spanned by metadata synchronization and improve the efficiency of sending; and make full use of terminal capabilities to reduce the pressure on the service end.
[0065] Based on the above embodiment, in this embodiment, it should be noted that the metadata resource index table is gradually enriched during the synchronization process, that is, all clients participating in resource exchange have index tables for some resources. The surviving terminals (referring to the terminals using the CRM metadata application) in the same wifi or adjacent network are maintained by the CRM background service, and a list of surviving devices is maintained for each tenant with a large number of surviving terminals (this is a very lightweight table. When the TCP connection between the client and the server is disconnected, it is considered that the client is offline).
[0066] Specifically, in the process of the first client sending resources to other clients, backup clients will be gradually selected, such as clients with abundant resources and large terminal performance idle time. This selection is jointly decided by all terminals participating in resource exchange and synchronization in the same network group. When the first client is suddenly closed, the client with the richest index table in the current network group is automatically promoted to the first client. During the promotion process, the request of the second client will find that the original first client has been disconnected, so as to actively contact the higher-ranked terminals among the surviving backup clients and promote one of them to the latest first client.
[0067] The metadata synchronization method provided in this embodiment updates the first client in a timely manner to ensure that other clients can obtain the corresponding target metadata blocks.
[0068] Based on the above embodiment, in this embodiment, after step 200 sends the location information of the target metadata block to the second client so that the second client obtains the target metadata block based on the location information, the method further includes:
[0069] The location information of the metadata block reported by at least one client located in the same wireless local area network as the first client is obtained at a preset time interval, so as to update and maintain the metadata resource index table based on the location information of the metadata block reported by the at least one client.
[0070] Specifically, the preset time interval may be, for example, 1 hour, and this embodiment does not impose any special limitation on this.
[0071] The metadata synchronization method provided in this embodiment periodically obtains the location information of the reported metadata blocks, so that the first client can periodically maintain the metadata resource index table to ensure that the locations of the obtained metadata blocks are the latest locations.
[0072] The metadata synchronization device provided by the present invention is described below. The metadata synchronization device described below and the metadata synchronization method described above can be referenced to each other.
[0073] Figure 3 is a schematic diagram of the structure of the metadata synchronization device provided by the present invention, such as Figure 3 As shown, the metadata synchronization device provided by the present invention is applied to a first client, which is a client that maintains a metadata resource index table; the metadata resource index table is used to store the positions of multiple metadata blocks that are pre-block-encoded;
[0074] The device comprises:
[0075] The query module 301 is used to query the metadata resource index table in response to the metadata synchronization request sent by the second client to obtain the location information of the target metadata block; wherein the location information is used to indicate the third client storing the target metadata block;
[0076] A synchronization module 302, configured to send the location information of the target metadata block to the second client, so that the second client obtains the target metadata block based on the location information;
[0077] The first client, the second client and the third client are located in the same wireless local area network.
[0078] The metadata synchronization device provided by the present invention is applied to a first client, wherein the first client is a client that maintains a metadata resource index table; the metadata resource index table is used to store the locations of multiple metadata blocks that are pre-block-encoded; the method comprises: in response to a metadata synchronization request sent by a second client, querying the metadata resource index table to obtain the location information of a target metadata block; wherein the location information is used to indicate a third client that stores the target metadata block; sending the location information of the target metadata block to the second client, so that the second client obtains the target metadata block based on the location information; wherein the first client, the second client and the third client are located in the same wireless local area network. It can be seen from this that when a large amount of metadata is sent, the present invention synchronizes data through a terminal that has obtained some resources in a local network, rather than obtaining data by directly communicating with a remote server, which can effectively reduce the number and distance of network nodes spanned by metadata synchronization and improve the sending efficiency; and fully utilize the terminal capabilities to reduce the pressure on the server.
[0079] Based on the above embodiment, in this embodiment, the device further includes a block encoding module, which is specifically used to:
[0080] The step of querying the metadata resource index table in response to the metadata synchronization request sent by the second client to obtain the location information of the target metadata block, obtaining tenant-level metadata, and performing block processing on the tenant-level metadata to obtain multiple metadata blocks;
[0081] Each metadata block is encoded by a hash function to obtain the metadata resource index table.
[0082] Based on the above embodiment, in this embodiment, the device further includes a prompt module, which is specifically used to:
[0083] In response to the metadata synchronization request sent by the second client, after querying the metadata resource index table, if the location information of the target metadata block does not exist in the metadata resource index table, a prompt message is returned to the second client, so that the second client sends a request to the server based on the prompt message to obtain the target metadata block.
[0084] Based on the above embodiment, in this embodiment, the device further includes an update maintenance module, which is specifically used to:
[0085] The second client sends a request to the server based on the prompt information to obtain the target metadata block, and then obtains the update information sent by the second client to update and maintain the metadata resource index table based on the update information;
[0086] The update information is used to indicate the metadata resource information obtained by the second client from the server.
[0087] Based on the above embodiment, in this embodiment, the device further includes an acquisition module, which is specifically used to:
[0088] The location information of the target metadata block is sent to the second client, so that after the second client obtains the target metadata block based on the location information, it obtains the location information of the metadata block reported by at least one client located in the same wireless local area network as the first client at a preset time interval, so as to update and maintain the metadata resource index table based on the location information of the metadata block reported by the at least one client.
[0089] Figure 4 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 4 As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communication interface 420 and the memory 430 communicate with each other through the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute the metadata synchronization method, which is applied to a first client, and the first client is a client that maintains a metadata resource index table; the metadata resource index table is used to store the positions of multiple metadata blocks that are pre-block-encoded;
[0090] The method comprises:
[0091] In response to the metadata synchronization request sent by the second client, query the metadata resource index table to obtain the location information of the target metadata block; wherein the location information is used to indicate the third client storing the target metadata block;
[0092] Sending the location information of the target metadata block to the second client, so that the second client obtains the target metadata block based on the location information;
[0093] The first client, the second client and the third client are located in the same wireless local area network.
[0094] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0095] On the other hand, the present invention further provides a computer program product, the computer program product includes a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the metadata synchronization method provided by the above methods, applied to a first client, the first client is a client maintaining a metadata resource index table; the metadata resource index table is used to store the positions of multiple metadata blocks that are pre-block-encoded;
[0096] The method comprises:
[0097] In response to the metadata synchronization request sent by the second client, query the metadata resource index table to obtain the location information of the target metadata block; wherein the location information is used to indicate the third client storing the target metadata block;
[0098] Sending the location information of the target metadata block to the second client, so that the second client obtains the target metadata block based on the location information;
[0099] The first client, the second client and the third client are located in the same wireless local area network.
[0100] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when executed by a processor to execute the metadata synchronization method provided by the above methods, and is applied to a first client, wherein the first client is a client that maintains a metadata resource index table; the metadata resource index table is used to store the positions of a plurality of metadata blocks that are pre-block-encoded;
[0101] The method comprises:
[0102] In response to the metadata synchronization request sent by the second client, query the metadata resource index table to obtain the location information of the target metadata block; wherein the location information is used to indicate the third client storing the target metadata block;
[0103] Sending the location information of the target metadata block to the second client, so that the second client obtains the target metadata block based on the location information;
[0104] The first client, the second client and the third client are located in the same wireless local area network.
[0105] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0106] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0107] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A metadata synchronization method, characterized in that: Applied to a first client, the first client being a client maintaining a metadata resource index table; The metadata resource index table is used to store the positions of multiple metadata blocks that are pre-block-encoded; The method comprises: In response to the metadata synchronization request sent by the second client, query the metadata resource index table to obtain the location information of the target metadata block; wherein the location information is used to indicate the third client storing the target metadata block; Sending the location information of the target metadata block to the second client, so that the second client obtains the target metadata block based on the location information; The first client, the second client and the third client are located in the same wireless local area network; the first client is determined by: the client with the richest metadata resource index table stored in the clients located in the same wireless local area network, when the current first client is closed, determining the standby client as the first client; the standby client is: the client with the richest metadata resource index table stored in the clients located in the same wireless local area network except the current first client; After sending the location information of the target metadata block to the second client so that the second client obtains the target metadata block based on the location information, the method further includes: The location information of the metadata block reported by at least one client located in the same wireless local area network as the first client is obtained at a preset time interval, so as to update and maintain the metadata resource index table based on the location information of the metadata block reported by the at least one client.
2. The metadata synchronization method according to claim 1, characterized in that: Before the step of responding to the metadata synchronization request sent by the second client and querying the metadata resource index table to obtain the location information of the target metadata block, the method further includes: Obtain tenant-level metadata, and process the tenant-level metadata in blocks to obtain multiple metadata blocks; Each metadata block is encoded by a hash function to obtain the metadata resource index table.
3. The metadata synchronization method according to claim 1, characterized in that: After querying the metadata resource index table in response to the metadata synchronization request sent by the second client, the method further includes: In the case that the location information of the target metadata block does not exist in the metadata resource index table, prompt information is returned to the second client, so that the second client sends a request to the server based on the prompt information to obtain the target metadata block.
4. The metadata synchronization method according to claim 3, characterized in that: After the second client sends a request to the server based on the prompt information to obtain the target metadata block, the method further includes: Acquire the update information sent by the second client, so as to update and maintain the metadata resource index table based on the update information; The update information is used to indicate the metadata resource information obtained by the second client from the server.
5. A metadata synchronization device, characterized in that: Applied to a first client, the first client being a client maintaining a metadata resource index table; The metadata resource index table is used to store the positions of multiple metadata blocks that are pre-block-encoded; The device comprises: A query module, configured to query the metadata resource index table in response to the metadata synchronization request sent by the second client, and obtain the location information of the target metadata block; wherein the location information is used to indicate a third client storing the target metadata block; A synchronization module, configured to send the location information of the target metadata block to the second client, so that the second client obtains the target metadata block based on the location information; The first client, the second client and the third client are located in the same wireless local area network; the first client is determined by: the client with the richest metadata resource index table stored in the clients located in the same wireless local area network, when the current first client is closed, determining the standby client as the first client; the standby client is: the client with the richest metadata resource index table stored in the clients located in the same wireless local area network except the current first client; The device also includes an acquisition module, which is specifically used to: The location information of the target metadata block is sent to the second client, so that after the second client obtains the target metadata block based on the location information, it obtains the location information of the metadata block reported by at least one client located in the same wireless local area network as the first client at a preset time interval, so as to update and maintain the metadata resource index table based on the location information of the metadata block reported by the at least one client.
6. The metadata synchronization device according to claim 5, characterized in that: The device also includes a block encoding module, which is specifically used for: The step of querying the metadata resource index table in response to the metadata synchronization request sent by the second client to obtain the location information of the target metadata block, obtaining tenant-level metadata, and performing block processing on the tenant-level metadata to obtain multiple metadata blocks; Each metadata block is encoded by a hash function to obtain the metadata resource index table.
7. The metadata synchronization device according to claim 5, characterized in that: The device also includes a prompt module, which is specifically used for: In response to the metadata synchronization request sent by the second client, after querying the metadata resource index table, if the location information of the target metadata block does not exist in the metadata resource index table, a prompt message is returned to the second client, so that the second client sends a request to the server based on the prompt message to obtain the target metadata block.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the metadata synchronization method according to any one of claims 1 to 4 is implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the metadata synchronization method according to any one of claims 1 to 4 is implemented.
