A data operation management method, device and equipment, and a storage medium
Patent Information
- Application Number
- CN202311498489.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-10
- Publication Date
- 2026-10-20
- Estimated Expiration
- 2043-11-10
AI Technical Summary
[0005]本申请提供一种数据运营管理方法、装置、设备及存储介质,用以解决现有技术中的平台运营数据管理存在管理效率较差、无法实现快速打造场景化产品的需求的技术问题
[0034]本申请提供的一种数据运营管理方法、装置、设备及存储介质,通过中心节点获取资源创建请求,并根据资源创建请求,创建与资源标识和资源值对应的目标数据,并将目标数据携带在同步消息中,通过与站点标识对应的分布式节点对应的单向同步通道,发送至与站点标识对应的分布式节点,分布式节点通过单向同步通道,获取同步消息,并根据同步消息,将同步消息中的目标数据发送给分布式节点中的数据库,以供数据库对目标数据进行同步处理,以实现分布式节点在获取与分布式节点对应的目标数据,从数据库中获取目标数据进行相应的处理。由于中心节点在创建目标数据之后,主动通过单向同步通道将该目标数据同步至分布式节点中的数据库,从而使得分布式节点在对需要对数据进行展示处理时,无需再请求中心节点以获取相应数据,可以直接从内部数据库中获取相应数据,进而提高了数据运营管理效率。同时,由于中心节点和分布式节点之间构建统一的单一流向的同步通道(即单向同步通道),因此,大大减少了同步逻辑的复杂度,避免分级运营场景中心节点和分布式节点数据不一致情况的发生,从而有效地提高了Pass平台运营管理效率。
Smart Images

Figure CN117520449B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data synchronization technology, and in particular to a data operation and management method, apparatus, equipment and storage medium. Background Technology
[0002] In response to the business needs of customers in different regions, the Pass platform needs to quickly develop scenario-based products adapted to each region to achieve digital transformation. Based on the coexistence of centralized and hierarchical operations, the Pass platform proposes a hierarchical deployment operational architecture to manage data at all levels.
[0003] In existing technologies, the Pass platform's hierarchical deployment operational architecture mainly includes a central node and multiple distributed nodes. Specifically, Pass platform operation and management primarily involves the central node managing data, including storage, retrieval, modification, and deletion. Distributed nodes do not need to store data; they only receive the required data from the central node and display it. Because all data is stored on the central node, and the data volume is relatively large, the central node's data retrieval and transmission are slow, hindering the rapid creation of scenario-based applications. Furthermore, each distributed node needs to request data from the central node when it needs to display or process data, resulting in relatively poor operational management efficiency for the current Pass platform.
[0004] Therefore, existing platform operation data management suffers from poor management efficiency and cannot meet the needs of quickly creating scenario-based products. Summary of the Invention
[0005] This application provides a data operation management method, apparatus, device, and storage medium to solve the technical problems of poor management efficiency and inability to quickly create scenario-based products in existing platform operation data management.
[0006] Firstly, this application provides a data operation and management method, including:
[0007] The central node obtains a resource creation request, which includes a site identifier, a resource identifier, and a resource value.
[0008] The central node creates target data corresponding to the resource identifier and resource value based on the resource creation request, and sends the target data in a synchronization message to the distributed node corresponding to the site identifier through the one-way synchronization channel corresponding to the distributed node corresponding to the site identifier.
[0009] Distributed nodes obtain synchronization messages through a one-way synchronization channel and send the target data in the synchronization message to the database in the distributed node, so that the database can perform synchronization processing on the target data. This enables the distributed node to obtain the target data corresponding to the distributed node and retrieve the target data from the database for corresponding processing.
[0010] Optionally, as described above, the synchronization message may further include: a transaction identifier and a synchronization action; wherein the synchronization action includes adding, modifying, and / or deleting.
[0011] Based on the synchronization message, the target data in the synchronization message is sent to the database in the distributed nodes, including:
[0012] Based on the synchronization action in the synchronization message, the target data is added to the database in the distributed node, and / or the target data is modified or deleted in the database in the distributed node.
[0013] Alternatively, the method described above may also include:
[0014] Distributed nodes obtain the storage response from the database and generate a feedback message when the storage response is a storage failure response;
[0015] The distributed nodes send feedback messages to the central node, so that the central node can resend the target data to the distributed nodes through a one-way synchronization channel based on the feedback messages.
[0016] Optionally, as described above, the distributed nodes obtain the storage response from the database, and when the storage response is a storage failure response, generate a feedback message, including:
[0017] Distributed nodes obtain the storage response from the database, and when the storage response is a storage failure response, they obtain the synchronization method, synchronization time, synchronization status, operator identifier, operation time, and synchronization dependencies corresponding to the database's synchronization processing of the target data. Among them, the synchronization method represents the method by which the distributed node adds, modifies, or deletes the target data, and the synchronization status includes success or failure; the synchronization dependencies represent the relationships between the target data.
[0018] Distributed nodes generate feedback messages based on the synchronization method, synchronization time, synchronization status, operator identifier, operation time, and synchronization dependency.
[0019] Optionally, as described above, the central node, based on the feedback message, resends the target data to the distributed nodes via a one-way synchronization channel, including:
[0020] If the central node determines that the synchronization status in the feedback message is a failure, it determines the target data for resynchronization based on the feedback message and starts a timer. When the timer reaches the preset synchronization time, the target data for resynchronization is sent to the distributed nodes through a one-way synchronization channel.
[0021] or,
[0022] If the central node determines that the synchronization status in the feedback message is a failure, it determines the target data for resynchronization based on the feedback message, and sends the target data for resynchronization to the distributed nodes through a one-way synchronization channel when it receives a synchronization request.
[0023] Optionally, as described above, the central node obtains the resource creation request, including:
[0024] The central node receives resource creation requests sent by user terminals;
[0025] or,
[0026] The central node receives resource creation requests uploaded by distributed nodes. These resource creation requests are requests sent from user terminals to distributed nodes.
[0027] Optionally, in the method described above, the resource identifier includes: a user resource identifier, an account resource identifier, and / or a model resource identifier. Secondly, this application provides a data operation management device, comprising:
[0028] The acquisition module is used by the central node to acquire resource creation requests, which include site identifier, resource identifier, and resource value.
[0029] The synchronization module is used by the central node to create target data corresponding to the resource identifier and resource value according to the resource creation request, and to send the target data in the synchronization message through the one-way synchronization channel corresponding to the distributed node corresponding to the site identifier.
[0030] A processing module is used for distributed nodes to obtain synchronization messages through a one-way synchronization channel, and to send the target data in the synchronization message to the database in the distributed nodes, so that the database can perform synchronization processing on the target data. This enables the distributed nodes to obtain the target data corresponding to the distributed nodes and retrieve the target data from the database for corresponding processing. Thirdly, this application proposes an electronic device, including a processor and a memory communicatively connected to the processor.
[0031] The memory stores instructions that the computer executes;
[0032] The processor executes computer execution instructions stored in memory to implement the method as described in this application.
[0033] Fourthly, this application proposes a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method of this application.
[0034] This application provides a data operation and management method, apparatus, device, and storage medium. A central node receives a resource creation request and, based on the request, creates target data corresponding to a resource identifier and resource value. This target data is then carried in a synchronization message and sent to the corresponding distributed node via a one-way synchronization channel. The distributed node receives the synchronization message through the same channel and, based on the message, sends the target data to its database for synchronization processing. This allows the distributed node to retrieve the target data corresponding to its location and then process it from the database. Because the central node actively synchronizes the target data to the database via the one-way synchronization channel after creation, the distributed nodes can directly retrieve the data from their internal database when they need to display or process the data, without needing to request data from the central node. This improves data operation and management efficiency. Meanwhile, because a unified, single-direction synchronization channel (i.e., a one-way synchronization channel) is established between the central node and the distributed nodes, the complexity of the synchronization logic is greatly reduced, and the inconsistency of data between the central node and the distributed nodes in hierarchical operation scenarios is avoided, thereby effectively improving the operational management efficiency of the Pass platform. Attached Figure Description
[0035] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0036] Figure 1 This is a schematic diagram of the hierarchical operation scenario architecture of the Pass platform on which the data operation management method of this application is based;
[0037] Figure 2 A flowchart illustrating a data operation and management method provided in an embodiment of this application;
[0038] Figure 3 A flowchart illustrating a data operation and management method provided in an embodiment of this application;
[0039] Figure 4 A flowchart illustrating a data operation and management method provided in an embodiment of this application;
[0040] Figure 5A flowchart illustrating a data operation and management method provided in an embodiment of this application;
[0041] Figure 6A A flowchart illustrating a data operation and management method provided in an embodiment of this application;
[0042] Figure 6B A flowchart illustrating a data operation and management method provided in an embodiment of this application;
[0043] Figure 7 A flowchart illustrating another data operation and management method provided in this application embodiment;
[0044] Figure 7A A schematic diagram illustrating the process of obtaining a resource creation request provided in an embodiment of this application;
[0045] Figure 7B A schematic diagram illustrating another process for obtaining a resource creation request, provided as an embodiment of this application;
[0046] Figure 8 A schematic diagram of the structure of a data operation management device provided in an embodiment of this application;
[0047] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0048] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0049] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0050] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with relevant laws, regulations and standards, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0051] In existing technologies, data operation management has the need for both centralized operation and hierarchical operation, thus constructing a hierarchical deployment operation architecture system, including: a central node and multiple distributed nodes; and the data synchronization efficiency of the central node and multiple distributed nodes will affect data operation management.
[0052] However, currently, data operation and management are mainly handled through a central node, while distributed nodes do not require data operation and management but only receive data from the central node for display. Since all data is stored on the central node, the large data volume leads to increased time spent by the central node each time it searches for and sends data to the corresponding distributed nodes. Furthermore, each time a distributed node needs to retrieve data, it must send a request to the central node, resulting in low efficiency in data operation and management.
[0053] Therefore, the method of centrally storing data on a central node and only displaying it on distributed nodes results in low efficiency in data operation and management, and makes it impossible to quickly create scenario-based products.
[0054] To address the aforementioned issues, the inventive concept of this application lies in: how to achieve simple and efficient data synchronization between central nodes and distributed nodes, thereby meeting the need for rapidly developing scenario-based products.
[0055] Figure 1 This is a schematic diagram of the hierarchical operation scenario architecture of the Pass platform on which the data operation management method of this application is based, as shown below. Figure 1 As shown, the Pass platform mainly includes a central node 11 and multiple distributed nodes 12. The central node 11 can be a server, and the distributed nodes 12 can be clients. Specifically, the central node 11 establishes a one-way synchronization channel with each distributed node 12 via a Socket, thereby enabling data synchronization between the central node 11 and each distributed node 12.
[0056] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0057] Figure 2 This is a flowchart illustrating a data operation and management method provided in Embodiment 1 of this application. Figure 2 As shown, the method may include:
[0058] S201. The central node obtains a resource creation request, which includes a site identifier, a resource identifier, and a resource value.
[0059] In this embodiment, optionally, the central node can receive resource creation requests sent by user terminals. Alternatively, the central node can receive resource creation requests uploaded by distributed nodes, where the resource creation request is a request sent by the user terminal to the distributed nodes.
[0060] In this embodiment, both the central node and the distributed nodes can initiate resource creation requests, but the central node receives all resource creation requests and sends them to the corresponding distributed nodes through a one-way channel. This data synchronization method ensures that the data of the central node and the distributed nodes are always consistent, avoiding the possibility of data operation and management problems caused by data differences.
[0061] More optionally, the resource identifier may include: user resource identifier, account resource identifier, and / or model resource identifier.
[0062] In this embodiment, the user resource identifier can refer to a unique identifier that identifies a user; the account resource identifier can refer to a unique identifier that identifies an account. For example, accounts can be divided into administrator accounts and ordinary accounts; the model resource identifier can refer to an identifier that represents device information.
[0063] S202. The central node creates target data corresponding to the resource identifier and resource value according to the resource creation request, and carries the resource identifier and resource value in the synchronization message, and sends it to the distributed node corresponding to the site identifier through the one-way synchronization channel corresponding to the distributed node corresponding to the site identifier.
[0064] In this embodiment, the resource identifier refers to the identifier corresponding to the data that the central node wants to create based on the resource creation request, and the resource value refers to the content of the data created by the central node. Therefore, the central node can create the target data based on the resource identifier and resource value in the resource creation request.
[0065] In addition, after creating the target data, the central node needs to synchronize the data with the distributed nodes. Since the site identifier is a unique identifier for each distributed node, it can be used to determine which distributed node needs data synchronization. After determining the distributed node corresponding to the site identifier, the central node sends the resource identifier and resource value in a synchronization message to that distributed node through a one-way synchronization channel.
[0066] For example, the central node receives two resource creation requests. The first resource creation request includes: the site identifier of the first distributed site, the resource identifier of the first resource, and the resource value. The second resource creation request includes: the site identifier of the second distributed site, the resource identifier of the second resource, and the resource value. Therefore, based on the first resource creation request, the central node creates the first target data and then sends it to the first distributed site along with the resource identifier and resource value of the first resource in a synchronization message. This allows the first distributed site to perform the first target data synchronization process in its database based on the resource identifier and resource value of the first resource in the synchronization message. Additionally, the central node can also create the second target data based on the second resource creation request and then send it to the second distributed site along with the resource identifier and resource value of the second resource in a synchronization message. This allows the second distributed site to perform the second target data synchronization process in its database based on the resource identifier and resource value of the second resource in the synchronization message.
[0067] For example, the site identifier of the first distributed site can be 1001, the resource identifier of the first resource can be 2001, and the resource value can be A. The site identifier of the second distributed site can be 1002, the resource identifier of the second resource can be 2002, and the resource value can also be A. Based on the site identifier 1001, the resource identifier 2001, and the resource value A, first target data is created. The first target data includes: resource identifier 2001 and resource value A. The site identifier indicates that resource value A with resource identifier 2001 will be synchronized to site 1. Similarly, based on the site identifier 1002, the resource identifier 2002, and the resource value A, second target data is created. The second target data includes: resource identifier 2002 and resource value A. The site identifier indicates that resource value A with resource identifier 2002 will be synchronized to site 2. Thus, different distributed sites can be identified by the site identifier, different resources can be identified by the resource identifier, and the resource value represents the content of the resource.
[0068] S203. Distributed nodes obtain synchronization messages through a one-way synchronization channel and send the target data in the synchronization message to the database in the distributed nodes, so that the database can perform synchronization processing on the target data. This enables the distributed nodes to obtain the target data corresponding to the distributed nodes and then retrieve the target data from the database for corresponding processing.
[0069] In this embodiment, for example, the request body corresponding to the synchronization message mainly includes:
[0070] site_id Site Identifier String Used to identify distributed sites site_key Site Value String Name of the distributed site resource_id Resource Identifier String Used to identify data resource_key resource value String Data content
[0071] In this embodiment, after receiving the synchronization message exemplified above, the distributed node confirms whether the site identifier in the synchronization message is consistent with the site identifier corresponding to the distributed node. If it confirms that they are consistent, it sends the resource identifier and the target data corresponding to the resource identifier to the database in the distributed node so that the database can perform synchronization processing on the target data.
[0072] In this embodiment, the central node receives a resource creation request and, based on the request, creates target data corresponding to the resource identifier and resource value. This target data is then carried in a synchronization message and sent to the distributed node corresponding to the site identifier via a one-way synchronization channel. The distributed node receives the synchronization message through the same channel and, based on the message, sends the target data to its database for synchronization. This allows the distributed node to retrieve the target data from the database and perform corresponding processing. Because the central node actively synchronizes the target data to the database via the one-way synchronization channel after creation, the distributed nodes can directly retrieve the data from their internal database when they need to display or process it, without needing to request data from the central node. This improves data operation and management efficiency. Furthermore, the unified, single-direction synchronization channel between the central node and distributed nodes significantly reduces the complexity of the synchronization logic, preventing data inconsistencies between the central node and distributed nodes in hierarchical operation scenarios and effectively improving the operational and management efficiency of the Pass platform.
[0073] Figure 3 This is a flowchart illustrating a data operation management method provided in Embodiment 2 of this application. In the above... Figure 2 Based on the embodiments shown, such as Figure 3 As shown, one specific implementation of step S203 above is as follows:
[0074] S301. The distributed node obtains the synchronization message through a one-way synchronization channel, and adds the target data to the database in the distributed node according to the synchronization action in the synchronization message, and / or modifies or deletes the target data in the database in the distributed node.
[0075] In this embodiment, for example, the request body of the synchronization message may further include:
[0076]
[0077] In this embodiment, the transaction identifier can refer to the primary key of the synchronization message, which is used to identify different synchronization messages.
[0078] The synchronization message may further include synchronization actions, which may include, but are not limited to, adding, modifying, and deleting. For example, if the synchronization action is adding, the resource identifier and target data are stored in the database of the distributed nodes; if the synchronization action is modifying, the data is located in the database of the distributed nodes based on the resource identifier, and modified according to the target data; if the synchronization action is deleting, the data is located in the database of the distributed nodes based on the resource identifier, and the data is deleted. By synchronizing the data in the database of the distributed nodes according to the synchronization actions in the synchronization message, the data of the distributed nodes and the central node can be kept consistent, thus achieving data autonomy of the distributed nodes.
[0079] Figure 4 This is a flowchart illustrating a data operation management method provided in Embodiment 3 of this application. In the above... Figure 2 Based on the illustrated embodiments, as Figure 4 As shown, after step S203 above, the data operation and management method further includes:
[0080] S401. Distributed nodes obtain the storage response from the database and generate a feedback message when the storage response is a storage failure response.
[0081] In this embodiment, the storage response from the database includes success and failure. If the storage response from the database is success, it indicates that the data synchronization is successful and the synchronization ends. If the storage response from the database is failure, it indicates that the data synchronization has failed, and a feedback message needs to be generated to notify the central node.
[0082] S402. The distributed nodes send feedback messages to the central node, so that the central node can resend the target data to the distributed nodes through the one-way synchronization channel based on the feedback messages.
[0083] In this embodiment, the feedback message can determine that the target data synchronization has failed, and the central node is notified to resend the target data to the distributed nodes through the one-way synchronization channel, so that the distributed nodes can continue to complete the data synchronization operation, avoiding the problem of data inconsistency between the central node and the distributed nodes caused by the synchronization failure.
[0084] Figure 5 This is a flowchart illustrating a data operation management method provided in Embodiment 4 of this application. Figure 4 Based on the embodiments shown, such as Figure 5 As shown, one specific implementation of step S401 above is as follows:
[0085] S501. Distributed nodes obtain the storage response from the database, and when the storage response is a storage failure response, obtain the synchronization method, synchronization time, synchronization status, operator identifier, operation time, and synchronization dependency corresponding to the database's synchronization processing of the target data; wherein, the synchronization method represents the method by which the distributed nodes add, modify, or delete the target data, and the synchronization status includes success or failure; the synchronization dependency represents the relationship between the target data.
[0086] In this embodiment, for example, if adding a first administrator to a distributed node is successful, but adding a first user to the distributed node by the first administrator fails, the distributed node receives a feedback message from the database in the distributed node regarding the failure to add a first user, and obtains the corresponding synchronization method, synchronization time, synchronization status, operator identifier, operator time, and synchronization dependency. The corresponding synchronization method is the user addition method, the synchronization time is the time when the synchronization operation is executed, the synchronization status is failure, the operator is the first administrator, the operation time is the time when the first user to be added to the distributed node is added, and the synchronization dependency is the first administrator adding a first user.
[0087] S502. Distributed nodes generate feedback messages based on the synchronization method, synchronization time, synchronization status, operator identifier, operation time, and synchronization dependency.
[0088] In this embodiment, for example, the feedback message includes:
[0089]
[0090] In this embodiment, generating a feedback message can refer to obtaining the synchronization method, synchronization time, synchronization status, operator identifier, operation time, and synchronization dependency of the data that failed to synchronize, and encapsulating them into the feedback message body.
[0091] Figures 6A to 6B These are schematic flowcharts of a data operation management method provided in Embodiment 5 of this application. Figure 4 Based on the embodiments shown, such as Figure 6A As shown, one specific implementation of step S402 above is as follows:
[0092] S601a. If the central node determines that the synchronization status in the feedback message is failed.
[0093] S602a. Based on the feedback message, determine the target data for resynchronization.
[0094] S603a, Start timing, so that when the timing reaches the preset synchronization time, the target data to be resynchronized is sent to the distributed nodes through a one-way synchronization channel.
[0095] In this embodiment, for example, the preset synchronization time is 8:00 AM daily. When 8:00 AM arrives, the central node retrieves a feedback message indicating a synchronization failure from its corresponding database. Based on this feedback message, it determines the corresponding target data and performs a resynchronization operation. By periodically performing resynchronization, the workload of synchronization can be reduced, and the efficiency of data operation and management can be improved.
[0096] Or, such as Figure 6B As shown, another specific implementation of step S402 above is as follows:
[0097] S601b: If the central node determines that the synchronization status in the feedback message is failed.
[0098] S602b: Based on the feedback message, determine the target data for resynchronization.
[0099] S603b: Upon receiving a synchronization request, the target data for resynchronization is sent to the distributed nodes via a one-way synchronization channel.
[0100] In this embodiment, based on the received synchronization request, the target data that failed to synchronize can be synchronized in real time, thus avoiding the problem that data with real-time requirements cannot be synchronized in a timely manner.
[0101] Figure 7 A flowchart illustrating another data operation and management method provided in this application embodiment is shown below. Figure 7 As shown, this data operation and management method includes:
[0102] S701: Receive resource creation requests through the preset synchronization event receiving service of the central node.
[0103] In this embodiment, as Figure 7A As shown, the central node obtains resource creation requests from the central node user terminals, or, as... Figure 7B As shown, the central node receives resource creation requests from the distributed nodes.
[0104] S702. Based on the resource creation request, obtain the corresponding capability interface in the preset synchronous event receiving service of the central node, and complete the resource creation of the central node.
[0105] In this embodiment, a capability interface can refer to an interface that provides resource operation capabilities to the central node, including but not limited to interfaces for creating new user resources, creating new account resources, and creating new object model resources. For example, if the resource creation request is to add a new user resource, the corresponding capability interface is the interface for creating a new user resource.
[0106] S703. Obtain the target data from the resource creation request, encapsulate the target data into the request body preset by the synchronization interface, and obtain the synchronization message.
[0107] In this embodiment, the synchronization message includes a transaction identifier, a site identifier, a site value, a resource identifier, a resource value, a synchronization action, and a synchronization result. The transaction identifier represents a unique identifier for determining the synchronization message, the site identifier represents a unique identifier for the distributed site, the site value represents the name of the distributed site, the resource identifier represents a unique identifier for determining the data to be synchronized, the resource value represents the content of the data to be synchronized, the synchronization action includes adding, modifying, or deleting, and the initial value of the synchronization result is null.
[0108] S704. Synchronization messages are sent from the central node to the corresponding distributed node through a preset one-way synchronization channel between the central node and the distributed nodes.
[0109] In this embodiment, the preset one-way synchronization channel between the central node and the distributed nodes can refer to the central node acting as the server and the distributed nodes acting as the client. The central node and the distributed nodes establish a long connection using a Socket, and only data is allowed to be synchronized from the central node to the distributed nodes. Here, the Socket is an abstract layer through which the application can send or receive data and perform operations such as opening, reading, writing, and closing on it like a file.
[0110] S705: The corresponding distributed nodes complete the synchronization of the target data according to the synchronization message and feed back the synchronization result to the central node.
[0111] In this embodiment, if the target data is successfully synchronized, the synchronization result is "successful"; if the data synchronization fails, the synchronization result is "failure" and the synchronization result is returned to the central node.
[0112] S706. If the synchronization result fails, record the synchronization result information, respond to the synchronization request, and re-execute the synchronization operation of the synchronization message.
[0113] In this embodiment, the synchronization result information includes synchronization user, synchronization method, synchronization time, synchronization status, synchronization dependency, operator, and operation time. The synchronization user can refer to a user of the central node or a user of a distributed node; the synchronization method can refer to the method by which the distributed node performs the synchronization action, for example, including add, modify, and delete methods; the synchronization time can refer to the time when the synchronization operation is performed; the synchronization status is initially empty, and after the synchronization operation is completed, the synchronization status is determined to be successful or unsuccessful based on the synchronization result; the synchronization dependency can refer to the relationship between synchronized data; the operator can refer to the user who created the synchronization action; and the operation time can refer to the time when the synchronization action is performed.
[0114] S707. If the synchronization result is a synchronization failure, record the synchronization result information and re-execute the synchronization operation of the synchronization message within a preset period.
[0115] Figure 8 This is a schematic diagram of the structure of a data operation management device provided in an embodiment of this application. Figure 8 As shown, the data operation and management device 80 includes: an acquisition module 801, a synchronization module 802, and a processing module 803. Wherein:
[0116] The acquisition module 801 is used by the central node to acquire resource creation requests, which include site identifier, resource identifier and resource value.
[0117] The synchronization module 802 is used by the central node to create target data corresponding to the resource identifier and resource value according to the resource creation request, and to send the target data in the synchronization message through the one-way synchronization channel corresponding to the distributed node corresponding to the site identifier.
[0118] The processing module 803 is used for distributed nodes to obtain synchronization messages through a one-way synchronization channel, and to send the target data in the synchronization message to the database in the distributed nodes according to the synchronization message, so that the database can perform synchronization processing on the target data, so that the distributed nodes can obtain the target data corresponding to the distributed nodes and retrieve the target data from the database for corresponding processing.
[0119] In this embodiment of the application, the acquisition module 801 can also be specifically used for:
[0120] The central node receives resource creation requests sent by user terminals;
[0121] or,
[0122] The central node receives resource creation requests uploaded by distributed nodes. These resource creation requests are requests sent from user terminals to distributed nodes.
[0123] In this embodiment of the application, the synchronization module 802 can also be specifically used for:
[0124] If the central node determines that the synchronization status in the feedback message is a failure, it determines the target data for resynchronization based on the feedback message and starts a timer. When the timer reaches the preset synchronization time, the target data for resynchronization is sent to the distributed nodes through a one-way synchronization channel.
[0125] or,
[0126] If the central node determines that the synchronization status in the feedback message is a failure, it determines the target data for resynchronization based on the feedback message, and sends the target data for resynchronization to the distributed nodes through a one-way synchronization channel when it receives a synchronization request.
[0127] In this embodiment of the application, the processing module 803 may also be specifically used for:
[0128] Based on the synchronization action in the synchronization message, the resource identifier and target data are added to the database in the distributed node, and / or the resource identifier and target data are modified or deleted in the database in the distributed node.
[0129] In this embodiment of the application, the processing module 803 may also be specifically used for:
[0130] Distributed nodes obtain the storage response from the database and generate a feedback message when the storage response is a storage failure response;
[0131] The distributed nodes send feedback messages to the central node, so that the central node can resend the target data to the distributed nodes through a one-way synchronization channel based on the feedback messages.
[0132] In this embodiment of the application, the processing module 803 may also be specifically used for:
[0133] Distributed nodes obtain the storage response from the database, and when the storage response is a storage failure response, they obtain the synchronization method, synchronization time, synchronization status, operator identifier, operation time, and synchronization dependencies corresponding to the database's synchronization processing of the target data. Among them, the synchronization method represents the method by which the distributed node adds, modifies, or deletes the target data, and the synchronization status includes success or failure; the synchronization dependencies represent the relationships between the target data.
[0134] Distributed nodes generate feedback messages based on the synchronization method, synchronization time, synchronization status, operator identifier, operation time, and synchronization dependency.
[0135] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 9 As shown, the electronic device 90 includes:
[0136] The electronic device 90 may include a processor 901 with one or more processing cores, a memory 902 with one or more computer-readable storage media, a communication component 903, and other components. The processor 901, memory 902, and communication component 903 are connected via a bus 904.
[0137] In the specific implementation process, at least one processor 901 executes computer execution instructions stored in memory 902, causing at least one processor 901 to perform the resource planning processing method described above.
[0138] The specific implementation process of processor 901 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.
[0139] In the above Figure 9 In the illustrated embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.
[0140] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.
[0141] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0142] In some embodiments, a computer program product is also provided, including a computer program or instructions that, when executed by a processor, implement the steps in any of the above-described data operation management methods.
[0143] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0144] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.
Claims
1. A data operation and management method, characterized in that, This method is applied to an operation management platform in a PaaS tiered operation scenario. The operation management platform includes a central node and multiple distributed nodes, with each central node pre-establishing a one-way synchronization channel with each distributed node for data distribution. The central node is used for centralized management of operational resources, and the distributed nodes are used for displaying or processing locally stored data. The method includes: The central node obtains a resource creation request, which includes a site identifier for identifying the target distributed node to be synchronized, a resource identifier for identifying the type of resource to be created, and a resource value for representing the content of the resource. The central node creates target data corresponding to the resource identifier and the resource value based on the resource identifier and the resource value; The central node determines the target distributed node corresponding to the site identifier based on the site identifier, carries the target data in a synchronization message, and actively sends the synchronization message to the target distributed node through the one-way synchronization channel between the target distributed nodes corresponding to the site identifier; the synchronization message also includes a transaction identifier and a synchronization action, and the synchronization action includes adding, modifying, and / or deleting. The target distributed node receives the synchronization message through the one-way synchronization channel, and according to the synchronization action in the synchronization message, persists the target data in the synchronization message to the local database in the target distributed node, and / or modifies or deletes the target data in the local database; The target distributed node obtains the storage response from the local database, and when the storage response is a storage failure response, generates a feedback message and sends the feedback message to the central node. Based on the feedback message, the central node resends the target data to the target distributed node through the one-way synchronization channel; When the target distributed node needs to obtain the target data corresponding to the target distributed node, the target distributed node directly obtains the target data from the local database and performs corresponding display or processing based on the target data, so as to realize the data autonomy of each distributed node in the PaaS hierarchical operation scenario.
2. The method according to claim 1, characterized in that, The target distributed node obtains the storage response from the local database, and when the storage response is a storage failure response, generates a feedback message, including: The target distributed node obtains the storage response from the local database, and when the storage response is a storage failure response, obtains the synchronization method, synchronization time, synchronization status, operator identifier, operation time, and synchronization dependency corresponding to the local database's synchronization processing of the target data; wherein, the synchronization method represents the method by which the target distributed node adds, modifies, or deletes the target data, the synchronization status includes success or failure, and the synchronization dependency represents the relationship between the target data; The target distributed node generates the feedback message based on the synchronization method, synchronization time, synchronization status, operator identifier, operation time, and synchronization dependency.
3. The method according to claim 1, characterized in that, The central node, based on the feedback message, resends the target data to the target distributed node through the one-way synchronization channel, including: If the central node determines that the synchronization status in the feedback message is a failure, it determines the target data for resynchronization based on the feedback message and starts a timer so that when the timer reaches the preset synchronization time, the target data for resynchronization is sent to the target distributed node through the one-way synchronization channel. or, If the central node determines that the synchronization status in the feedback message is a failure, it determines the target data for resynchronization based on the feedback message, and sends the target data for resynchronization to the target distributed node through the one-way synchronization channel when it receives a synchronization request.
4. The method according to any one of claims 1 to 3, characterized in that, The central node obtains resource creation requests, including: The central node receives resource creation requests sent by user terminals; or, The central node receives a resource creation request uploaded by the target distributed node, and the resource creation request is a request sent by the user terminal to the target distributed node.
5. The method according to any one of claims 1 to 3, characterized in that, The resource identifiers include: user resource identifiers, account resource identifiers, and / or model resource identifiers.
6. A data operation management device, characterized in that, This device is applied to an operation management platform in a PaaS tiered operation scenario. The operation management platform includes a central node and multiple distributed nodes, with each central node pre-establishing a unidirectional synchronization channel with each distributed node for data distribution. The central node is used for centralized management of operational resources, and the distributed nodes are used for displaying or processing locally stored data. The device includes: The acquisition module is used by the central node to acquire resource creation requests. The resource creation requests include a site identifier for identifying the target distributed node to be synchronized, a resource identifier for identifying the type of resource to be created, and a resource value for representing the content of the resource. The synchronization module is used for the central node to create target data corresponding to the resource identifier and the resource value based on the resource identifier and the resource value; the central node to determine the target distributed node corresponding to the site identifier based on the site identifier, and to carry the target data in a synchronization message, and to actively send the synchronization message to the target distributed node through the one-way synchronization channel between the target distributed nodes corresponding to the site identifier; the synchronization message also includes a transaction identifier and a synchronization action, and the synchronization action includes adding, modifying and / or deleting. The processing module is configured to: allow the target distributed node to receive the synchronization message through the one-way synchronization channel; persist the target data in the synchronization message to its local database according to the synchronization action in the synchronization message; and / or modify or delete the target data in the local database. The target distributed node obtains the storage response from the local database, and if the storage response is a storage failure response, generates a feedback message and sends it to the central node. The central node, based on the feedback message, resends the target data to the target distributed node through the one-way synchronization channel. When the target distributed node needs to obtain the target data corresponding to itself, it directly retrieves the target data from the local database and performs corresponding display or processing based on the target data, thereby achieving data autonomy for each distributed node in the PaaS tiered operation scenario.
7. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Distributed communication system and method
CN116361037A