[ detailed description ] of the invention
For a better understanding of the technical solution of the present invention, the following detailed description of the embodiments of the present invention refers to the accompanying drawings.
It should be understood that the described embodiments are merely some, but not all, embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be understood that the term "and/or" as used herein is merely one relationship describing the association of the associated objects, meaning that there may be three relationships, e.g., a and/or B, may represent: a exists alone, A and B exist together, and B exists alone. In addition, the character "/" herein generally indicates that the front and rear associated objects are an "or" relationship.
It should be understood that although the terms first, second, third, etc. may be used to describe the terminals in the embodiments of the present invention, these terminals should not be limited to these terms. These terms are only used to distinguish terminals from one another. For example, a first terminal may also be referred to as a second terminal, and similarly, a second terminal may also be referred to as a first terminal, without departing from the scope of embodiments of the present invention.
Depending on the context, the word "if" as used herein may be interpreted as "at … …" or "at … …" or "in response to a determination" or "in response to detection". Similarly, the phrase "if determined" or "if detected (stated condition or event)" may be interpreted as "when determined" or "in response to determination" or "when detected (stated condition or event)" or "in response to detection (stated condition or event), depending on the context.
Fig. 1 is a flowchart of a content distribution method according to an embodiment of the present invention, as shown in fig. 1, the method includes:
step S101, an event to be issued, which is sent by an issuing client, is obtained, wherein the event to be issued comprises an event theme and an event attribute. The topic is a bridge between the subscription client and the publishing client, and the topic can be an event topic or a subscription topic. Topics are used to represent learning phases, such as: elementary, junior middle, high, medium, and correspondingly, event topics are used to clarify the topics of events to be issued, event attributes are used to represent subdivision knowledge points, and attributes are layered by using separators (/), e.g., first grade/Chinese;7th gradation/matheat; 7th grade/geometry. The producer of an event is referred to as a publishing client and the consumer of an event is referred to as a subscribing client.
Step S102, obtaining subscription conditions sent by all subscription clients, wherein the subscription conditions carry subscription topics and topic labels. Illustratively, a subscription topic is used to represent topics that are needed or of interest to a subscriber, such as: the subscription topic is primary school, and the topic label is a grade/Chinese.
Step S103, a multi-level index structure is created according to all subscription topics, the multi-level index structure comprises root nodes, primary nodes connected with the root nodes and secondary nodes connected with the primary nodes, wherein each root node stores the subscription topic, each primary node stores a primary topic label, each secondary node stores a secondary topic label, and all nodes store corresponding subscription client identifiers.
The multi-level index structure is tree-shaped, and the subscription theme stored by the root node covers the primary theme label stored by the primary node and the secondary theme label stored by the secondary node. The primary theme tag overlays the secondary theme tag. In other embodiments, knowledge points can be further refined under the secondary topic label to form a tertiary topic label, a quaternary topic label and the like. And will not be described in any greater detail herein. The pointers to the root nodes are correspondingly stored in the index structure, so that when an event to be issued needs to be matched, quick positioning in the multi-level index structure can be performed according to the event attribute.
For example, the subscription topic of the subscription client a is primary, the topic label is a grade/language, and then the identity of the subscription client a is stored in the primary node (storing the grade primary topic label) and the secondary node (storing the language secondary topic label). The subscription client identifier may be an ID code of the subscription terminal, or may be a registration number when the subscription client registers, which is not limited herein.
Step S104, matching the event theme of the event to be issued with the subscription theme stored by all root nodes in the multi-level index structure. It can be appreciated that, through the matching of the event topic and the subscription topic, the target subscription client can be screened out in a large scale, and the subscription matching efficiency is improved.
Step 105, if the matching is successful, matching the event attribute with the primary topic label stored in the primary node and the secondary topic label stored in the secondary node, which are connected with the root node of the successful matching, one by one, to obtain the primary topic label and the secondary topic label of the successful matching.
Step S106, the event to be issued is transmitted to a target subscription client with the primary topic label and the secondary topic label successfully matched, wherein the target subscription client comprises subscription client identifications stored by the nodes where the secondary topic labels are successfully matched.
In the scheme, event topics of events to be distributed are matched with subscription topics stored in a root node in the multi-level index structure, then event attributes are used for matching labels on all nodes until the events to be distributed are matched with a certain node in the multi-level index structure, so that subscribers corresponding to subscription client identifiers stored in the node can subscribe to the events to be distributed, and the matching efficiency is improved.
Optionally, after acquiring the event to be issued sent by the issuing client, the method further includes: determining a first-level attribute tag and a second-level attribute tag of an event to be issued according to the event attribute of the event to be issued and a preset tag mapping table, wherein the tag mapping table comprises the corresponding relation between a field representing the event attribute and the first-level attribute tag and the second-level attribute tag; matching the primary attribute labels of the events to be issued with the primary topic labels stored in the primary nodes connected with the successfully matched root nodes to obtain successfully matched primary topic labels; if the matching fails, outputting matching failure indication information; and if the matching is successful, matching the secondary attribute labels of the events to be issued with the secondary topic labels stored in the secondary nodes connected with the successfully matched primary nodes to obtain the successfully matched primary topic labels and secondary topic labels.
The event attribute may be summary of Primary school Primary language examination knowledge points, the following keywords "Primary school", "Primary grade" and "language" may be obtained by extracting keywords, and "Primary school" and "Primary grade" are obtained by mapping with a preset tag mapping table, and "first grade" and "language" are obtained by mapping.
When an event to be issued is matched, after a matched root node is found in the multi-level index structure, testing a primary node and a secondary node connected with the root node by using event attributes, if the primary node fails to be tested in the testing process, recording a subscription client of the node, and after the testing is finished, eliminating all unsuccessfully matched subscription client identifiers from all subscription client identifiers.
Optionally, after acquiring the subscription conditions sent by all the subscription clients, the method further includes: counting a plurality of subscription conditions of each subscription client; judging whether the number of subscription conditions of the same subscription topic exceeds a preset threshold value within a preset time period; if yes, confirming the subscription theme as a target subscription theme of the subscription client; and pushing the events meeting the target subscription theme to the subscription client.
For example, the preset time period may be 1 month, 2 months, half year, etc., the number of times that the subscription client a subscribes to the subscription topic as a primary school is 20 times in one month, which indicates that the subscription client a is very focused on knowledge points in the primary school stage, the system confirms "primary school" as a target subscription topic, and then pushes to the subscription client a any event to be published that matches the topic of "primary school" among the events to be published.
Optionally, after acquiring the event to be issued sent by the issuing client, the method further includes: according to the event theme and the event attribute, storing the event to be issued into a corresponding event group of a preset database in a classified manner, wherein the event group comprises a plurality of events with the same event theme and the same event attribute; pushing all the events in the event group to a subscription client subscribing the events to be published according to preset logic.
It will be appreciated that multiple events with the same event topic and the same event attribute are classified into an event group and may be stored in the same folder, and when the subscription client B subscribes to one event in the event group, the system will actively push other events in the event group to him. The preset logic may be periodically pushed to the subscribing client from new to old according to the release time of the events in the event group, for example.
Optionally, after creating the multi-level index structure according to all subscription topics, the method further comprises: acquiring subscription conditions sent by a subscription client, wherein the subscription conditions comprise an identity of the subscription client, a subscription theme and a theme label; judging whether the subscribing client is a new user or not according to the identity; if so, the multi-level index structure is updated according to the subscription subject and subject label of the new user.
It can be understood that all the subscription client identifiers are stored in a preset record table, if a new user is present, the subscription client identifier of the new user is used to traverse the preset record table, the same subscription client identifier record cannot be found, if the same subscription client identifier record is found, the new user is not present, and only the subscription client identifier of the user is required to be added in the corresponding node in the multi-level index structure. If the user is a new user, the multi-level index structure needs to be updated according to the subscription theme and the theme label of the new user.
Optionally, the method further comprises: acquiring a subscription modification instruction of a subscription client, wherein the subscription modification instruction comprises a newly added subscription topic, a non-subscription topic and a topic label; and correspondingly modifying the root node, the primary node, the secondary node and the subscription client identifications configured by all the nodes in the multi-level index structure according to the subscription modification instruction.
Optionally, the subscription condition of the subscription client further includes a routing path of the received event of the subscription client; transmitting the event to be issued to the target subscription client with successful matching, comprising: and sending the event to be issued to the target subscription client which is successfully matched through the routing path stored in the database.
The embodiment of the invention provides a content publishing system 100, as shown in fig. 2, which comprises a content publishing device 10, a database 20, a retrieval module 30, a subscription management module 40 and a display module 50.
The content distribution apparatus 10 is configured to execute the content distribution method described above.
The database 20 is used for storing events, and the events are classified into corresponding event groups according to event topics. Wherein each event is a separate piece of data, and the type of data can be a document, video, audio, web page, image, etc. Specifically, for example, educational videos, teaching ppt, recordings, and the like. These data are all stored in a database and are embodied in a multi-level index structure.
And the retrieval module 30 is used for retrieving and searching the events in the database.
Specifically, the retrieval module 30 includes a full text retrieval unit 31, a metadata management unit 32, a context retrieval unit 33, and a multimedia retrieval unit 34. It can be appreciated that full text retrieval is mainly used for retrieving objects such as words, characters, paragraphs and the like of full text data. The multimedia retrieval is mainly used for extracting the semanteme contained in the content of the characterization video or image based on the visual characteristics in the video or image, so that the inquiry and management of the video or image data are realized.
Subscription management module 40 for managing the life cycle of subscriptions, controlling account security, creating editing events, archiving management events.
And a display module 50, configured to implement interaction with the subscription client and the publishing client with the system.
An embodiment of the present invention provides a content distribution apparatus 10 for executing the above content distribution method, as shown in fig. 2, including: a first acquisition unit 101, a second acquisition unit 102, a creation unit 103, a first matching unit 104, a second matching unit 105, a transmission unit 106.
The first obtaining unit 101 is configured to obtain an event to be published, which is sent by the publishing client, where the event to be published includes an event topic and an event attribute.
The topic is a bridge between the subscription client and the publishing client, and the topic can be an event topic or a subscription topic. Topics are used to represent learning phases, such as: elementary, junior middle, high and medium, respectively, topics generally do not contain wild cards to clarify the topic of the event to be issued, event attributes are used to represent subdivision knowledge points, attributes are layered by using separators (/), e.g., first grade/child; 7th gradation/matheat; 7th grade/geometry. The producer of an event is referred to as a publishing client and the consumer of an event is referred to as a subscribing client.
The second obtaining unit 102 is configured to obtain subscription conditions sent by all subscription clients, where the subscription conditions carry a subscription topic and a topic tag. Illustratively, a subscription topic is used to represent topics that are needed or of interest to a subscriber, such as: the subscription topic is primary school, and the topic label is a grade/Chinese.
The creating unit 103 is configured to create a multi-level index structure according to all subscription topics, where the multi-level index structure includes a root node, a primary node connected to the root node, and a secondary node connected to the primary node, each root node stores a subscription topic, each primary node stores a primary topic tag, each secondary node stores a secondary topic tag, and all nodes store corresponding subscription client identifiers.
The multi-level index structure is tree-shaped, and the subscription theme stored by the root node covers the primary theme label stored by the primary node and the secondary theme label stored by the secondary node. The primary theme tag overlays the secondary theme tag. In other embodiments, knowledge points can be further refined under the secondary topic label to form a tertiary topic label, a quaternary topic label and the like. And will not be described in any greater detail herein. The pointers to the root nodes are correspondingly stored in the index structure, so that when an event to be issued needs to be matched, quick positioning in the multi-level index structure can be performed according to the event attribute.
For example, the subscription topic of the subscription client a is primary, the topic label is a grade/language, and then the identity of the subscription client a is stored in the primary node (storing the grade primary topic label) and the secondary node (storing the language secondary topic label). The subscription client identifier may be an ID code of the subscription terminal, or may be a registration number when the subscription client registers, which is not limited herein.
The first matching unit 104 is configured to match an event topic of an event to be issued with subscription topics stored by all root nodes in the multi-level index structure.
And the second matching unit 105 is configured to match the event attribute with the primary topic label stored in the primary node and the secondary topic label stored in the secondary node, which are connected with the root node that is successfully matched, one by one, if the matching is successful, so as to obtain the primary topic label and the secondary topic label that are successfully matched.
And the sending unit 106 is configured to send the event to be issued to a target subscription client with successfully matched primary topic label and secondary topic label, where the target subscription client includes a subscription client identifier stored by a node where the secondary topic label is successfully matched.
In the scheme, event topics of events to be distributed are matched with subscription topics stored in a root node in the multi-level index structure, then event attributes are used for matching labels on all nodes until the events to be distributed are matched with a certain node in the multi-level index structure, so that subscribers corresponding to subscription client identifiers stored in the node can subscribe to the events to be distributed, and the matching efficiency is improved.
Optionally, the apparatus further comprises a tag determination unit,
The tag determining unit is used for determining a primary attribute tag and a secondary attribute tag of the event to be issued according to the event attribute of the event to be issued and a preset tag mapping table, wherein the tag mapping table comprises the corresponding relation between a field representing the event attribute and the primary attribute tag and the secondary attribute tag; matching the primary attribute labels of the events to be issued with the primary topic labels stored in the primary nodes connected with the successfully matched root nodes to obtain successfully matched primary topic labels; if the matching fails, outputting matching failure indication information; and if the matching is successful, matching the secondary attribute labels of the events to be issued with the secondary topic labels stored in the secondary nodes connected with the successfully matched primary nodes to obtain the successfully matched primary topic labels and secondary topic labels.
Optionally, the device further comprises a statistics unit, a first judging unit, a first confirming unit and a pushing unit.
The statistics unit is used for counting a plurality of subscription conditions of each subscription client; the first judging unit is used for judging whether the number of subscription conditions of the same subscription topic exceeds a preset threshold value in a preset time period; the first confirming unit is used for confirming the subscription theme as a target subscription theme of the subscription client; and the pushing unit is used for pushing the event conforming to the target subscription theme to the subscription client.
For example, the preset time period may be 1 month, 2 months, half year, etc., the number of times that the subscription client a subscribes to the subscription topic as a primary school is 20 times in one month, which indicates that the subscription client a is very focused on knowledge points in the primary school stage, the system confirms "primary school" as a target subscription topic, and then pushes to the subscription client a any event to be published that matches the topic of "primary school" among the events to be published.
Optionally, the apparatus further comprises a storage unit.
The storage unit is used for storing the event to be distributed into a corresponding event group of a preset database in a classified manner according to the event theme and the event attribute, wherein the event group comprises a plurality of events with the same event theme and the same event attribute; the pushing unit is further configured to push all the events in the event group to a subscription client subscribing to the event to be published according to a preset logic.
It will be appreciated that multiple events with the same event topic and the same event attribute are classified into an event group and may be stored in the same folder, and when the subscription client B subscribes to one event in the event group, the system will actively push other events in the event group to him. The preset logic may be periodically pushed to the subscribing client from new to old according to the release time of the events in the event group, for example.
Optionally, the device further comprises a third acquisition unit, a second judgment unit and an updating unit.
The third acquisition unit is used for acquiring subscription conditions sent by the subscription client, wherein the subscription conditions comprise the identity of the subscription client, a subscription theme and a theme label; the second judging unit is used for judging whether the subscribing client is a new user or not according to the identity; and the updating unit is used for updating the multi-level index structure according to the subscription theme and the theme label of the new user.
It can be understood that all the subscription client identifiers are stored in a preset record table, if a new user is present, the subscription client identifier of the new user is used to traverse the preset record table, the same subscription client identifier record cannot be found, if the same subscription client identifier record is found, the new user is not present, and only the subscription client identifier of the user is required to be added in the corresponding node in the multi-level index structure. If the user is a new user, the multi-level index structure needs to be updated according to the subscription theme and the theme label of the new user.
Optionally, the method further comprises: acquiring a subscription modification instruction of a subscription client, wherein the subscription modification instruction comprises a newly added subscription topic, a non-subscription topic and a topic label; and correspondingly modifying the root node, the primary node, the secondary node and the subscription client identifications configured by all the nodes in the multi-level index structure according to the subscription modification instruction.
Optionally, the subscription condition of the subscription client further includes a routing path of the received event of the subscription client; the sending unit 60 is further configured to send the event to be issued to the target subscription client that is successfully matched through the routing path stored in the database.
Embodiments of the present invention provide a non-transitory computer readable storage medium storing computer instructions, wherein the computer instructions cause a computer to perform the steps of:
acquiring an event to be issued, which is sent by an issuing client, wherein the event to be issued comprises an event theme and an event attribute; acquiring subscription conditions sent by all subscription clients, wherein the subscription conditions carry subscription topics and topic labels; creating a multi-level index structure according to all subscription topics, wherein the multi-level index structure comprises root nodes, primary nodes connected with the root nodes and secondary nodes connected with the primary nodes, each root node stores the subscription topics, each primary node stores a primary topic label, each secondary node stores a secondary topic label, and all nodes store corresponding subscription client identifiers; matching the event theme of the event to be issued with subscription themes stored by all root nodes in the multi-level index structure; if the matching is successful, matching the event attribute with the primary topic label stored in the primary node and the secondary topic label stored in the secondary node, which are connected with the root node of the successful matching, one by one, so as to obtain the primary topic label and the secondary topic label of the successful matching; and transmitting the event to be issued to a target subscription client with successfully matched primary topic labels and secondary topic labels, wherein the target subscription client comprises subscription client identifiers stored by the nodes where the secondary topic labels are successfully matched.
Optionally, the computer instructions cause the computer to further perform the steps of: determining a first-level attribute tag and a second-level attribute tag of an event to be issued according to the event attribute of the event to be issued and a preset tag mapping table, wherein the tag mapping table comprises the corresponding relation between a field representing the event attribute and the first-level attribute tag and the second-level attribute tag; matching the primary attribute labels of the events to be issued with the primary topic labels stored in the primary nodes connected with the successfully matched root nodes to obtain successfully matched primary topic labels; if the matching fails, outputting matching failure indication information; and if the matching is successful, matching the secondary attribute labels of the events to be issued with the secondary topic labels stored in the secondary nodes connected with the successfully matched primary nodes to obtain the successfully matched primary topic labels and secondary topic labels.
Optionally, the computer instructions cause the computer to further perform the steps of: counting a plurality of subscription conditions of each subscription client; judging whether the number of subscription conditions of the same subscription topic exceeds a preset threshold value within a preset time period; if yes, confirming the subscription theme as a target subscription theme of the subscription client; and pushing the events meeting the target subscription theme to the subscription client.
Optionally, the computer instructions cause the computer to further perform the steps of: according to the event theme and the event attribute, storing the event to be issued into a corresponding event group of a preset database in a classified manner, wherein the event group comprises a plurality of events with the same event theme and the same event attribute; pushing all the events in the event group to a subscription client subscribing the events to be published according to preset logic.
Optionally, the computer instructions cause the computer to further perform the steps of: acquiring subscription conditions sent by a subscription client, wherein the subscription conditions comprise an identity of the subscription client, a subscription theme and a theme label; judging whether the subscribing client is a new user or not according to the identity; if so, the multi-level index structure is updated according to the subscription subject and subject label of the new user.
Optionally, the computer instructions cause the computer to further perform the steps of: acquiring a subscription modification instruction of a subscription client, wherein the subscription modification instruction comprises a newly added subscription topic, a non-subscription topic and a topic label; and correspondingly modifying the root node, the primary node, the secondary node and the subscription client identifications configured by all the nodes in the multi-level index structure according to the subscription modification instruction.
Optionally, the computer instructions cause the computer to further perform the steps of: and sending the event to be issued to the target subscription client which is successfully matched through the routing path stored in the database.
Fig. 4 is a schematic diagram of an electronic device 300 according to an embodiment of the present invention, as shown in fig. 4, the electronic device 300 of the embodiment includes: at least one processor 310 and a communication interface 320; and at least one memory 330 communicatively coupled to the processor 310, wherein the memory 330 stores program instructions executable by the processor 310, the processor 310 invoking the program instructions capable of performing the above-described configurable data monitoring alert method. In order to avoid repetition, details are not repeated here.
The electronic device 300 may be a desktop computer, a notebook computer, a palm computer, a cloud server, or the like. Electronic devices may include, but are not limited to, a processor 310, a communication interface 320, and a memory 330. It will be appreciated by those skilled in the art that fig. 3 is merely an example of an electronic device 300 and is not intended to limit the electronic device 300, and may include more or fewer components than shown, or may combine certain components, or different components, e.g., the electronic device may further include a communication bus 340, etc.
The processor 101 may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 330 may be an internal storage unit of the electronic device 300, such as a hard disk or a memory of the electronic device 300. The memory 330 may also be an external storage device of the electronic device 300, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the electronic device 300. Further, the memory 330 may also include both internal storage units and external storage devices of the electronic device 300. Memory 330 is used to store program instructions as well as other programs and data required by the electronic device. The memory 330 may also be used to temporarily store data that has been output or is to be output.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
In the several embodiments provided in the present invention, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the elements is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple elements or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in hardware plus software functional units.
The integrated units implemented in the form of software functional units described above may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium, and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a Processor (Processor) to perform part of the steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather to enable any modification, equivalent replacement, improvement or the like to be made within the spirit and principles of the invention.