Subscription data pushing method, device and system, electronic equipment and storage medium

文档序号:1846157 发布日期:2021-11-16 浏览:4次 中文

阅读说明:本技术 订阅数据推送方法、装置、系统、电子设备及存储介质 (Subscription data pushing method, device and system, electronic equipment and storage medium ) 是由 袁沅祥 于 2021-07-12 设计创作,主要内容包括:本发明实施例提供了一种订阅数据推送方法、装置、系统、电子设备及存储介质,其中订阅数据推送方法和装置应用于订阅数据推送系统中的存储节点;所述方法包括:获取当前订阅任务;所述当前订阅任务包括当前订阅时间段、当前接收端和当前筛选条件;查找当前订阅时段内的本节点结构化数据;所述本节点结构化数据是与其组成数据对的对象数据存储于本存储节点的结构化数据;根据当前筛选条件,从所述当前订阅时段内的本节点结构化数据中确定目标结构化数据;根据所述目标结构化数据对应的对象数据和/或所述目标结构化数据,得到待推送数据;将所述待推送数据推送至所述当前接收端,所述待推送数据为所述当前订阅任务所要订阅的订阅数据的子集。(The embodiment of the invention provides a subscription data pushing method, a subscription data pushing device, a subscription data pushing system, electronic equipment and a storage medium, wherein the subscription data pushing method and the subscription data pushing device are applied to a storage node in the subscription data pushing system; the method comprises the following steps: acquiring a current subscription task; the current subscription task comprises a current subscription time period, a current receiving end and a current screening condition; searching the structured data of the node in the current subscription period; the structured data of the node is the structured data stored in the storage node together with the object data of the data pair formed by the structured data of the node; according to the current screening condition, determining target structured data from the node structured data in the current subscription period; obtaining data to be pushed according to object data corresponding to the target structured data and/or the target structured data; and pushing the data to be pushed to the current receiving end, wherein the data to be pushed is a subset of subscription data to be subscribed by the current subscription task.)

1. A subscription data pushing method is characterized in that the method is applied to a storage node in a subscription data pushing system; storing a plurality of object data on the storage node, wherein the object data and the structured data which has a corresponding relation with the object data form a data pair, and the structured data comprises a storage address of the object data which forms the data pair with the structured data on the storage node; the method comprises the following steps:

acquiring a current subscription task; the current subscription task comprises a current subscription time period, a current receiving end and a current screening condition;

searching the structured data of the node in the current subscription period; the structured data of the node is the structured data stored in the storage node together with the object data of the data pair formed by the structured data of the node;

according to the current screening condition, determining target structured data from the node structured data in the current subscription period;

obtaining data to be pushed according to object data corresponding to the target structured data and/or the target structured data;

and pushing the data to be pushed to the current receiving end, wherein the data to be pushed is a subset of subscription data to be subscribed by the current subscription task.

2. The subscription method of claim 1, wherein said current subscription task further comprises current data processing conditions, said current data processing conditions comprising image view and/or processing mode; each structured data includes at least one substructured data, each substructured data corresponding to an image field of view;

the obtaining data to be pushed according to the object data corresponding to the target structured data and/or the target structured data includes:

if the current data processing condition includes processing of a first processing mode on the sub-structured data of a first image visual field, determining that the sub-structured data of the first image visual field of the target structured data is the target sub-structured data, acquiring target sub-object data corresponding to the target sub-structured data according to a sub-object data storage address included in the target sub-structured data, and adding the target sub-object data to the target sub-structured data to obtain the data to be pushed; the first processing mode is to keep sub-object data corresponding to the sub-structured data in the data to be pushed.

3. The method according to claim 1 or 2, characterized in that the method further comprises:

receiving binned data routed to the storage node;

storing the object data in the warehousing data in the storage node to obtain a first object data storage address of the object data corresponding to the warehousing data on the storage node;

replacing the object data in the warehousing data with the first object data storage address to obtain structured data corresponding to the warehousing data;

and storing the structured data corresponding to the warehousing data into a structured data storage space.

4. The method according to any one of claims 1-3, wherein the obtaining of the current subscription task comprises:

acquiring a current subscription task from a node subscription task list corresponding to the storage node;

the method further comprises the following steps:

and receiving an updating message for representing that the node subscription task list needs to be updated, and updating the node subscription task list according to the updating message.

5. The method according to any one of claims 1 to 4,

the current subscription time period comprises a plurality of current subscription sub-time periods divided according to a time length unit;

the searching the structured data of the node in the current subscription period includes:

and sequentially searching the node structured data in each current subscription sub-time period in the current subscription time period according to the time sequence of each current subscription sub-time period.

6. A subscription data pushing device is characterized in that the subscription data pushing device is a storage node in a subscription data pushing system, a plurality of object data are stored on the storage node, the object data and structured data which has a corresponding relation with the object data form a data pair, and the structured data comprise storage addresses of the object data which form the data pair with the structured data on the storage node; the device comprises:

the task acquisition module is used for acquiring a current subscription task; the current subscription task comprises a current subscription time period, a current receiving end and a current screening condition;

the data searching module is used for searching the structured data of the node in the current subscription period; the structured data of the node is the structured data stored in the storage node together with the object data of the data pair formed by the structured data of the node;

the screening module is used for determining target structured data from the node structured data in the current subscription period according to the current screening condition;

the processing module is used for obtaining data to be pushed according to the object data corresponding to the target structured data and/or the target structured data;

and the pushing module is used for pushing the data to be pushed to the current receiving end, wherein the data to be pushed is a subset of the subscription data to be subscribed by the current subscription task.

7. A subscription data pushing method is characterized by being applied to a subscription data pushing system, wherein the subscription data pushing system comprises a plurality of storage nodes and a gateway;

the gateway receives the warehousing request and routes the warehousing request to one of the plurality of storage nodes;

the method of any one of claims 1 to 5 is executed by a plurality of storage nodes, and the subscription data to which the current subscription task is subscribed is pushed in parallel.

8. The subscription data pushing method according to claim 7, wherein at least one of the storage nodes receives an update request for a target subscription task, and sends an update message indicating that a node subscription task list needs to be updated to other storage nodes in the subscription data pushing system according to the update request.

9. A subscription data push system is characterized by comprising a plurality of storage nodes and a gateway;

the gateway is configured to route the warehousing request to one of the plurality of storage nodes,

the storage nodes are used for executing the method of any one of claims 1 to 5, and the subscription data to which the current subscription task is subscribed is pushed in parallel.

10. An electronic device, characterized in that the electronic device comprises:

one or more processors;

memory storing one or more programs that, when executed by the one or more processors, cause the one or more processors to implement the subscription data push method of any of claims 1-5 or 7-8.

11. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the subscription data pushing method according to any one of claims 1-5 or 7-8.

Technical Field

The invention relates to the technical field of video images, in particular to a subscription data pushing method, a subscription data pushing device, a subscription data pushing system, electronic equipment and a storage medium.

Background

When a user needs to acquire video or image information stored in the storage node (the process of pushing the data to be acquired by the user to the user is also referred to as data ex-warehouse), a subscription mode is usually adopted, a subscription task is created through an entrance of the subscription data push system, attribute information such as storage time, type and required data form of the video or image information needing to be subscribed is specified in the subscription task, and the storage node executes the subscription task and sends the video or image information meeting the requirements of the user to the user.

In the existing subscription mode, a task service is deployed on one node, a data push service is deployed on a plurality of storage nodes, the nodes deployed with the task service receive a subscription task initiated by a user and distribute the subscription task to the data push service on a certain storage node, and the data push service on the storage node acquires data corresponding to the subscription task from each storage node and pushes the data to a subscription receiving address. Therefore, the video or image information meeting the requirement of the subscription task in each storage node is pushed to the user by the data pushing service on the storage node, so that huge pressure is brought to the network bandwidth when the video or image information returns to the user through the storage node, and the ex-warehouse efficiency is further reduced.

Disclosure of Invention

The invention aims to provide a subscription data pushing method, a subscription data pushing device, a subscription data pushing system, electronic equipment and a storage medium.

In order to achieve the above purpose, the embodiment of the present invention adopts the following technical solutions:

in a first aspect, the present invention provides a subscription data pushing method, which is applied to a storage node in a subscription data pushing system; storing a plurality of object data on the storage node, wherein the object data and the structured data which has a corresponding relation with the object data form a data pair, and the structured data comprises a storage address of the object data which forms the data pair with the structured data on the storage node; the method comprises the following steps: acquiring a current subscription task; the current subscription task comprises a current subscription time period, a current receiving end and a current screening condition; searching the structured data of the node in the current subscription period; the structured data of the node is the structured data stored in the storage node together with the object data of the data pair formed by the structured data of the node; according to the current screening condition, determining target structured data from the node structured data in the current subscription period; obtaining data to be pushed according to object data corresponding to the target structured data and/or the target structured data; and pushing the data to be pushed to the current receiving end, wherein the data to be pushed is a subset of subscription data to be subscribed by the current subscription task.

In a second aspect, the present invention provides a subscription data pushing apparatus, where the subscription data pushing apparatus is a storage node in a subscription data pushing system, where the storage node stores a plurality of object data, the object data and structured data having a corresponding relationship therewith form a data pair, and the structured data includes a storage address of the object data forming the data pair with the structured data on the storage node; the device comprises: the task acquisition module is used for acquiring a current subscription task; the current subscription task comprises a current subscription time period, a current receiving end and a current screening condition; the data searching module is used for searching the structured data of the node in the current subscription period; the structured data of the node is the structured data stored in the storage node together with the object data of the data pair formed by the structured data of the node; the screening module is used for determining target structured data from the node structured data in the current subscription period according to the current screening condition; the processing module is used for obtaining data to be pushed according to the object data corresponding to the target structured data and/or the target structured data; and the pushing module is used for pushing the data to be pushed to the current receiving end, wherein the data to be pushed is a subset of the subscription data to be subscribed by the current subscription task.

In a third aspect, the present invention provides a subscription data pushing method, which is applied to a subscription data pushing system, where the subscription data pushing system includes a plurality of storage nodes and a gateway; the gateway receives the warehousing request and routes the warehousing request to one of the plurality of storage nodes; the plurality of storage nodes execute the subscription data pushing method provided by the first aspect of the invention, and push subscription data to be subscribed by the current subscription task in parallel.

In a fourth aspect, the present invention provides a subscription data pushing system, where the subscription data pushing system includes a plurality of storage nodes and a gateway; the gateway receives the warehousing request and routes the warehousing request to one of the plurality of storage nodes; the plurality of storage nodes execute the subscription data pushing method provided by the first aspect of the invention, and push subscription data to be subscribed by the current subscription task in parallel.

In a fifth aspect, the present invention provides an electronic device, comprising: one or more processors; a memory for storing one or more programs that, when executed by the one or more processors, cause the one or more processors to implement the subscription data pushing method described above.

In a sixth aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the subscription data pushing method described above.

Compared with the prior art, the method and the device have the advantages that the warehousing data are stored in the storage nodes in a distributed mode, all the storage nodes are informed in time when the subscription task is updated, all the storage nodes can execute the updated subscription task in parallel, all the storage nodes can be simultaneously delivered out of the warehouse, and the delivery efficiency is improved.

Drawings

In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.

Fig. 1 is an architecture diagram of a subscription data pushing system provided by an embodiment of the present invention.

Fig. 2 is a block diagram illustrating a storage node according to an embodiment of the present invention.

Fig. 3 shows a flowchart of a subscription data pushing method according to an embodiment of the present invention.

Fig. 4 shows a flowchart of a subscription data pushing apparatus according to an embodiment of the present invention.

Icon: 10-a storage node; 11-a processor; 12-a memory; 13-a bus; 14-a communication interface; 20-a gateway; 30-an external system; 100-subscription data push means; 110-a task acquisition module; 120-a data lookup module; 130-a screening module; 140-a processing module; 150-push module.

Detailed Description

In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.

Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.

In the description of the present invention, it should be noted that if the terms "upper", "lower", "inside", "outside", etc. indicate an orientation or a positional relationship based on that shown in the drawings or that the product of the present invention is used as it is, this is only for convenience of description and simplification of the description, and it does not indicate or imply that the device or the element referred to must have a specific orientation, be constructed in a specific orientation, and be operated, and thus should not be construed as limiting the present invention.

Furthermore, the appearances of the terms "first," "second," and the like, if any, are used solely to distinguish one from another and are not to be construed as indicating or implying relative importance.

It should be noted that the features of the embodiments of the present invention may be combined with each other without conflict.

In the prior art, a subscription data push system generally includes a storage node and may further include a gateway, where the storage node is used to store data such as videos and images, and the gateway is used to implement communication between the subscription data push system and an external system. Referring to fig. 1, fig. 1 shows an architecture diagram of a subscription data pushing system according to an embodiment of the present invention, where the subscription data pushing system includes a storage node 10, a gateway 20, an external system 30 and the gateway 20 are communicatively connected, and the gateway 20 is communicatively connected to the storage node 10, when there are a plurality of gateways 20, the plurality of gateways 20 and a plurality of storage nodes 10 may communicate via a network, the storage nodes 10 may also be a plurality of storage nodes 10, a plurality of storage nodes 10 may form a storage cluster, and the storage nodes 10 in the same storage cluster may communicate via a special component.

When the external system 30 acquires video or image data stored in the storage node 10 through the gateway 20, subscription is typically used, where subscription is a subscription request sent by a subscriber (i.e., an external system 30 requesting video or images) to a holder of data (in a video image information system, data information is typically referred to as video data or image data), in one case, there may be superior and inferior relationships between the subscriber and the data holder, at which point, the superior system initiates a subscription request to the inferior system, the inferior system returns the qualified data to the superior system, the superior system and the inferior system are relatively speaking, the superior and inferior can be understood as the relationship of size when differentiating according to jurisdiction, for example, the upper level system may be a video image information system of a head office, and the corresponding lower level system may be a video image information system of a branch office, etc.; the upper and lower levels can also be understood as the upper and lower connection relationships in the system architecture during the cascade, for example, a certain local area network is an upper level system, and the subnets included in the local area network are lower level systems. Alternatively, the subscribers and data holders may be the same level of system, or units spanning different jurisdictions, or systems of different network types. The video or image data may encompass data of the type of human face, person, automobile, non-automobile, object, scene, etc.

The subscription request is also generally referred to as a subscription task, the subscriber initiates the subscription task, and the storage node 10 performs the subscription task so as to return the video or picture meeting the requirements of the subscription task to the subscriber, where the requirements of the subscription task generally include, but are not limited to, a subscription time (i.e., a time at which the video or picture is generated or stored), a subscription content receiving address, a subscription content type, and the like. The subscriber may also perform an update operation on the subscription task, where the update operation includes creating a new subscription task, modifying the subscription task, deleting the subscription task, and querying the subscription task, and when the subscription task is updated, the storage node 10 performs a corresponding operation according to the updated subscription task, for example, after the subscription task is being modified, the storage node 10 executes the modified subscription task, so as to return a video or an image meeting the modified subscription task to the subscriber.

In the prior art, a subscription task is uniformly managed by one storage node 10 of a plurality of storage nodes 10, that is, an external system issues the subscription task to the storage node 10 managing the subscription task through a gateway 20, the storage node 10 is uniformly responsible for processing the subscription task, and videos or images on other storage nodes 10 that meet the requirements of the subscription task are finally exported (pushed to a subscriber) through the storage node 10, that is, only one outlet for pushing subscription data is provided, the inventor finds that the exporting efficiency is particularly low in this case, taking a picture of 500KB as an example, under a gigabit network condition, at most 1000/8MBps 500/1024MB per second is pushed, namely 256 pictures. This does not factor in the bandwidth occupied by the binning (i.e. storing of video or pictures to the storage node). The number of access devices of an external system of a general medium-scale subscription data push system can reach hundreds of thousands, and the number of access devices of a large-scale subscription data push system is even tens of thousands. Taking an average snap of 0.5 pictures per second per access device as an example, a 1000-way access device can generate 500 pictures per second. When the warehousing speed (the data is stored in the storage node of the subscription data pushing system) is higher than 256 pictures per second, the ex-warehousing speed will always lag behind the warehousing speed, and data backlog is caused. Videos and pictures have a storage period (videos and pictures are deleted after the expiration), and can not be backlogged indefinitely, and finally, videos and/or pictures are not ready to be pushed to a subscriber, namely deleted due to the arrival of the storage period. In addition, picture data transmission will also occur between the storage nodes 10, further increasing the consumed system resources. From the above analysis, only one ex-warehouse exit causes great pressure on network bandwidth during video and/or picture transmission, and finally causes low ex-warehouse efficiency.

In view of the foregoing problems and the analysis of the foregoing problems, embodiments of the present application provide a subscription data pushing method, apparatus, storage nodes, and storage medium, which can implement all storage nodes to send out a library concurrently, thereby improving the efficiency of ex-library, and will be described in detail below.

Referring to fig. 2, fig. 2 provides a block diagram of the storage node 10 of fig. 1. The storage node 10 comprises a processor 11, a memory 12, a bus 13, a communication interface 14. The processor 11 and the memory 12 are connected by a bus 13, the processor 11 is communicatively connected to the gateway 20 by a communication interface 14, and the storage nodes 10 are communicatively connected to each other by a network.

The processor 11 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 11. The Processor 11 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components.

The memory 12 is configured to store a program, for example, the subscription data pushing apparatus according to the embodiment of the present application, where the subscription data pushing apparatus includes at least one software functional module that may be stored in the memory 12 in a form of software or firmware (firmware), and the processor 11 executes the program after receiving an execution instruction to implement the subscription data pushing method according to the embodiment of the present application.

The Memory 12 may include a high-speed Random Access Memory (RAM) and may also include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Alternatively, the memory 12 may be a storage device built in the processor 11, or may be a storage device independent of the processor 11.

The bus 13 may be an ISA bus, a PCI bus, an EISA bus, or the like. Fig. 2 is represented by only one double-headed arrow, but does not represent only one bus or one type of bus.

On the basis of fig. 1 and fig. 2, an embodiment of the present invention provides a subscription data pushing method, which may be applied to a storage node 10 in fig. 1 and fig. 2, where the storage node stores a plurality of object data, the object data and structured data having a corresponding relationship therewith form a data pair, and the structured data includes a storage address of the object data forming the data pair with the structured data on the storage node.

One object data may include at least one sub-object data. It can be understood that, when one object data includes a plurality of sub-object data, the sub-object data and the sub-structured data having a corresponding relationship therewith form a sub-data pair, and the sub-structured data includes a storage address of the sub-object data forming the sub-data pair with the sub-structured data on the storage node.

Referring to fig. 3, fig. 3 is a flowchart illustrating a subscription data pushing method according to an embodiment of the present invention, where the method includes the following steps:

step S100, acquiring a current subscription task; the current subscription task comprises a current subscription time period, a current receiving end and a current screening condition.

In one example, a node subscription task list is maintained on the storage node, and the current subscription task is obtained from the corresponding node subscription task list. A plurality of subscription tasks to be executed are maintained in the node subscription task list, a time period corresponding to data to be subscribed is specified in the subscription tasks, and the time for starting executing the subscription tasks can be determined according to the time period corresponding to the subscription data. The current subscription task refers to a subscription task to be currently executed. And if the time for starting execution of a certain subscription task is up, taking the subscription task as the current subscription task. For example, if the current time is 4 points, and a certain subscription task subscribes to data generated at 5 points to 6 points, when 5 points are reached, the data to be subscribed by the subscription task starts to be generated, the subscription task is ready to start execution, and the subscription task is taken as the current subscription task. For another example, the current time is 4 points, and data generated at 2 points to 3 points is subscribed by a certain subscription task, so that the data to be subscribed by the subscription task is already generated, and the subscription task can be directly used as the current subscription task.

Besides the time period corresponding to the subscribed data, a data receiving end and a screening condition can be specified in the subscription task. The screening condition indicates what requirements are imposed on the data to be subscribed by the subscribing task. Correspondingly, the current subscription task can specify a current subscription time period, a current receiving end and a current screening condition. For example, the current subscription period is 5 points to 6 points, and the current screening condition is "vehicle color local map", which indicates that the current subscription task subscribes to data generated by 5 points to 6 points, including a vehicle as an object, a color image as an image, and a local map as an image view.

Step S200, searching the structured data of the node in the current subscription period; the structured data of the node is the structured data of the object data corresponding to the structured data stored in the storage node.

The object data may be a video or an image. The structured data corresponding to the object data may be information for describing the object data, for example, the structured data corresponding to the object data may contain one or more of an ID of the object data, a type of an object contained in the object data, an attribute of the object contained in the object data, an ID of a device that photographs the object data, an image type of the object data, a photographing time of the object data, and an image field of view of the object data. The structured data corresponding to the object data can also comprise a storage address of the object data on the storage node. One object data may include a plurality of sub-object data associated with each other, for example, one object data may include 3 sub-object data, and the 3 sub-object data are respectively: a panorama (two vehicles are included in the panorama), a vehicle partial view 1 corresponding to the panorama, and a vehicle partial view 2 included in the panorama. Correspondingly, the structured data corresponding to the object data also includes 3 pieces of sub-structured data, and the 3 pieces of sub-structured data respectively include storage addresses of the corresponding sub-object data on the storage nodes.

The time of the structured data in the current subscription period may refer to that the generation time of the structured data is in the current subscription period, the generation time of the object data corresponding to the structured data is in the current subscription period, the time of the structured data stored in the structured data storage space is in the current subscription period, the time of the object data stored in the storage node is in the current subscription period, and the time of the structured data or the warehousing data corresponding to the object data generated or the time of reaching the subscription data pushing system is in the current subscription period.

A plurality of storage nodes form a storage cluster. The subscription data pushing system also comprises a structured data storage space for storing structured data. In one example, each storage node stores both object data and structured data, in which case, the plurality of storage nodes form an object storage cluster and a structured storage cluster. That is, the structured data storage space is distributed over the storage nodes. In another example, each storage node stores object data, and a small number of storage nodes store structured data. That is, the structured data storage space is distributed over certain storage nodes. In another example, each storage node stores object data, a structured data storage device is set for the structured data, and the structured data storage device stores all the structured data. Therefore, when a storage node stores some object data, the structured data forming a data pair with the object data may be stored in the storage node, or may not be stored in the storage node, for example, the structured data corresponding to the object data of each storage node in the cluster may be stored in a single structured data storage device. It should be noted that whether the structured data is stored in other storage nodes or in a unified structured data storage space, the storage node can acquire the structured data through communication connection with the structured storage space.

It can be understood that the object data is usually video, image, etc., the data is large and occupies a large bandwidth when being transmitted frequently, the structured data is small, and the transmission process does not have great influence on the bandwidth and the data processing speed. Therefore, even if the structured data and the corresponding object data are not stored in the same storage node, the storage node of the object data can acquire the structured data from the storage space where the structured data is located if necessary without causing great influence on the bandwidth and the data processing speed.

The object data can be uniformly stored in each storage node according to a certain strategy, so that when a current subscription task is executed, each storage node searches the structured data of the node in the current subscription period, the data to be pushed corresponding to the storage node is generated according to the structured data of the node, and then the data is pushed by the data pushing service on the storage node, so that the parallel pushing of the subscription data to be subscribed by the current subscription task by a plurality of storage nodes can be realized.

In one example, the storage node routes the storage data in which the object data is located to the storage node, the storage node stores the object data in the storage data to the storage node, deletes or blanks the object data in the storage data, adds a storage address of the object data on the storage node to the storage node in the storage data to obtain structured data corresponding to the object data, and stores the structured data to the structured data storage space. As described above, the structured data storage space may be located in the local storage node, in other storage nodes, or in a structured data storage device.

Step S300, according to the current screening condition, determining target structured data from the structured data of the node in the current subscription period.

The actual scenes are different, and the data information to be subscribed is different, for example, in some scenes, only vehicle information is needed, and in some scenes, only driver information is needed. In order to make the pushed subscription content more meet the requirement of the receiving end, a screening condition can be set, and the target structured data can be screened out through the screening condition.

The structured data is descriptive information of the object data, including attributes of the object data. The screening condition may correspond to one attribute or a combination of multiple attributes included in the structured data, and if an attribute value of an attribute in the structured data satisfies an attribute value in the screening condition, the structured data of the node in the current subscription period is the target structured data. The filtering condition may also be set to an arbitrary value, that is, the target structured data is set regardless of the value of the attribute in the structured data.

In one example, the value of the attribute of the image TYPE (TYPE) in the structured data is used as the filtering condition. The attribute value of the attribute can be a vehicle panoramic image, a vehicle color local image, a license plate binary image, a driver facial feature image, a vehicle logo, a violation composite image, a scene image and the like.

In one example, the screening condition may require that the image type is a license plate binary image, and at this time, the attribute value of the attribute of the image type of the structured data is that the structured data of the license plate binary image is the target structured data. In one example, the filtering condition may require that the image type is a general picture (i.e., an arbitrary value), that is, the structured data is set as the target structured data regardless of the value of the attribute, that is, the image type of the structured data.

When one piece of structured data includes a plurality of pieces of sub-structured data, the granularity of screening the structured data of the node in the current subscription period by using the screening condition may be the granularity of the sub-structured data. For example, one of a plurality of sub-structured data in a structured data may be screened.

For example, the number of structured data of the node is 3, and the data format is shown in the following table.

The current screening condition 1 is that the image Type is 01, that is, the vehicle big map, the node structured data 2(Type ═ 10) and the node structured data 3(Type ═ 14) do not meet the requirements, and are screened out, the 1 st sub-structured data of the node structured data 1 are also screened out, and only the 2 nd sub-structured data of the node structured data 1 are left as the target structured data.

The current screening condition 2 is that the image Type is 100, that is, a common picture is equal to all the common pictures, so that the Type is not screened, and the structured data of the node in the current subscription period are all used as the target structured data.

And step S400, obtaining data to be pushed according to the object data corresponding to the target structured data and/or the target structured data.

For example, in some subscription tasks, data to be pushed is required to be structured data, and at this time, the data to be pushed can be obtained according to the target structured data; in some subscription tasks, the data to be pushed is required to be data formed by combining structured data and object data, and at this time, the data to be pushed needs to be obtained according to the object data and the target structured data corresponding to the target structured data.

Step S500, pushing the data to be pushed to the current receiving end, where the data to be pushed is a subset of the subscription data corresponding to the current subscription task.

Each storage node in the subscription data pushing system is responsible for pushing data to be pushed, which is stored in the storage node by object data, to a current receiving end, so that subscription data pushing is performed in parallel. When the object data are stored in a distributed manner, the object data corresponding to the data to be pushed are stored in a plurality of storage nodes, that is, the data to be pushed by each storage node is a part of the subscription data corresponding to the current subscription task, and the data to be pushed by each storage node is a subset of the subscription data corresponding to the current subscription task.

The current receiving end can be one or more IP addresses, and in the case that the current receiving end is multiple IP addresses, the subscription data push service randomly selects one of the IP addresses for pushing. Multiple consecutive (e.g., 3) push failures will cancel the subscription task.

In the embodiment of the application, the warehousing data is stored on each storage node in a dispersed manner when being stored in the storage node. Ideally, the data stored on each storage node is uniformly distributed, and for the subscription task of pushing 256 pictures to the receiving end, since the pictures are scattered on each storage node, each of the N storage nodes is responsible for pushing the pictures thereinThe ex-warehouse speed linearly increases with the number of storage nodes. In the worst case, all binned data is stored in one storage node, and the ex-binning speed degrades to the above-described prior art speed. Therefore, the delivery speed obtained in the embodiment of the present application is certainly not less than that of the prior art. And moreover, the transmission of object data does not exist among the storage nodes, so that the internal bandwidth is saved.

In one embodiment, the current subscription task further includes current data processing conditions, where the current data processing conditions include image view and/or processing mode; each structured data includes at least one substructured data, each substructured data corresponding to an image field of view.

The receiving ends of different subscription tasks may have different requirements on the data subscribed by the receiving ends, and the storage node is required to process the structured data and/or the object data into a form required by the receiving end and then push the data to the receiving end. Therefore, after the target structured data is determined, the target structured data needs to be processed to obtain the data to be pushed, which meets the requirement of the receiving end.

The image field of view may be an attribute included in the sub-structured data, or may be a value determined from an image type based on a predetermined correspondence between the image type and the image field of view. For example, when the image type is a vehicle panoramic image, the corresponding image view is a panoramic image, and when the image type is a license plate color local image, the corresponding image view is a local image.

In general, the way the sub-structured data is processed for different views may be different. The current data processing conditions are used for representing the way in which the sub-structured data of various image views needs to be processed when generating the data to be pushed. The image view corresponding to the sub-structured data can be one of a panoramic image and a local image; the processing manner may be to reserve a storage address of the sub-object data corresponding to the sub-structured data in the data to be pushed in the storage node, reserve the sub-object data corresponding to the sub-structured data in the data to be pushed, and discard one of the sub-structured data from the data to be pushed. When the data processing conditions are a combination of image field of view and processing manner, a plurality of possible data processing conditions are available, for example: for the sub-structured data corresponding to the panoramic image and the local image, the storage addresses of the sub-object data corresponding to the corresponding sub-structured data in the storage nodes are reserved; or for the sub-structured data corresponding to the panoramic image and the local image, keeping the sub-object data corresponding to the corresponding sub-structured data; or, for the sub-structured data corresponding to one of the panoramic image and the local image, the storage address of the sub-object data corresponding to the sub-structured data at the storage node is reserved, and for the sub-structured data corresponding to the other sub-structured data, the sub-object data corresponding to the sub-structured data is reserved; or, for the sub-structured data corresponding to one of the panoramic image and the local image, discarding the sub-structured data from the data to be pushed, and for the sub-structured data corresponding to the other one, keeping the corresponding sub-object data in the data to be pushed.

Step S400 includes the following steps:

step S410: if the current data processing condition comprises processing the sub-structured data of the first image visual field in a first processing mode, determining the sub-structured data of the first image visual field of the target structured data as target sub-structured data; the first processing mode is to keep sub-object data corresponding to the sub-structured data in the data to be pushed.

The target structured data may include a plurality of pieces of sub-structured data, and the sub-structured data of the first image field of view of the target structured data is the target sub-structured data.

Step S420: acquiring target sub-object data corresponding to the target sub-structured data according to a sub-object data storage address included in the target sub-structured data;

the sub-structured data comprises the storage address of the sub-object data forming the sub-data pairs with the sub-structured data on the storage node, so that the target sub-object data corresponding to the target sub-structured data can be obtained according to the storage address of the sub-object data included in the target sub-structured data.

Step S430: adding the target sub-object data to the target sub-structured data to obtain the data to be pushed;

for example, the first processing mode is to keep the sub-object data corresponding to the sub-structured data in the data to be pushed, and the first image view is a panoramic image, that is, the current data processing condition requires the sub-structured data corresponding to the panoramic image, and keep (or add) the sub-object data corresponding to the sub-structured data in the data to be pushed. At this time, the sub-structured data in which the image field of the corresponding sub-object data is a panoramic image in the target structured data may be used as the target sub-structured data, the target sub-object data corresponding to the target sub-structured data is obtained according to the sub-object data storage address included in the target sub-structured data (inevitably stored in the storage node), and the target sub-object data is added to the target sub-structured data to obtain the data to be pushed. It is understood that, in the target sub-structured data, the storage address of the target sub-object data may be deleted or not deleted.

The second processing mode is to keep the storage address (usually embodied as URL) of the sub-object data corresponding to the sub-structured data in the data to be pushed, because the sub-structured data inherently includes the storage address of the sub-object data, the target sub-structured data corresponding to the second processing mode in the target structured data does not need to be processed.

And if the current data processing condition comprises the processing of the second processing mode on the sub-structured data of the second image visual field, not processing the sub-structured data of the second image visual field in the target structured data.

In this way, after the data to be pushed is sent to the receiving end, the receiving end can obtain the object data according to the storage address of the object data contained in the structured data when the object data needs to be obtained.

And if the third processing mode is to discard the sub-structured data from the data to be pushed, deleting the sub-structured data corresponding to the third processing mode from the target structured data.

And if the current data processing conditions comprise the processing of the third processing mode on the sub-structured data of the third image visual field, deleting the sub-structured data of the third image visual field in the target structured data.

Table 1 shows several examples of data processing conditions.

TABLE 1

For example, the current processing conditions are: the processing of the second processing method is performed on the sub-structured data corresponding to the panorama, and the processing of the first processing method is performed on the sub-structured data corresponding to the local map.

And processing the target structured data screened by the current screening condition 1 by using the current processing condition. The image type of the target structured data screened by the current screening condition 1 is a vehicle large image, and the image view corresponding to the vehicle large image is a panoramic image according to the corresponding relation between the image type and the image view, so that the target structured data does not need to be processed and can be directly pushed.

And processing the target structured data screened by the current screening condition 2 by using the current processing condition. The image views corresponding to the structured data of the node screened by the current screening condition 2 are as follows, and the 1 st sub-structured data of the structured data 1 of the node: partial graph, the 2 nd sub-structured data of the node structured data 1: panorama, this node structured data 2: local graph, present node structured data 3: a panoramic view. Therefore, for the 1 st sub-structured Data of the structured Data 1 of the node and the structured Data 2 of the node, the original BASE64 character string, i.e. the object Data, is obtained according to the object Data storage address StoragePath in the sub-structured Data, so that the key value pair "Data": BASE64 character string 1 "and" BASE64 character string 3 "is added to the corresponding structured Data (if the key Data exists in the structured Data but the value is null, only the BASE64 character string 1 and the BASE64 character string 3 are added to the structured Data), the 2 nd sub-structured Data of the structured Data 1 of the node and the structured Data 3 of the node are not required to be processed because of being a panorama, and the Data to be pushed is obtained.

It should be noted that the above steps are a specific implementation manner when the subscription content is a picture, and when the subscription content is a video, the subscription content may be processed in a similar manner, for example, a representative image frame is selected from the video, the image frame is processed in a similar manner to the picture, or the video is classified in advance according to the scene requirement, and different types are set, and the like.

Therefore, in the specific embodiment, in the process of generating the data to be pushed, only the target sub-object data needs to be acquired from the storage node, and the transmission of the object data does not exist between the storage nodes, so that the internal bandwidth is saved. Moreover, different processing modes can be set for the sub-object data in different image views, so that the flexibility of pushing data is greatly improved, and different requirements of a receiving end can be met.

In a specific embodiment, the subscription data pushing method further includes:

step S500: binned data routed to a storage node is received.

The warehousing data may be data which is shot by the image acquisition device and is subjected to structured processing, may be included in the warehousing request, and may also be sent to a storage node after the warehousing request is routed to the storage node. Therefore, the binned data generally includes object data (which may be encoded data of an image, such as base64 encoded data) and structured data obtained by processing the object data and describing the object data.

The subscription data pushing system may include a plurality of storage nodes, and when a warehousing request is received, the warehousing data is manually or automatically (for example, through a gateway) routed to a certain storage node, so that the storage node stores the object data in the warehousing data, or stores the object data and the structured data in the warehousing data.

It is understood that, regardless of the frequency of subscribing the warehoused data, in order to uniformly store a plurality of warehoused data in each storage node so as to maximize the data pushing speed, the routing may follow a balancing strategy.

The subscription data pushing system comprises 3 storage nodes: the storage node comprises a storage node a, a storage node b and a storage node c, wherein the number of the storage data to be stored in the storage node is three, namely data 1, data 2 and data 3, and the three storage data are respectively sent to the 3 storage nodes to be stored according to a balance principle.

Optionally, when receiving the warehousing request/warehousing data, each storage node 10 preferentially stores the object data in the received warehousing data to the local, and only when the local storage fails, the storage node 10 forwards the warehousing data to other storage nodes for storage.

Step S600: and storing the object data in the warehousing data in the storage node to obtain a first object data storage address of the object data corresponding to the warehousing data on the storage node.

And if the object data comprises a plurality of sub-object data, storing each sub-object data in the database data into the storage node to obtain the sub-object data storage address of each sub-object data on the storage node.

In this embodiment, object data is stored in a storage node, and the storage node returns a storage address (also referred to as a StoragePath) where the object data is stored, for example, a BASE64 character string of a picture is stored in the storage node, where the storage address StoragePath includes an IP address of the storage node 10, and each object data corresponds to a unique storage address StoragePath.

Step S700: deleting the object data in the warehousing data, and adding a first object data storage address to the warehousing data to obtain the structured data corresponding to the warehousing data.

The deletion of the object Data in the put-in Data may refer to the deletion of the key value pair "Data" in the put-in Data, i.e., "BASE64 string", or the blank of the original BASE64 string of the put-in Data, i.e., "Data".

If the object data comprises a plurality of sub-object data, after the sub-object data is stored in the storage node, the sub-object data in the data to be stored can be deleted, and each sub-object data storage address is added to the corresponding sub-structured data to obtain the structured data corresponding to the data to be stored, that is, the sub-structured data corresponding to the sub-object data.

Step S800: and storing the structured data corresponding to the warehouse-in data into a structured data storage space.

As mentioned above, the structured data can be stored in a structured data storage space on a storage node, or a common structured data storage space can be provided for a plurality of storage nodes.

In the embodiment, the structured data and the object data in the database entry data are stored separately, which not only facilitates the indexing of the structured data, but also facilitates the preparation of the data to be pushed. As described above, some receiving terminals need to obtain data to be pushed without object data (for example, due to the consideration of bandwidth occupied by the transmission of the object data), and only when a user needs to view some object data, the user obtains the object data from the subscription data pushing system in real time according to an object data address included in the data to be pushed.

In one embodiment, step S100 includes:

step S110: and acquiring the current subscription task from a node subscription task list corresponding to the storage node.

Each storage node may maintain a node subscription task list, the node subscription task lists of each node being the same. Therefore, the node subscription task list of each node comprises the A subscription task, and when the A subscription task becomes the current subscription task, each node can push the subscription data corresponding to the A subscription task stored in each node in parallel.

Correspondingly, the subscription data pushing method further comprises the following steps:

and S900, receiving an updating message of the node subscription task list needing to be updated, and updating the node subscription task list according to the updating message.

In one example, a first storage node, which deploys a subscription task service, receives a task update request and sends an update message to a second storage node according to the update request.

The first storage node may be any one of the plurality of storage nodes 10 in fig. 1, and the second storage node is a storage node 10 of the plurality of storage nodes 10 other than the storage node. The task update request may include the target subscription task that needs to be updated and the type of update. The target subscription task refers to a subscription task for which the user wants to update, and the types of update include creation, modification, inquiry, and deletion. When the update request is used for creating the target subscription task, the target subscription task is added into the subscription task list, when the update request is used for modifying the target subscription task, the target subscription task in the subscription task list is modified according to the update request, and when the update request is used for deleting the target subscription task, the target subscription task is deleted from the subscription task list.

After the first storage node receives the task update request, in order to synchronously update the node task list on the second storage node, the first storage node needs to send an update message indicating that the subscription task list has an update to the second storage node.

In one example, a gateway receives a task update request and routes to a first storage node.

It can be understood that, if the first storage node also needs to perform the data pushing task, the first storage node also needs to update the node task list on the node according to the update request.

In this embodiment, if the task update request is to create, modify or delete the target subscription task, the first storage node sends an update message indicating that the node subscription task list has an update to the second storage node, so that the first storage node and the second storage node concurrently execute the created or modified target subscription task, and the purpose of pushing the subscription content related to the target subscription task at the same time in the first storage node and other storage nodes is achieved.

As an implementation manner, when the task update request is to create a target subscription task, at this time, the task update request may include a creation command and creation configuration information, where the creation command refers to a command to create the target subscription task, the creation configuration information is used to characterize the configuration of the target subscription task to be created, and the creation configuration information includes, but is not limited to, a name, a subscription time, a subscription content receiving address, and the like of the target subscription task. For example, the creation configuration information is: { task 001; (20190101000000-20200101000000); http:// photo.test.com/rurl2}, wherein task001 is the name of the target subscription task, 20190101000000-.

As another implementation manner, when the task update request is to modify the target subscription task, the task update request may include modification configuration information, and the modification configuration information may include, but is not limited to, an identifier of the target subscription task, a subscription time, a subscription content receiving address, and the like.

In this embodiment, the node subscription task list may include a plurality of subscription tasks, each subscription task may include an identifier of the subscription task and subscription configuration information of the subscription task, and it may be determined whether a target subscription task exists in the subscription task list according to the identifier of the target subscription task, if so, the subscription configuration information of the target subscription task in the subscription task list is modified by using the modification configuration information, and if not, the target subscription task is added to the subscription task list as a new subscription task.

In this embodiment, if the task update request is to delete the target subscription task, the first storage node sends an update message indicating that the subscription task list is updated to the other storage nodes, so that the target subscription task is deleted from the node task lists of the first storage node and the other storage nodes, and if the target subscription task is being executed, the target subscription task is stopped being executed, so that the purpose that the subscription content related to the target subscription task is stopped being pushed both at the storage nodes and the other storage nodes is achieved. If the target subscription task does not exist in the subscription task list, the target subscription task is not processed, and deletion failure or any information is not returned according to actual needs.

It should be noted that, as an implementation manner, the first storage node may use the ETCD component to synchronize the node subscription task list to other storage nodes in time when the node subscription task list needs to be updated, and of course, other technologies may also be used to implement synchronization of the subscription task list between the storage node and other storage nodes, for example, technologies such as zookeeper.

It should be noted that, in addition to updating the target subscription task, the target subscription task may be queried. Since the subscription task list does not need to be updated, at this time, the storage node does not send an update message to other storage nodes, and after finding the target subscription task from the subscription task list, the storage node returns the subscription configuration information of the target subscription task to the gateway 20.

As a specific embodiment, when querying a target subscription task, the gateway 20 sends an update type included in an update request to the storage node as a query, where the update request may include an identifier of a subscription task to be checked, the first storage node may determine whether there is a subscription task to be checked in the subscription task list according to the identifier of the subscription task to be checked, if the subscription configuration information of the subscription task to be checked exists, the subscription configuration information of the subscription task to be checked is returned to the gateway 20, the update request may not include the identifier of the subscription task to be checked, at this time, a preset number of subscription tasks in the subscription task list may be used as the subscription task to be checked, the subscription configuration information of each subscription task to be checked is returned to the gateway 20, or all the subscription tasks in the subscription task list are used as the subscription tasks to be checked, and the subscription configuration information of each subscription task to be checked is returned to the gateway 20.

The subscription data pushing method provided by the embodiment of the invention can inform all storage nodes in time when the subscription task is updated, so that all storage nodes can execute the updated subscription task at the same time, all storage nodes can be simultaneously delivered out of the warehouse, and the warehouse delivery efficiency is improved.

In a specific embodiment, the current subscription period is divided into a plurality of current subscription sub-periods according to a time length unit;

step S100 is the same as the foregoing embodiments, and is not described herein again.

The step S200 includes: sequentially searching the node structured data in each current subscription sub-time period in the current subscription time period according to the time sequence of each current subscription sub-time period;

the current subscription time period is [ a, b ], the time segment [ A, b ] of the data to be pushed, and the time segment [ a, A ] of the pushed data. Data is pushed starting from the start time a. And starting time, a is a, as the data push progresses, a gets closer to b, the time range of the time segment [ a, b ] of the data to be pushed becomes smaller and smaller until 0, and the data to be subscribed of the current subscription task is pushed.

Specifically, the initialization a is a, and inc is a time length unit, for example, inc is 10 seconds. And if the A is equal to the b, finishing the subscription pushing.

[ a, a + inc) is the current subscription sub-period (if a + inc > b, let a + inc be b, which means the last sub-period in the current subscription period). In one example, the structured data storage space is queried according to the time range [ a, a + inc), and the structured data of the node in the current subscription sub-period is obtained. In another example, the structured data storage space is queried according to the time range [ a, a + inc) and the subscription type, so as to obtain the structured data of the node in the current subscription sub-period. In this case, not only the time condition but also the subscription type condition are added when the structured data of the node is queried, so that the query result range is narrowed, and the subsequent processing is facilitated. It can be understood that the structured data includes a storage address of object data forming a data pair with the structured data on the storage node, and when the storage space of the structured data is queried, the structured data including the IP of the storage node in the storage address is the structured data of the node.

The meaning of the structured data in the current subscription sub-period is similar to the meaning of the structured data in the current subscription time end, and is not described herein again.

Step 300 comprises: and determining target structured data from the structured data of the node in the current subscription sub-period according to the current screening condition.

In this way, the target structured data meeting the current screening condition can be further screened from the structured data obtained in step S200.

Step S400 includes: and obtaining data to be pushed according to the object data corresponding to the target structured data and/or the target structured data.

And if the target structured data correspond to the current subscription sub-time period, the data to be pushed are also the data to be pushed corresponding to the current subscription sub-time period.

Step S500 includes: and pushing the data to be pushed to the current receiving end, wherein the data to be pushed is a subset of subscription data to be subscribed by the current subscription task.

Similarly, if the target structured data corresponds to the current subscription sub-period, the data to be pushed is also the data to be pushed corresponding to the current subscription sub-period.

It is understood that, for the current subscription sub-period [ t, t + duration unit), the structured data of the local node in the current subscription sub-period may be searched in step S200, and then the target structured data may be determined from the structured data of the local node in the current subscription sub-period according to the current screening condition in step S300. And generating and pushing the data to be pushed corresponding to the current subscription sub-time period through steps S400 and S500. Then, the current subscription sub-period is updated to [ t + duration unit, t +2 × duration unit), and steps S200-S500 are executed again until the subscription data push is completed or the current subscription task is cancelled.

In order to execute the corresponding steps in the above embodiments and various possible implementations, an implementation of the subscription data pushing device 100 is given below. Referring to fig. 4, fig. 4 is a block diagram illustrating a subscription data pushing apparatus 100 according to an embodiment of the present invention. It should be noted that the basic principle and the generated technical effect of the subscription data pushing device 100 provided in the present embodiment are the same as those of the above embodiments, and for the sake of brief description, no reference is made to this embodiment part.

The subscription data pushing device 100 includes a task obtaining module 110, a data searching module 120, a filtering module 130, a processing module 140, and a pushing module 150.

A task obtaining module 110, configured to obtain a current subscription task; the current subscription task comprises a current subscription time period, a current receiving end and a current screening condition;

the data searching module 120 is configured to search the structured data of the node in the current subscription period; the structured data of the node is the structured data stored in the storage node together with the object data of the data pair formed by the structured data of the node;

the screening module 130 is configured to determine target structured data from the node structured data in the current subscription period according to a current screening condition;

the processing module 140 is configured to obtain data to be pushed according to the object data and/or the target structured data corresponding to the target structured data;

a pushing module 150, configured to push the data to be pushed to the current receiving end, where the data to be pushed is a subset of subscription data to be subscribed by the current subscription task.

The embodiment of the invention also provides a subscription data pushing method which is applied to a subscription data pushing system, wherein the subscription data pushing system comprises a plurality of storage nodes and a gateway;

the gateway receives the warehousing request and routes the warehousing request to one of the plurality of storage nodes. The gateway is responsible for routing the external request, if the external request is a warehousing request, the warehousing request is routed to one of the plurality of storage nodes, and if the external request is a subscription request, the subscription request is routed to the subscription task service.

The plurality of storage nodes execute the method according to any embodiment of the first aspect of the present invention, and push subscription data to be subscribed by the current subscription task in parallel.

In one example, each of the storage nodes has a gateway corresponding thereto, the gateways correspond to the storage nodes one to one, and the storage nodes push data to be pushed to a current receiving end through the corresponding gateways. The gateway also receives a warehousing request routed to its corresponding storage node.

In a specific embodiment, at least one of the storage nodes receives an update request for a target subscription task, and sends an update message indicating that a node subscription task list needs to be updated to other storage nodes in the subscription data push system according to the update request.

In this embodiment, the subscription task service is deployed on one storage node of the subscription task system. And the storage node deployed with the subscription task service maintains a node subscription task list according to the subscription tasks to be updated and the updating modes (adding, deleting and modifying) contained in the updating messages and sends the updating messages to other storage nodes.

Correspondingly, the embodiment of the invention also provides a subscription data pushing system, which comprises a plurality of storage nodes and a gateway; the gateway is configured to route the warehousing request to one of the storage nodes, and the storage nodes are configured to execute the method according to any embodiment of the first aspect of the present invention, and push subscription data to be subscribed by the current subscription task in parallel.

In a specific embodiment, at least one of the storage nodes is further configured to receive an update request for a target subscription task, and send, according to the update request, an update message indicating that a node subscription task list needs to be updated to another storage node in the subscription data pushing system.

In one example, each of the storage nodes has a gateway corresponding thereto, the gateways correspond to the storage nodes one to one, and the storage nodes push data to be pushed to a current receiving end through the corresponding gateways. The gateway also receives a warehousing request routed to its corresponding storage node.

The present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a subscription data push method as described above.

In summary, embodiments of the present invention provide a subscription data pushing method, an apparatus, a system, an electronic device, and a storage medium, where the subscription data pushing method and the apparatus are applied to a storage node in a subscription data pushing system; storing a plurality of object data on the storage node, wherein the object data and the structured data which has a corresponding relation with the object data form a data pair, and the structured data comprises a storage address of the object data which forms the data pair with the structured data on the storage node; the method comprises the following steps: acquiring a current subscription task; the current subscription task comprises a current subscription time period, a current receiving end and a current screening condition; searching the structured data of the node in the current subscription period; the structured data of the node is the structured data stored in the storage node together with the object data of the data pair formed by the structured data of the node; according to the current screening condition, determining target structured data from the node structured data in the current subscription period; obtaining data to be pushed according to object data corresponding to the target structured data and/or the target structured data; and pushing the data to be pushed to the current receiving end, wherein the data to be pushed is a subset of subscription data to be subscribed by the current subscription task. Compared with the prior art, the embodiment of the invention can inform all storage nodes in time when the subscription task is updated, so that all storage nodes can execute the updated subscription task at the same time, all storage nodes can be simultaneously delivered out of the warehouse, and the warehouse delivery speed and the warehouse delivery efficiency are improved. And moreover, the transmission of object data does not exist among the storage nodes, so that the internal bandwidth is saved.

The above description is only for the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

23页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于知识图谱的推荐方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!