Data subscription method and apparatus, electronic device, and storage medium

By setting up a subscription management unit in a dedicated data processor, unified data subscription management is provided for data nodes, solving the problems of network resource waste and increased database load caused by the communication methods of data nodes in the service mesh, and realizing efficient data subscription and application scalability.

CN117668078BActive Publication Date: 2026-11-20YUSUR TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311649847.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-04
Publication Date
2026-11-20
Estimated Expiration
2043-12-04

AI Technical Summary

Technical Problem

The communication methods between data nodes in the service mesh lead to excessive burden on backbone routing links and increased database load. Existing technologies cannot efficiently manage data subscriptions, resulting in wasted network resources and latency issues.

Method used

A subscription management unit is set up in a dedicated data processor to provide unified data subscription management for data nodes. Subscribed data is pushed to the target service via multicast, reducing database connection links and improving data subscription processing efficiency.

Benefits of technology

It improves data subscription processing efficiency, reduces connection links between databases and data nodes, lowers runtime load, and enhances application scalability and data subscription accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117668078B_ABST
    Figure CN117668078B_ABST
Patent Text Reader

Abstract

The present disclosure provides a data subscription method and device, electronic equipment and storage medium, which are applied to a special data processor coupled with a data node. The method comprises: obtaining a subscription request from any one data service of the data node through a subscription management unit in the special data processor, identifying subscription information of the subscription request to determine a subscription group of the subscription request, and pushing the subscription request to at least one database, or obtaining subscription data from the at least one database, determining a target subscription group corresponding to the subscription data in each subscription group, determining all target services associated with the target subscription group from each data service, and pushing the subscription data to each target service. In this way, the present application provides data subscription management for each data service in the data node by setting a subscription management unit in the special data processor, which can improve the data subscription processing efficiency and reduce the running load of the data node and the database.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer processing technology, and in particular to a data subscription method, apparatus, electronic device, and storage medium. Background Technology

[0002] A service mesh is an infrastructure layer for communication between cloud-native microservices, responsible for controlling how different parts of an application share data. A service mesh typically consists of two components: a control plane and a data plane. The control plane handles functions such as service discovery, load balancing, traffic management, and health checks, while the data plane is responsible for the actual request forwarding and processing.

[0003] Currently, the communication methods between data nodes in a service mesh mainly include unicast, broadcast, and multicast. Unicast is a point-to-point data transmission service. When a data source needs to send data to multiple hosts, it requires extensive duplication of the same data and transmission to each host via the backbone router, placing a significant burden on the backbone routing links. Broadcast, by designating all hosts in the broadcast domain as target hosts and actively transmitting the data source to each target host in the broadcast domain, regardless of whether each target host needs this data source information, still results in a significant waste of data links.

[0004] Furthermore, when requesting data from a remote database, each network data node needs to establish an independent connection link with the database, which can easily increase the database load and cause data transmission delays. Summary of the Invention

[0005] In view of this, embodiments of this application provide a data subscription scheme that provides data subscription management for each service node in the data node through a subscription management unit in a dedicated data processor, thereby improving the efficiency of data subscription processing.

[0006] According to a first aspect of the embodiments of this application, a data subscription method is provided, applied to a dedicated data processor coupled to a data node. The dedicated data processor includes a subscription management unit and is connected to at least one database. The dedicated data processor provides data subscription management for multiple data services in the data node through the subscription management unit. The method includes: obtaining a subscription request from any one of the data services of the data node through the subscription management unit and performing a first subscription management operation, or obtaining subscription data from the at least one database and performing a second subscription management operation; wherein the first subscription management operation includes: identifying subscription information of the subscription request to determine the subscription group of the subscription request, and pushing the subscription request to the at least one database; the second subscription management operation includes: determining a target subscription group corresponding to the subscription data from each subscription group, determining all target services associated with the target subscription group from each data service of the data node, and pushing the subscription data to each target service.

[0007] According to a second aspect of the embodiments of this application, a data subscription apparatus is provided, applied to a dedicated data processor coupled to a data node. The dedicated data processor includes a subscription management unit and is connected to at least one database. The dedicated data processor provides data subscription management for multiple data services in the data node through the subscription management unit. The apparatus includes: an acquisition module, configured to acquire a subscription request from any data service of the data node or acquire subscription data from the at least one database through the subscription management unit; and an execution module, configured to identify the subscription information of the subscription request through the subscription management unit to determine the subscription group of the subscription request and push the subscription request to the at least one database, or determine a target subscription group corresponding to the subscription data from each subscription group, determine all target services associated with the target subscription group from each data service of the data node, and push the subscription data to each target service.

[0008] According to a third aspect of the present application, an electronic device is provided, comprising: a memory and a processor, wherein the memory stores a computer program that, when executed by the processor, implements the data subscription method as described in the first aspect.

[0009] According to a fourth aspect of the embodiments of this application, a computer storage medium is provided, the computer storage medium storing computer program code, which, when executed by a processor, causes the processor to perform the data subscription method as described in the first aspect.

[0010] In summary, the data subscription scheme provided in this application, by setting up a subscription management unit in a dedicated data processor, allows each data service in the data node to communicate with the database through the subscription management unit, and the subscription management unit pushes the subscribed data in the database to each data service based on multicast. This not only improves the efficiency of data subscription processing, but also reduces the connection links between the database and the data node, thereby reducing the operating load. Attached Figure Description

[0011] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings.

[0012] Figure 1 This is a schematic diagram of the data subscription architecture under the traditional sidecar deployment model.

[0013] Figure 2 This is a schematic diagram of a centralized service mesh architecture.

[0014] Figure 3 A schematic diagram of the architecture for implementing the data subscription methods or apparatus of the various embodiments of this application.

[0015] Figure 4 A flowchart illustrating the data subscription method as an exemplary embodiment of this application.

[0016] Figure 5 This is a structural block diagram of a data subscription device that is an exemplary embodiment of this application.

[0017] Figure 6 This is a structural block diagram of an electronic device that is an exemplary embodiment of this application. Detailed Implementation

[0018] To enable those skilled in the art to better understand the technical solutions in the embodiments of this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art should fall within the protection scope of the embodiments of this application.

[0019] A dedicated data processing unit (DPU) is a dedicated processor built around data. By offloading the workload that is "inefficient for CPU processing and cannot be handled by GPU" to a dedicated DPU, the efficiency of the entire computing system can be improved and the total cost of ownership (TOC) of the overall system can be reduced.

[0020] With the increasing popularity of cloud-native microservice architecture, service mesh, as a dedicated infrastructure layer for communication between microservices, is responsible for controlling data sharing between different parts of an application. Service mesh typically consists of two components: a control plane and a data plane. The control plane is responsible for functions such as service discovery, load balancing, traffic management, and health checks, while the data plane is responsible for the actual request forwarding and processing.

[0021] refer to Figure 1 Traditional service mesh 100 employs a sidecar deployment model, where each microservice (POD) is configured with a sidecar. For example, microservice 104A corresponds to sidecar 106A, and microservice 104B corresponds to sidecar 106B. Each sidecar (e.g., sidecar 106A and sidecar 106B) serves as the service mesh data plane and can reside in the same container cluster (e.g., a Kubernetes cluster) as the service mesh control plane 102. The service mesh control plane 102 can obtain the operation logs of the mesh service data plane through an internal cluster API. Because the traditional service mesh 100 has a large number of sidecars, it undoubtedly consumes significant host resources, easily leading to microservice latency and reduced traffic processing efficiency.

[0022] Furthermore, in the sidecar deployment mode, each microservice 104A and 104B needs to establish a connection link with the remote database 110 to obtain data. This results in a large number of connection links for database 110, causing excessive load on database 110 and reducing the data transmission efficiency of database 110.

[0023] Based on the various problems existing in the traditional sidecar deployment mode, this application adopts a centralized service mesh mode, and improves the data subscription processing efficiency by setting up a subscription management unit in a dedicated data processor to provide unified data subscription management for each data service (POD) in the data node.

[0024] The specific implementations of the embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0025] Figure 2A schematic diagram of the centralized service mesh architecture is shown. As shown, the centralized service mesh architecture sets up a centralized proxy 206 in the dedicated data processor 205 that communicates with the service mesh control plane 202. This adopts a one-to-many proxy mechanism to replace the one-to-one proxy mechanism in the traditional sidecar deployment mode. This allows the traffic of each microservice (e.g., microservice 204A, microservice 204B) in the data node to be uniformly processed and forwarded by the centralized proxy 206 in the dedicated data processor 205. This not only improves the traffic forwarding efficiency but also effectively reduces network latency.

[0026] Figure 3 This is a schematic diagram illustrating the architecture of the data subscription method or apparatus for implementing the various embodiments of this application. (See attached diagram.) Figure 3 As shown, the system architecture 300 mainly includes a data node 310 and a dedicated data processor 320 coupled to the data node 310.

[0027] Data node 310 includes multiple data services (PODs) 312A, 312B, 312C, and 312D. A subscription management unit 322 is deployed on a dedicated data processor 320. The subscription management unit 322 can be located on the SoC side of the dedicated data processor 320 and communicates with one or more databases 330A and 330B to provide data subscription management for each data service 312A, 312B, 312C, and 312D in data node 310.

[0028] Databases 330A and 330B can be located at the near or far end of the dedicated data processor 320. The number of databases connected to the subscription management system and the number of data services in data node 310 are not limited by... Figure 3 The figures shown are for illustrative purposes only, and those skilled in the art may add or subtract them as needed.

[0029] pass Figure 3 The system architecture 300 shown allows all traffic from the centralized service mesh to pass through a dedicated data processor (DPU). Once the DPU establishes a connection with the database, it can uniformly proxy all subscription requests sent to the database by all data services (PODs) in the data nodes. The DPU then obtains the subscription data from the database and distributes it to each data service in the data nodes via multicast, thereby improving the processing efficiency of data subscription.

[0030] Furthermore, compared to traditional sidecar deployment models, the centralized service mesh adopted in this embodiment reduces the number of connection links between the database and various data services, enabling simpler data synchronization. Simultaneously, even when the number of data services (PODs) in the data nodes increases, the number of connection links between the database and servers remains unaffected, improving the scalability of applications within the data nodes.

[0031] like Figure 4 As shown, according to an embodiment of this disclosure, a data subscription method 400 is provided, which mainly includes the following steps:

[0032] Step 402: Obtain subscription requests from data nodes or subscription data from the database through the subscription management unit, and continue to execute step 404 or step 406.

[0033] In some embodiments, the subscription management unit 322 of the dedicated data processor 320 can obtain subscription requests from any of the data services 312A, 312B, 312C, 312D of the data node 310.

[0034] In some embodiments, the subscription management unit 322 includes a subscription request queue.

[0035] Data node 310 can submit each subscription request to the subscription request queue of subscription management unit 322 in sequence according to the order of each request corresponding to each subscription request, and subscription management unit 322 can retrieve a subscription request from the subscription request queue in sequence according to the submission order of each subscription request in the subscription request queue.

[0036] In some embodiments, the subscription management unit 322 includes a subscription data queue.

[0037] The dedicated data processor 320 can sequentially submit each subscription data to the subscription data queue according to the acquisition order corresponding to each subscription data, and the subscription management unit 322 can sequentially retrieve one subscription data from the subscription data queue according to the submission order of each subscription data in the subscription data queue.

[0038] Step 404: Through the subscription management unit, identify the subscription information of the subscription request to determine the subscription group of the subscription request, and push the subscription request to at least one database.

[0039] In some embodiments, the subscription management unit 322 performs a first subscription management operation based on each subscription request sequentially obtained from the subscription request queue.

[0040] In some embodiments, the first subscription management operation performed by the subscription management unit 322 includes: identifying the subscription object, subscription database, and subscription topic of the subscription request; determining the subscription group of the subscription request based on the subscription database and subscription topic; associating the data service corresponding to the subscription object with the subscription group; determining at least one target database corresponding to the subscription database from at least one database; and pushing the subscription request to at least one target database.

[0041] In this embodiment, the subscription object of the subscription request corresponds to one of the data services that sent the subscription request among multiple data services. For example, when subscription request A is sent by data service 312A, data service 312A is determined as the subscription object of subscription request A; when subscription request B is sent by data service 312C, data service 312C is determined as the subscription object of subscription request B.

[0042] In this embodiment, the subscription topic is used to identify the topic name of the subscribed data. For example, the subscription topic for the data "temperature" is "weather".

[0043] In some embodiments, the subscription management unit 322 includes a subscription management table 323 for storing the subscription object, subscription database, subscription topic, and subscription group for each subscription request.

[0044] For example, subscription management table 323 is shown in Table 1 below:

[0045] Subscription Request Subscription Object Subscribe to database Subscribe to topics Subscription Groups Subscription Request A Data Service 312A Database 330A weather Group A Subscription Request B Data Service 312C Database 330B transportation Group B Subscription Request C Data Service 312D Database 330A weather Group A … … … … …

[0046] (Table 1)

[0047] In some embodiments, for one pending subscription request among all subscription requests (e.g., subscription request A is identified as a pending subscription request), the subscription database and subscription topic of the pending subscription request (subscription request A) can be matched with the subscription database and subscription topic of each subscription request in the subscription management table. If there is a subscription request in the subscription management table that matches the pending subscription request (e.g., subscription request C), the subscription group of the subscription request (subscription request C) that matches the pending subscription request (subscription request A) is identified as the subscription group of the pending subscription request. If there is no subscription request in the subscription management table that matches the pending subscription request, a new subscription group is generated for the pending subscription request, and the pending subscription request, its subscription object, subscription database, subscription topic, and subscription group are stored in the subscription management table.

[0048] For example, as shown in Table 1 above, the subscription database and subscription topic of each subscription request belonging to the same subscription group should be the same, while the request object (i.e., data service) of each subscription request belonging to the same subscription group should be different. For example, subscription request A and subscription request C both belong to "Group A", the subscription database of subscription request A and subscription C are both "database 330A", and the subscription topic is "weather" for both. However, the subscription object of subscription request A is "data service 312A", while the subscription object of subscription request C is "data service 312D".

[0049] In some embodiments, the subscription management table may also store the communication interface for each subscription request. Specifically, in this embodiment, each data service may include at least one communication interface, which is used to identify the communication link between the data service and the subscription management unit. For example, if subscription request A is sent by data service 312A to the subscription management unit 322 of the dedicated data processor 320 through communication interface B, then data service 312A will still obtain the subscription data of subscription request A from the subscription management unit 322 through communication interface B.

[0050] In some embodiments, once the first subscription management operation on a subscription request (e.g., subscription request A) is completed, the completed subscription request (subscription request A) can be removed from the subscription request queue.

[0051] Step 406: Through the subscription management unit, determine the target subscription group corresponding to the subscription data from each subscription group, determine all target services associated with the target subscription group from each data service of the data node, and push the subscription data to each target service.

[0052] In some embodiments, the subscription management unit 322 may perform a second subscription management operation based on each subscription data obtained sequentially from the subscription data queue.

[0053] In some embodiments, the second subscription management operation performed by the subscription management unit 322 includes: identifying the subscription database and subscription topic of the subscription data, determining the target subscription group of the subscription data from each subscription group, and determining all target services associated with the target subscription group from multiple data services, so as to push the subscription data to each target service.

[0054] For example, when the subscription database for subscription data A is identified as "Database 330A" and the subscription topic is "Weather", the subscription group for subscription data A can be determined as "Group A" by querying the subscription management table (e.g., Table 1 above). Each service data associated with "Group A" (i.e., service data 312A and data service 312D) can be queried from the subscription management table, and subscription data A can be pushed to service data 312A and data service 312D.

[0055] In some embodiments, the subscription management unit 322 monitors the database based on the subscription topic of the subscription request. When the data value of the monitored subscription topic changes, the updated data of the subscription topic is retrieved from databases 330A and 330B. Then, based on all target services associated with the subscription group of the subscription request in each data service, the updated data of the subscription topic is pushed to each target service. This incremental data push mechanism ensures the consistency of subscription data across different data services.

[0056] For example, referring to Table 1, the subscription management unit 322 monitors the "Weather" topic in database 330A based on the subscription database and subscription topic in subscription request A. When the value under the monitored "Weather" topic changes, the updated data under the "Weather" topic is retrieved from database 330A and used as subscription data A for subscription request A. The subscription management table (Table 1) can be queried to obtain the data services associated with the subscription group "Group A" of subscription request A, including data service 312A and data service 312D. The updated data under the "Weather" topic (subscription data A for subscription request A) retrieved from database 330A is then pushed to data service 312A and data service 312D.

[0057] In some embodiments, after completing the second subscription management operation on the subscription data (e.g., subscription data A), the completed subscription data (subscription data A) is removed from the subscription data queue.

[0058] The data subscription method provided in this embodiment provides unified data subscription management for each data service in the data node through the subscription management unit in the dedicated data processor, thereby improving the efficiency of data subscription execution.

[0059] The data subscription method provided in this embodiment, by deploying a centralized proxy on a dedicated data processor, allows the service mesh data plane to reside on the SoC side of the DPU, rather than on the data nodes, thus saving data node computing resources. Specifically, in the sidecar deployment mode, the sidecar consumes a significant amount of host resources, reducing traffic processing efficiency. This embodiment, by deploying a centralized proxy with a one-to-many mechanism on the DPU, compared to the one-to-one sidecar deployment mode, allows the centralized proxy to no longer reside on the host (e.g., a data node in a Kubernetes container cluster). Since the host's service traffic is forwarded and processed by the centralized proxy on the DPU, this not only increases the number of services that can be deployed but also effectively saves host resources.

[0060] The data subscription method provided in this embodiment establishes a connection with the database through a subscription management unit in a dedicated data processor and executes data subscription queries. Each data service (POD) deployed in the data node no longer needs to establish a separate connection with the database, reducing both the number of database connection links and the number of times each data service queries the database, effectively reducing the database's operational load. Furthermore, even if the number of data services (PODs) in the data node increases, the number of server connections will not increase, improving the scalability of applications in the data node.

[0061] The data subscription method provided in this embodiment performs data caching and distribution processing through a queue design mechanism (subscription request queue and subscription data queue). This not only further reduces the number of interactions between the database and the dedicated data processor, but also allows the dedicated data processor to be used only as a data distribution channel without performing data storage, thereby saving the DPU resources occupied by the data subscription management task.

[0062] The data subscription method provided in this embodiment sets a subscription group for each subscription request, so that the subscription manager can transmit the subscription data in a multicast manner, ensuring that each data service in the subscription group can receive the subscription data and ensuring the accuracy of data subscription.

[0063] The data subscription method provided in this embodiment obtains the updated data of the subscribed topic in a timely manner by periodically monitoring the changes in values ​​in the database, and pushes the updated data to the corresponding data service in an incremental manner to ensure the consistency and timeliness of the subscribed data.

[0064] Figure 5This is a structural block diagram of a data subscription device 500, which is an exemplary embodiment of this application. The data subscription device 500 of this embodiment is applied to a dedicated data processor 320 coupled to a data node 310. The dedicated data processor 320 includes a subscription management unit 322 and is connected to at least one database 330A and 330B. The dedicated data processor provides data subscription management for multiple data services 312A to 312D in the data node 310 through the subscription management unit 322.

[0065] like Figure 5 As shown, the data subscription device 500 in this embodiment mainly includes:

[0066] The acquisition module 502 is used to acquire a subscription request from any data service of the data node or acquire subscription data from the at least one database through the subscription management unit.

[0067] The execution module 504 is configured to identify the subscription information of the subscription request through the subscription management unit, determine the subscription group of the subscription request, push the subscription request to the at least one database, or determine the target subscription group corresponding to the subscription data from each subscription group, determine all target services associated with the target subscription group from each data service of the data node, and push the subscription data to each target service.

[0068] Optionally, the execution module 504 is further configured to: identify the subscription object, subscription database, and subscription topic of the subscription request, wherein the subscription object corresponds to one of the multiple data services that sent the subscription request; determine the subscription group of the subscription request based on the subscription database and the subscription topic, and associate the data service corresponding to the subscription object with the subscription group; determine at least one target database corresponding to the subscription database from the at least one database, and push the subscription request to the at least one target database.

[0069] Optionally, the subscription management unit includes a subscription management table for storing the subscription object, subscription database, subscription topic, and subscription group for each subscription request.

[0070] Optionally, the execution module 504 is further configured to: for one pending subscription request among the subscription requests, match the subscription database and subscription topic of the pending subscription request with the subscription database and subscription topic of each subscription request in the subscription management table; if there is a subscription request in the subscription management table that matches the pending subscription request, determine the subscription group of the subscription request that matches the pending subscription request as the subscription group of the pending subscription request; if there is no subscription request in the subscription management table that matches the pending subscription request, generate a new subscription group for the pending subscription request; and store the pending subscription request and its subscription object, subscription database, subscription topic, and subscription group in the subscription management table.

[0071] Optionally, the execution module 504 is further configured to: identify the subscription database and subscription topic of the subscription data; determine the target subscription group of the subscription data from each subscription group; determine all target services associated with the target subscription group from the plurality of data services; and push the subscription data to each target service.

[0072] Optionally, the execution module 504 is further configured to: monitor the at least one database according to the subscription topic of the subscription request through the subscription management unit; when the data value of the subscription topic changes, obtain the updated data of the subscription topic from the at least one database; and push the updated data of the subscription topic to each target service according to all target services associated with the subscription group of the subscription request in each data service.

[0073] Optionally, the subscription management unit includes a subscription request queue; the acquisition module 502 is further configured to: submit each subscription request to the subscription request queue sequentially according to the order of each request corresponding to each subscription request through the data node; acquire a subscription request sequentially from the subscription request queue according to the submission order of each subscription request in the subscription request queue through the subscription management unit; perform the first subscription management operation on the acquired subscription request; and remove the acquired subscription request from the subscription request queue after completing the first subscription management operation.

[0074] Optionally, the subscription management unit includes a subscription data queue, and the acquisition module 502 is further configured to: submit each subscription data to the subscription data queue sequentially according to the acquisition order corresponding to each subscription data through the dedicated data processor; acquire one subscription data sequentially from the subscription data queue according to the submission order of each subscription data in the subscription data queue through the subscription management unit; perform the second subscription management operation on the acquired subscription data; and remove the acquired subscription data from the subscription data queue after completing the second subscription management operation.

[0075] This disclosure provides a computer storage medium storing computer program code. When the computer program code is run by a processor, the processor executes the data subscription method described in the embodiments of this application.

[0076] An exemplary embodiment of this disclosure provides an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor. The memory stores a computer program executable by the at least one processor, the computer program, when executed by the at least one processor, causing the electronic device to perform a data subscription method according to various exemplary embodiments of this disclosure.

[0077] Please refer to Figure 6 The present invention describes a structural block diagram of an electronic device 600 that can serve as a server or client of this disclosure, which is an example of a hardware device that can be applied to various aspects of this disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the disclosure described and / or claimed herein.

[0078] like Figure 6 As shown, the electronic device 600 includes a computing unit 601, which can perform various appropriate actions and processes based on a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. The RAM 603 may also store various programs and data required for the operation of the device 600. The computing unit 601, ROM 602, and RAM 603 are interconnected via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0079] Multiple components in electronic device 600 are connected to I / O interface 605, including: input unit 606, output unit 607, storage unit 608, and communication unit 609. Input unit 606 can be any type of device capable of inputting information to electronic device 600. Input unit 606 can receive input digital or character information and generate key signal inputs related to user settings and / or function control of electronic device. Output unit 607 can be any type of device capable of presenting information and may include, but is not limited to, a display, speaker, video / audio output terminal, vibrator, and / or printer. Storage unit 608 may include, but is not limited to, disks and optical discs. Communication unit 609 allows electronic device 600 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers, and / or chipsets, such as Bluetooth™ devices, WiFi devices, WiMax devices, cellular communication devices, and / or the like.

[0080] The computing unit 601 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 601 performs the various methods and processes described above. For example, in some embodiments, the data subscription method described above can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 600 via ROM 602 and / or communication unit 609. In some embodiments, the computing unit 601 can be configured to perform the data subscription method described above by any other suitable means (e.g., by means of firmware).

[0081] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0082] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0083] As used in this disclosure, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, device, and / or apparatus (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including machine-readable media that receive machine instructions as machine-readable signals. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.

[0084] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0085] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data subscription terminal), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0086] Computer systems can include clients and servers. Clients and servers are generally geographically separated and typically interact via a communication network. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other.

[0087] It should be noted that, depending on the implementation needs, the various components / steps described in the embodiments of this disclosure can be broken down into more components / steps, or two or more components / steps or parts of the operation of components / steps can be combined into new components / steps to achieve the purpose of the embodiments of this disclosure.

[0088] The above embodiments are only used to illustrate the embodiments of this disclosure, and are not intended to limit the embodiments of this disclosure. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the embodiments of this disclosure. Therefore, all equivalent technical solutions also fall within the scope of the embodiments of this disclosure, and the patent protection scope of the embodiments of this disclosure should be defined by the claims.

Claims

1. A data subscription method, characterized in that, A dedicated data processor is applied to coupled data nodes. The dedicated data processor includes a subscription management unit, which is a centralized agent deployed on the SoC side of the dedicated data processor. This agent replaces the one-to-one agent mechanism in traditional sidecar deployments with a one-to-many agent mechanism and connects to at least one database. The dedicated data processor provides data subscription management for multiple data services in the data nodes through the subscription management unit. The method includes: The subscription management unit retrieves a subscription request from any data service of the data node and executes a first subscription management operation, or retrieves subscription data from the at least one database and executes a second subscription management operation; wherein, The first subscription management operation includes: identifying the subscription object, subscription database, and subscription topic of the subscription request, wherein the subscription object corresponds to one of the multiple data services that sent the subscription request; determining the subscription group of the subscription request based on the subscription database and the subscription topic, and associating the data service corresponding to the subscription object with the subscription group; determining at least one target database corresponding to the subscription database from the at least one database, and pushing the subscription request to the at least one target database; The second subscription management operation includes: determining the target subscription group corresponding to the subscription data from each subscription group, determining all target services associated with the target subscription group from each data service of the data node, and pushing the subscription data to each target service; The subscription management unit monitors at least one database based on the subscription topic of the subscription request. When the data value of the subscription topic changes, it retrieves the updated data of the subscription topic from the at least one database. Based on all target services associated with the subscription group of the subscription request in each data service, it pushes the updated data of the subscription topic to each target service.

2. The method according to claim 1, characterized in that, The subscription management unit includes a subscription management table, which stores the subscription object, subscription database, subscription topic, and subscription group for each subscription request; The step of determining the subscription group of the subscription request based on the subscription database and the subscription topic includes: For one pending subscription request among all subscription requests The subscription database and subscription topic of the pending subscription request are matched with the subscription database and subscription topic of each subscription request in the subscription management table; If a subscription request that matches the pending subscription request exists in the subscription management table, the subscription group of the subscription request that matches the pending subscription request is determined as the subscription group of the pending subscription request. If no subscription request that matches the pending subscription request exists in the subscription management table, a new subscription group is generated for the pending subscription request. The pending subscription requests, along with their subscription objects, subscription databases, subscription topics, and subscription groups, are stored in the subscription management table.

3. The method according to claim 1, characterized in that, The step of determining the target subscription group corresponding to the subscription data from each subscription group, determining all target services associated with the target subscription group from each data service of the data node, and pushing the subscription data to each target service includes: Identify the subscription database and subscription topic of the subscription data, and determine the target subscription group of the subscription data from each subscription group; From the plurality of data services, identify all target services associated with the target subscription group, and push the subscription data to each target service.

4. The method according to claim 1, characterized in that, The subscription management unit includes a subscription request queue; The method further includes: Through the data node, each subscription request is submitted to the subscription request queue in sequence according to the order of each request corresponding to each subscription request; The subscription management unit retrieves a subscription request sequentially from the subscription request queue according to the submission order of each subscription request in the subscription request queue, performs the first subscription management operation on the retrieved subscription request, and removes the retrieved subscription request from the subscription request queue after completing the first subscription management operation.

5. The method according to claim 1, characterized in that, The subscription management unit includes a subscription data queue; The method further includes: The dedicated data processor sequentially submits each subscription data to the subscription data queue according to the acquisition order corresponding to each subscription data. The subscription management unit retrieves a subscription data item sequentially from the subscription data queue according to the submission order of each subscription data item in the subscription data queue, performs the second subscription management operation on the retrieved subscription data item, and removes the retrieved subscription data item from the subscription data queue after completing the second subscription management operation.

6. A data subscription device, characterized in that, A dedicated data processor for coupling data nodes, the dedicated data processor including a subscription management unit, the subscription management unit being a centralized agent deployed on the SoC side of the dedicated data processor, employing a one-to-many agent mechanism to replace the one-to-one agent mechanism in the traditional sidecar deployment mode, and connecting to at least one database, the dedicated data processor providing data subscription management for multiple data services in the data nodes through the subscription management unit, the device comprising: The acquisition module is used to acquire a subscription request from any data service of the data node or to acquire subscription data from the at least one database through the subscription management unit. The execution module is configured to, through the subscription management unit, identify the subscription object, subscription database, and subscription topic of the subscription request, wherein the subscription object corresponds to one of the multiple data services that sent the subscription request; determine the subscription group of the subscription request based on the subscription database and the subscription topic, and associate the data service corresponding to the subscription object with the subscription group; determine at least one target database corresponding to the subscription database from the at least one database, and push the subscription request to the at least one target database, or determine the target subscription group corresponding to the subscription data from each subscription group, determine all target services associated with the target subscription group from each data service of the data node, and push the subscription data to each target service; through the subscription management unit, monitor the at least one database according to the subscription topic of the subscription request, and when the monitored data value of the subscription topic changes, obtain the updated data of the subscription topic from the at least one database; and push the updated data of the subscription topic to each target service according to all target services associated with the subscription group of the subscription request in each data service.

7. An electronic device, characterized in that, include: A memory and a processor, wherein the memory stores a computer program that, when executed by the processor, implements the data subscription method as described in any one of claims 1 to 5.

8. A computer storage medium, characterized in that, The computer storage medium stores computer program code, which, when executed by a processor, causes the processor to perform the data subscription method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Market snapshot distribution method and related device

    CN115114222A