CN114449036B - Method and device for directionally distributing messages and computer equipment - Google Patents

Method and device for directionally distributing messages and computer equipment Download PDF

Info

Publication number
CN114449036B
CN114449036B CN202111613789.4A CN202111613789A CN114449036B CN 114449036 B CN114449036 B CN 114449036B CN 202111613789 A CN202111613789 A CN 202111613789A CN 114449036 B CN114449036 B CN 114449036B
Authority
CN
China
Prior art keywords
target
message
moment
target message
buffer list
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111613789.4A
Other languages
Chinese (zh)
Other versions
CN114449036A (en
Inventor
白松
杨嘉静
苏帅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tianyi Cloud Technology Co Ltd
Original Assignee
Tianyi Cloud Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tianyi Cloud Technology Co Ltd filed Critical Tianyi Cloud Technology Co Ltd
Priority to CN202111613789.4A priority Critical patent/CN114449036B/en
Publication of CN114449036A publication Critical patent/CN114449036A/en
Application granted granted Critical
Publication of CN114449036B publication Critical patent/CN114449036B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling

Abstract

The invention discloses a method, a device and computer equipment for directionally distributing messages, wherein the method comprises the following steps: generating each message detail table based on the message request packet; storing the target message identifications in a target message queue according to the sequence; acquiring a target pulling instruction sent by a target user, wherein the target pulling instruction comprises a first record identifier of a first target message pulled at a first moment and a second target message pulled at a second moment, and the first moment is adjacent to the second moment; and sending the first target message or the second target message to the target user through a preset confirmation mechanism. The invention can distribute the target information to different batches of target users at the same time in a directional way, is beneficial to saving the bandwidth, and meanwhile, based on a preset confirmation mechanism, different distribution strategies are flexibly executed by combining target pulling instructions carried by each target user, so that different requirements of the users are met, the accessibility and the accuracy of the target information pulled by each target user are ensured, and finally the information distribution efficiency is improved.

Description

Method and device for directionally distributing messages and computer equipment
Technical Field
The invention relates to the technical field of internet of things message task distribution, in particular to a method, a device and computer equipment for directionally distributing messages.
Background
With the rapid development of the internet of things technology, real-time distribution of massive messages is required to enhance user experience. In the related art, different messages are mainly distributed in a unicast or broadcast mode based on a message queue, and because the unicast distributes each message to a designated target user in a corresponding mode, if a plurality of designated target users are notified based on a multi-message queue or a multi-pic distribution mechanism, each message queue or each topic buffer table contains respective message contents, which obviously causes resource waste. While broadcasting is to send the targeted message to all users subscribed to the targeted message, it is apparent that this approach does not specify the individual distribution of messages to the targeted user and increases bandwidth waste. Therefore, the application range of the two message distribution modes is limited, so that the distribution mechanism cannot be flexibly changed, and different requirements of users cannot be met.
Disclosure of Invention
Therefore, the technical problem to be solved by the invention is to solve the problems that the independent distribution of the information to the target user cannot be designated, the bandwidth waste is increased, the application range of the distribution mode is not flexible, the distribution mechanism cannot be changed, and different requirements of the user cannot be met in the prior art, so that the invention provides a method, a device and computer equipment for directional distribution of the information.
According to a first aspect, an embodiment of the present invention provides a method for directional distribution of a message, including the steps of:
generating each message detail table based on a message request packet sent by a target user, wherein each message detail table comprises each target message identifier, each target message content and each distribution target number corresponding to each message detail table;
storing the target message identifications in a target message queue according to the sequence;
acquiring a target pulling instruction sent by a target user, wherein the target pulling instruction comprises a first record identifier of a first target message pulled at a first moment and a second target message pulled at a second moment, and the first moment is adjacent to the second moment;
and sending a first target message or a second target message to a target user through a preset confirmation mechanism according to the target message identifications, the message detail tables and the target pulling instruction.
In one embodiment, according to the target message identifiers, the message detail tables and the target pull instruction, a first target message or a second target message is sent to a target user through a preset confirmation mechanism, including:
confirming whether a first target buffer list at a first moment is generated or not;
when the first target buffer list at the first moment is not generated, searching a second target message from the message detail tables through each target message identifier in the target message queue;
generating a second target buffer list at a second moment, wherein the second target buffer list comprises a second record identifier and target message identifiers corresponding to second target messages;
and sending the second target message and the second record identifier to a target user.
In one embodiment, when generating the first target buffer list at the first time, the steps are performed by:
confirming whether the first record identifier in the first target buffer list is consistent with the first record identifier in the target pull instruction or not;
if the information is consistent, counting the distribution target number in each message detail table according to a descending mode based on each target message identifier corresponding to the first target message in the first target buffer list until the distribution target number is zero, deleting each message detail table corresponding to the first target message, and deleting the first target buffer list after finishing the counting operation of the descending mode;
searching a second target message from each message detail table based on each target message identifier corresponding to the second target message in the target message queue;
generating a second target buffer list at a second moment, wherein the second target buffer list comprises a second record identifier and target message identifiers corresponding to second target messages;
transmitting the second target message and the second record identifier to a target user;
if the information is inconsistent, searching the first target message from each message detail table based on each target message identifier corresponding to the first target message in the first target buffer list;
and sending the first target message and the first record identifier to a target user.
In one embodiment, the method for directionally distributing messages further includes:
and if the target user does not pull the content of each target message in each message detail table within the preset time, automatically deleting each message detail table.
In one embodiment, the first target message and the second target message include one or more of a CDN node data refresh message and/or a CDN node data configuration message and/or a CDN node data delivery message and/or a CDN node data communication message.
In one embodiment, a first preset number of pull first or second target messages for each time is determined by the target user.
In one embodiment, the target user that pulls the first target message or the second target message each time is a second preset number.
According to a third aspect, an embodiment of the present invention further provides an apparatus for directional distribution of a message, including:
the message list generation module is used for generating each message detail table based on a message request packet sent by a target user, wherein each message detail table comprises each target message identifier, each target message content and each distribution target number corresponding to each message detail table;
the message label storage module is used for storing the target message identifications in a target message queue according to the sequence;
the system comprises a pulling instruction acquisition module, a pulling instruction processing module and a processing module, wherein the pulling instruction acquisition module is used for acquiring a target pulling instruction sent by a target user, the target pulling instruction comprises a first record identifier of a first target message pulled at a first moment and a second target message pulled at a second moment, and the first moment is adjacent to the second moment;
and the directional sending module is used for sending the first target message or the second target message to the target user through a preset confirmation mechanism according to the target message identifications, the message detail tables and the target pulling instruction.
According to a fourth aspect, embodiments of the present invention also provide a computer readable storage medium storing computer instructions for causing a computer to perform the method of directional distribution of messages according to the first aspect or any implementation manner of the first aspect.
According to a fifth aspect, an embodiment of the present invention further provides a computer apparatus, including: the system comprises a memory and a processor, wherein the memory and the processor are in communication connection, the memory stores computer instructions, and the processor executes the computer instructions, so as to execute the method for distributing messages in a direction according to the first aspect or any implementation manner of the first aspect.
The technical proposal of the invention has the following advantages
The invention discloses a method, a device and computer equipment for directionally distributing messages, wherein the method comprises the following steps: generating each message detail table based on a message request packet sent by a target user, wherein each message detail table comprises each target message identifier, each target message content and each distribution target number corresponding to each message detail table; storing the target message identifications in a target message queue according to the sequence; acquiring a target pulling instruction sent by a target user, wherein the target pulling instruction comprises a first record identifier of a first target message pulled at a first moment and a second target message pulled at a second moment, and the first moment is adjacent to the second moment; and sending the first target message or the second target message to the target user through a preset confirmation mechanism according to the target message identifications, the message detail tables and the target pulling instruction. The method and the system can distribute the target information to different batches of target users in a directional mode, are beneficial to saving the bandwidth, and meanwhile, based on a preset confirmation mechanism, different distribution strategies are flexibly executed by combining target pulling instructions carried by target users in each time, so that different requirements of the users are met, the accessibility and the accuracy of target information pulled by the target users in each time are ensured, and finally the information distribution efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of one specific example of a method of targeted distribution of messages in an embodiment of the present invention;
FIG. 2 is a schematic diagram of an architecture of a mechanism for directing distribution of messages according to an embodiment of the present invention;
FIG. 3 is another schematic diagram illustrating an architecture of a mechanism for targeted distribution of messages according to an embodiment of the present invention;
FIG. 4 is a flow chart of another specific example of a method of targeted distribution of messages in an embodiment of the present invention;
FIG. 5 is another schematic diagram illustrating an architecture of a mechanism for targeted distribution of messages in accordance with an embodiment of the present invention;
fig. 6 is a block diagram illustrating a structure of an apparatus for directional distribution of a message according to an embodiment of the present invention;
fig. 7 is a schematic hardware diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made apparent and fully in view of the accompanying drawings, in which some, but not all embodiments of the invention are shown. 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.
In the description of the present invention, it should be noted that the directions or positional relationships indicated by the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. are based on the directions or positional relationships shown in the drawings, are merely for convenience of describing the present invention and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a specific orientation, be configured and operated in a specific orientation, and thus should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
In the description of the present invention, it should be noted that, unless explicitly specified and limited otherwise, the terms "mounted," "connected," and "connected" are to be construed broadly, and may be either fixedly connected, detachably connected, or integrally connected, for example; can be mechanically or electrically connected; the two components can be directly connected or indirectly connected through an intermediate medium, or can be communicated inside the two components, or can be connected wirelessly or in a wired way. The specific meaning of the above terms in the present invention will be understood in specific cases by those of ordinary skill in the art.
In addition, the technical features of the different embodiments of the present invention described below may be combined with each other as long as they do not collide with each other.
The method for directionally distributing the messages provided by the embodiment of the invention can be applied to the directional distribution scene of CDN node messages in the Internet of things, and can be a message distribution scene in other Internet of things application scenes. As shown in fig. 1, the method comprises the steps of:
step S11: based on the message request packet sent by the target user, each message detail table is generated, and each message detail table comprises each target message identifier, each target message content and each distribution target number corresponding to each message detail table.
The message request packet herein is shown in fig. 2, and is sent to the message storage unit for storage in the embodiment of the present invention by receiving, by the producer, a message request packet sent by the target user based on the rabitmq or the interface message packet, where the message request packet includes a target user topic list and a specific content message, where the information of the target user is recorded in the target user topic list, and the specific content message is a specific message that the target user wants to obtain. For example: the target user topic list records the information of the tenses, liu Jiang and Zhao Chen, and the specific content messages are target messages which the tenses, liu Jiang and Zhao Chen want to acquire respectively.
Each of the message detail tables described above may be represented by msgcalteid, representing message details of a target message, each of the message detail tables including message details and message entities, as shown in fig. 3, each of the message detail tables may be represented by msgcalteid 1, msgcalteid 2, msgcalteid 3, respectively, and may further express thousands of messages in the backward direction. In fig. 3, each target message content and each distribution target number are included in each msgcaltableid, for example: msgTableID1 represents a message for refreshing CDN node data, the content of the message is specific text content refreshed by the CDN node data, and the number of each distribution target is which target users can be sent by the CDN node data refresh, and the number of the target users is counted.
Wherein each message detail table corresponds to a target message identification, i.e. an ID number, in order to ensure the uniqueness of each message detail table. In fig. 3, it can be seen that msgctabeid 1, msgctabeid 2, msgctabeid 3, the message detail tables are numbered sequentially.
Through step S11, hundreds of target messages may be sorted according to the message labels, so as to perform directional distribution of the messages in order, and the corresponding target message identifications are marked in each message detail table so as to have uniqueness, so that message searching errors are avoided.
Step S12: storing the target message identifications in a target message queue according to the sequence.
The target message queue may be represented herein as a topic queue, in fig. 2 or 3, a topic1 queue, a topic2 queue, a topic3 queue … …, respectively. Thus, in step S12, a plurality of target message queues may be used to store the target message identifiers, where the target message identifiers stored in each target message queue are respectively arranged in a sequential order, for example: if the maximum storage number of each target message queue is 50, each target message queue may store 50 msgTableID, and each target message queue stores the same principle. The target message queue in step S12 may be stored by the message splitting unit.
Through step S12, only the target message identifiers are stored, and the target message content and the distribution target number corresponding to the target message identifiers are not stored together, so that it is obvious that excessive data is avoided occupying resources, energy consumption is further saved, and data overhead is reduced.
Step S13: and acquiring a target pulling instruction sent by a target user, wherein the target pulling instruction comprises a first record identifier of a first target message pulled at a first moment and a second target message pulled at a second moment, and the first moment is adjacent to the second moment.
And the target pulling instruction sent by the target user is specific information scheduled to be invoked by the target user and the identification information pulled by the last time.
In one embodiment, a first preset number of time pulled first or second target messages is determined by the target user. The first preset number can be flexibly set by the target user according to the situation of the target user, and is generally smaller than or equal to the upper limit value of the message number preset by the control mechanism of the method.
The first record identifier in the above description indicates a record identifier of the target user that pulls the first target message at the first time. If the second time is the current time, the first time is the time immediately before the current time, for example: the current time is represented by T2, i.e. the second time, and the first time may be represented by T1; for example: the current time is denoted by T3, i.e. the second time, and the first time may be denoted by T2. For example: the current time is denoted by T4, i.e. the second time, and the first time may be denoted by T3; for example: the current time T5 indicates the second time, and the first time may be indicated by T4. In summary, the first time instant and the second time instant may represent any two adjacent time instants. Therefore, the method for directionally distributing the message in the embodiment of the invention can directionally distribute the target message to the target user for a plurality of times at different times.
In one embodiment, the target user who pulls the first target message or the second target message each time is a second preset number. It can be seen in particular in fig. 2 that there are multiple target users, i.e. multiple message consumers in fig. 2, that multiple message consumers can pull multiple first target messages or second target messages simultaneously. Therefore, the method for directionally distributing the messages in the embodiment of the invention supports the simultaneous distribution of the target messages to the batch target users, can save the bandwidth, flexibly sets the second preset quantity according to the actual situation, and further meets the requirements of the batch users according to the quantity of the users which can support each time.
Through the step S13, the first record identifier of the first target message pulled at the first moment is loaded in the target pulling instruction, so that whether to distribute the second target message to be pulled at the second moment, that is, the current moment, to the target user can be confirmed based on the first record identifier, which is beneficial to ensuring the accessibility of receiving the target message at the last moment.
Step S14: and sending the first target message or the second target message to the target user through a preset confirmation mechanism according to the target message identifications, the message detail tables and the target pulling instruction.
The preset validation mechanism herein includes two different distribution scenarios, each being performed on the basis of each target message identity, each message detail table, and target pull instruction, as set forth below, i.e., as shown in fig. 4.
In a specific embodiment, in fig. 4, the step S14 includes sending, according to each target message identifier, each message detail table, and a target pull instruction, a first target message or a second target message to a target user through a preset acknowledgement mechanism, where the step includes:
step S41: it is determined whether to generate a first target buffer list at a first time.
Here, the first target buffer list at the first time, that is, the target buffer list at the time immediately before the current time, may be represented by a topic1 buffer table, a topic2 buffer table, and a topic3 buffer table in fig. 3. If the second moment is represented by T2, namely the current moment, the first moment is represented by T1, and the first target buffer list is represented by a topic1 buffer list; if the second time is denoted by T3, i.e. the current time, the first time is denoted by T2, the first target buffer list is denoted by topic2, and so on, and will not be described again here. The topic1 buffer table, the topic2 buffer table, and the topic3 buffer table are stored by the message storage unit.
Step S42: and when the first target buffer list at the first moment is not generated, searching the second target message from the message detail tables through the target message identifications in the target message queue.
For example: when the target user sends the target pulling instruction for the first time, the first target buffer list at the first time is not generated, and at this time, the first record identifier of the first target message at the first time records the target user to pull the target message for the first time. Therefore, in step S52, since the target buffer list has not been formed yet, in fig. 2, the message storage unit has not formed the target buffer list yet, and the corresponding second target message, that is, the target message that needs to be pulled by the target user at the current moment, may be searched from the message detail table by identifying msgctabeid 1, msgctabeid 2, msgctabeid 3 through each target message in the topic1 queue, topic2 queue, or topic3 queue. If the target message numbers stored in the topic queue are not enough to the N pieces of second target messages needed by the target user, all the target message contents corresponding to the N pieces of target message numbers are returned.
Step S43: and generating a second target buffer list at a second moment, wherein the second target buffer list comprises a second record identifier and target message identifiers corresponding to the second target message.
On the basis of the step S42, a second target buffer list at a second time, that is, a target buffer list at the current time, is further generated, where the target buffer list includes a record identifier and a target message identifier corresponding to the current time. For example: when the current moment is T2, the second record is marked as T2, the target message is marked as msgTableID2, and the T2 and the msgTableID2 are stored together in a topic2 buffer table; for example: and when the current moment is T3, the second record is identified as T3, the target message is identified as msgTableID3, and the T3 and the msgTableID3 are stored together in a topic3 buffer table.
Step S44: and sending the second target message and the second record identifier to the target user.
And when the current moment is T2, the message content in the message detail table of the second target message msgTableID2 and the packaged data of the second record identifier T2 are sent to the target user together.
Through the steps S41-S44, when the target user first pulls the target message, the target buffer list at the previous moment is not formed yet, and the corresponding target message content can be searched from the message detail tables based on the message labels stored in the target message queue, so that the target message distribution to the batch target users is realized, and meanwhile, the corresponding target message is called only by searching the target message label based on the target message queue, so that the bandwidth waste is reduced, the data overhead is saved, and the message distribution efficiency is improved.
In another embodiment, in fig. 4, the step S14 is executed by sending, according to each target message identifier, each message detail table, and the target pull instruction, the first target message or the second target message to the target user through the preset acknowledgement mechanism, and when the first target buffer list at the first moment is generated, by:
step S45: and confirming whether the first record identification in the first target buffer list is consistent with the information of the first record identification in the target pull instruction.
For example: the first record mark in the first target buffer list is T1, the first record mark in the target pull instruction is T1, and for distinguishing, the first record mark in the first target buffer list is represented by T1 ', and whether the information of T1 and T1' is consistent is confirmed; for example: the first record in the first target buffer list is marked with T2, the first record in the target pull instruction is marked with T2, and the first target buffer list is used for distinguishing
Wherein the first record mark is denoted by T2 ', and confirms whether the information of T2 and T2' is consistent; for example: order of (A)
The first record in the tag pull instruction is identified as T3, and for distinction, the first record in the first target buffer list
The record mark is denoted by T3 ', and confirms whether the information of T3 and T3' is consistent. By matching T1 with T1 ' or T2 with T2 ' or T3 with T3 ', the accuracy of information confirmation is ensured.
Step S46: based on the target message identifications corresponding to the first target message in the first target buffer list, counting the distribution target number in each message detail table in a descending manner until the distribution target number is zero, deleting each message detail table corresponding to the first target message, and deleting the first target buffer list after the counting operation in the descending manner is completed.
If the information is consistent, the target user successfully consumes the target message at the last moment, namely the message arrives successfully, and at the moment, the target message to be pulled at the current moment can be distributed to the previous target user. In fig. 3, for example: the first target buffer list may be a topic1 buffer table, a topic2 buffer table, and a topic3 buffer table, and is counted in a gradually decreasing manner (for example, each time decreasing in a decreasing manner) from the distribution number of target messages in each message detail table based on each message label stored in the topic1 buffer table, the topic2 buffer table, and the topic3 buffer table respectively, until the distribution target number in each message detail table is zero, each message detail table corresponding to the first target message at the previous time is deleted, and when the counting operation in the decreasing manner is completed, the first target buffer list is deleted. Due to action delay, each message detail table and the corresponding first target buffer list need to be deleted successively at certain intervals. Because the target message at the previous moment is successfully consumed by the target user, the corresponding message detail tables and the target cache list are deleted in real time and sequentially, so that the memory occupied by the related data at the previous moment is avoided, the bandwidth is enhanced, and the running speed is improved.
Step S47: and searching the second target message from the message detail tables based on the target message identifications corresponding to the second target message in the target message queue.
Based on the step S46, the second target message is searched from the message detail table based on the target message identifiers of the second target message in the target message queue, that is, the target message identifiers of the target message at the current moment, so that the target message required to be pulled by the target user is searched correspondingly according to the one-to-one correspondence, thereby ensuring the accuracy of the distribution of the target message. If the target message numbers stored in the topic queue are not enough to the N pieces of second target messages needed by the target user, all the target message contents corresponding to the N pieces of target message numbers are returned.
Step S48: and generating a second target buffer list at a second moment, wherein the second target buffer list comprises a second record identifier and target message identifiers corresponding to the second target message.
A second target buffer list at a second time, namely a topic buffer list at the current time, is generated in order to ensure that the user pulls the target message at the next time.
Step S49: and sending the second target message and the second record identifier to the target user.
And sending the second target message and the second record identifier at the current moment to the target user, so that the user consumes the target message at the current moment and simultaneously pulls the target message at the next moment in the past.
Step S50: if the information is inconsistent, searching the first target message from the message detail tables based on the target message identifiers corresponding to the first target message in the first target buffer list.
Step S51: the first target message and the first record identification are sent to the target user.
For example: the first record mark in the first target buffer list is T1, the first record mark in the target pull instruction is T1, in order to distinguish, the first record mark in the first target buffer list is represented by T1 ', whether the information of T1 and T1 ' is consistent is confirmed, when the information of T1 and T1 ' is inconsistent, it is indicated that the target user does not successfully consume the target message at the last moment, namely, the target message is not successfully received by the target user, and the target message and the first record mark at the last moment still need to be sent to the current target user at the current moment. If the information of T1 and T1' is not consistent, the last time target message and the first record identification are sent to the target user until the target user successfully receives the first target message. Thus, the target message can be ensured to be successfully consumed by the target user in real time.
In one implementation manner, the method for directionally distributing the message in the embodiment of the invention further comprises the following steps:
if the target user does not pull the content of each target message in each message detail table within the preset time, automatically deleting each message detail table.
The preset time can be flexibly set according to actual conditions. For example: the target users do not pull the content of each target message in each message detail table for a long time, which indicates that the content of the message does not have any attention of the target users, and the message detail table can be deleted in time so as to avoid occupying memory space and further save data overhead.
As shown in fig. 5, a dynamic diagram of a target message pulled by a target user at each time of a method for distributing a message in a targeted manner in an embodiment of the present invention is shown.
In an implementation manner, in the method for directional delivery of a message in the embodiment of the present invention, the first target message and the second target message include one or more of a CDN node data refresh message and/or a CDN node data configuration message and/or a CDN node data delivery message and/or a CDN node data communication message. For example: the first target message or the second target message pulled by the target user at each time can be any one or more of internet messages, namely, the target user can support to distribute different types of message tasks to batch target users.
The target users in the embodiment of the invention represent batch target users pulled before each time, and the first target messages and the second target messages at any two adjacent moments are of a first preset quantity. Therefore, by executing the steps, the embodiment of the invention can distribute the target information to different batches of target users at the same time in a directional way, is beneficial to saving the bandwidth, and meanwhile, based on a preset confirmation mechanism, different distribution strategies are flexibly executed by combining the target pulling instructions carried by the target users in each time, so that different requirements of the users are met, the accessibility and the accuracy of the target information pulled by the target users in each time are also ensured, and finally the information distribution efficiency is improved.
Based on the same concept, as shown in fig. 6, an embodiment of the present invention further provides an apparatus for directional message distribution, including the following modules:
a message list generating module 61, configured to generate, based on a message request packet sent by a target user, each message detail table, where each message detail table includes each target message identifier, each target message content, and each distribution target number corresponding to each message detail table;
a message label storing module 62, configured to store each target message identifier in a target message queue according to a sequence;
a pull instruction obtaining module 63, configured to obtain a target pull instruction sent by a target user, where the target pull instruction includes a first record identifier of a first target message pulled at a first moment, and a second target message pulled at a second moment, and the first moment is adjacent to the second moment;
the directional sending module 64 is configured to send the first target message or the second target message to the target user through a preset acknowledgement mechanism according to each target message identifier, each message detail table and the target pull instruction.
In one embodiment, directional transmitting module 64 includes:
the first confirming sub-module is used for confirming whether a first target buffer list at a first moment is generated or not;
the first searching sub-module is used for searching the second target message from the message detail tables through each target message identifier in the target message queue when the first target buffer list at the first moment is not generated;
the first generation submodule is used for generating a second target buffer list at a second moment, and the second target buffer list comprises a second record identifier and target message identifiers corresponding to second target messages;
and sending the second target message and the second record identifier to the target user.
In one implementation manner, the device for directional distribution of messages in the embodiment of the present invention, when generating the first target buffer list at the first moment, is executed by the following modules:
the second confirming sub-module is used for confirming whether the first record identifier in the first target buffer list is consistent with the first record identifier in the target pulling instruction;
the counting and deleting sub-module is used for counting the distribution target number in each message detail table according to a descending mode based on each target message identifier corresponding to the first target message in the first target buffer list until the distribution target number is zero if the information is consistent, deleting each message detail table corresponding to the first target message, and deleting the first target buffer list after finishing the counting operation of the descending mode;
the second searching sub-module is used for searching the second target message from the message detail tables based on the target message identifiers corresponding to the second target message in the target message queue;
the second generation submodule is used for generating a second target buffer list at a second moment, and the second target buffer list comprises a second record identifier and target message identifiers corresponding to second target messages;
the first sending submodule is used for sending the second target message and the second record identifier to the target user;
the third searching sub-module is used for searching the first target message from the message detail tables based on the target message identifiers corresponding to the first target message in the first target buffer list if the information is inconsistent;
and the second sending submodule is used for sending the first target message and the first record identifier to the target user.
In one implementation manner, the device for directionally distributing messages in the embodiment of the invention further comprises:
and the information clearing module is used for automatically deleting each message detail table if the target user does not pull the content of each target message in each message detail table within the preset time.
In an implementation manner, the device for directional delivery of a message in the embodiment of the present invention, the first target message and the second target message include one or more of a CDN node data refresh message and/or a CDN node data configuration message and/or a CDN node data delivery message and/or a CDN node data communication message.
In one implementation, the device for directional distribution of messages according to the embodiment of the present invention determines, by the target user, a first preset number of pull first target messages or second target messages each time.
The device for directionally distributing the messages in the embodiment of the invention pulls the target users of the first target message or the second target message to a second preset number in each time.
Based on the same conception, the embodiment of the present invention further provides a computer device, as shown in fig. 7, which may include a processor 71 and a memory 72, where the processor 71 and the memory 72 may be connected by a bus or other means, and in fig. 7, the connection is exemplified by a bus.
The processor 71 may be a central processing unit (Central Processing Unit, CPU). The processor 71 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 combinations of the above.
Memory 72, as a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer executable programs, and modules. The processor 71 executes various functional applications of the processor and data processing, i.e., a method of implementing the directional distribution of messages in the above-described embodiments, by running non-transitory software programs, instructions, and modules stored in the memory 72.
Memory 72 may include a storage program area that may store an operating system, at least one application program required for functionality, and a storage data area; the storage data area may store data created by the processor 71, etc. In addition, memory 72 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, memory 72 may optionally include memory located remotely from processor 71, such remote memory being connectable to processor 71 through a network. Examples of such networks include, but are not limited to, the power grid, the internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
The one or more modules are stored in the memory 72 and when executed by the processor 71 perform the method of directed distribution of messages in the embodiment shown in the figures.
The details of the computer device may be understood with reference to the corresponding related descriptions and effects of the embodiments shown in the drawings, which are not repeated herein.
It will be appreciated by those skilled in the art that implementing all or part of the above-described embodiment method may be implemented by a computer program to instruct related hardware, where the program may be stored in a computer readable storage medium, and the program may include the above-described embodiment method when executed. Wherein the storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a Flash Memory (Flash Memory), a Hard Disk (HDD), or a Solid State Drive (SSD); the storage medium may also comprise a combination of memories of the kind described above.
It is apparent that the above examples are given by way of illustration only and are not limiting of the embodiments. Other variations or modifications of the above teachings will be apparent to those of ordinary skill in the art. It is not necessary here nor is it exhaustive of all embodiments. While still being apparent from variations or modifications that may be made by those skilled in the art are within the scope of the invention.

Claims (8)

1. A method of directionally distributing messages, comprising the steps of:
generating each message detail table based on a message request packet sent by a target user, wherein each message detail table comprises each target message identifier, each target message content and each distribution target number corresponding to each message detail table;
storing the target message identifications in a target message queue according to the sequence;
acquiring a target pulling instruction sent by a target user, wherein the target pulling instruction comprises a first record identifier of a first target message pulled at a first moment and a second target message pulled at a second moment, and the first moment is adjacent to the second moment; the second time is the current time, and the first time is the time previous to the current time;
according to the target message identifications, the message detail tables and the target pulling instruction, a first target message or a second target message is sent to a target user through a preset confirmation mechanism;
according to the target message identifications, the message detail tables and the target pulling instruction, a first target message or a second target message is sent to a target user through a preset confirmation mechanism, and the method comprises the following steps:
confirming whether a first target buffer list at a first moment is generated or not;
when the first target buffer list at the first moment is not generated, searching a second target message from the message detail tables through each target message identifier in the target message queue;
generating a second target buffer list at a second moment, wherein the second target buffer list comprises a second record identifier and target message identifiers corresponding to second target messages;
transmitting the second target message and the second record identifier to a target user;
when a first target buffer list at a first moment is generated, the method is performed by the following steps:
confirming whether the first record identifier in the first target buffer list is consistent with the first record identifier in the target pull instruction or not;
if the information is consistent, counting the distribution target number in each message detail table according to a descending mode based on each target message identifier corresponding to the first target message in the first target buffer list until the distribution target number is zero, deleting each message detail table corresponding to the first target message, and deleting the first target buffer list after finishing the counting operation of the descending mode;
searching a second target message from each message detail table based on each target message identifier corresponding to the second target message in the target message queue;
generating a second target buffer list at a second moment, wherein the second target buffer list comprises a second record identifier and target message identifiers corresponding to second target messages;
transmitting the second target message and the second record identifier to a target user;
if the information is inconsistent, searching the first target message from each message detail table based on each target message identifier corresponding to the first target message in the first target buffer list;
and sending the first target message and the first record identifier to a target user.
2. The method of directional distribution of messages according to claim 1, further comprising:
and if the target user does not pull the content of each target message in each message detail table within the preset time, automatically deleting each message detail table.
3. The method of directed delivery of messages according to any of claims 1 to 2, wherein the first and second target messages comprise one or more of a CDN node data refresh message and/or a CDN node data configuration message and/or a CDN node data delivery message and/or a CDN node data communication message.
4. The method of directed distribution of messages according to any of claims 1 to 2, wherein a first preset number of pull first or second target messages each time is determined by the target user.
5. The method of directional distribution of messages according to claim 4, wherein said target user who pulls said first target message or said second target message each time is a second preset number.
6. An apparatus for directionally distributing messages, comprising the following modules:
the message list generation module is used for generating each message detail table based on a message request packet sent by a target user, wherein each message detail table comprises each target message identifier, each target message content and each distribution target number corresponding to each message detail table;
the message label storage module is used for storing the target message identifications in a target message queue according to the sequence;
the system comprises a pulling instruction acquisition module, a pulling instruction processing module and a processing module, wherein the pulling instruction acquisition module is used for acquiring a target pulling instruction sent by a target user, the target pulling instruction comprises a first record identifier of a first target message pulled at a first moment and a second target message pulled at a second moment, and the first moment is adjacent to the second moment; the second time is the current time, and the first time is the time previous to the current time;
the directional sending module is used for sending a first target message or a second target message to a target user through a preset confirmation mechanism according to the target message identifications, the message detail tables and the target pulling instruction;
according to the target message identifications, the message detail tables and the target pulling instruction, a first target message or a second target message is sent to a target user through a preset confirmation mechanism, and the method comprises the following steps:
confirming whether a first target buffer list at a first moment is generated or not;
when the first target buffer list at the first moment is not generated, searching a second target message from the message detail tables through each target message identifier in the target message queue;
generating a second target buffer list at a second moment, wherein the second target buffer list comprises a second record identifier and target message identifiers corresponding to second target messages;
transmitting the second target message and the second record identifier to a target user;
when a first target buffer list at a first moment is generated, the method is performed by the following steps:
confirming whether the first record identifier in the first target buffer list is consistent with the first record identifier in the target pull instruction or not;
if the information is consistent, counting the distribution target number in each message detail table according to a descending mode based on each target message identifier corresponding to the first target message in the first target buffer list until the distribution target number is zero, deleting each message detail table corresponding to the first target message, and deleting the first target buffer list after finishing the counting operation of the descending mode;
searching a second target message from each message detail table based on each target message identifier corresponding to the second target message in the target message queue;
generating a second target buffer list at a second moment, wherein the second target buffer list comprises a second record identifier and target message identifiers corresponding to second target messages;
transmitting the second target message and the second record identifier to a target user;
if the information is inconsistent, searching the first target message from each message detail table based on each target message identifier corresponding to the first target message in the first target buffer list;
and sending the first target message and the first record identifier to a target user.
7. A computer readable storage medium storing computer instructions for causing the computer to perform the method of directed distribution of messages of any one of claims 1 to 5.
8. A computer device, comprising: a memory and a processor in communication with each other, the memory having stored therein computer instructions that, upon execution, perform the method of directional distribution of messages as claimed in any one of claims 1 to 5.
CN202111613789.4A 2021-12-27 2021-12-27 Method and device for directionally distributing messages and computer equipment Active CN114449036B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111613789.4A CN114449036B (en) 2021-12-27 2021-12-27 Method and device for directionally distributing messages and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111613789.4A CN114449036B (en) 2021-12-27 2021-12-27 Method and device for directionally distributing messages and computer equipment

Publications (2)

Publication Number Publication Date
CN114449036A CN114449036A (en) 2022-05-06
CN114449036B true CN114449036B (en) 2023-06-23

Family

ID=81364758

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111613789.4A Active CN114449036B (en) 2021-12-27 2021-12-27 Method and device for directionally distributing messages and computer equipment

Country Status (1)

Country Link
CN (1) CN114449036B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012058793A (en) * 2010-09-06 2012-03-22 Hitachi Information Systems Ltd Business information linkage system and business information linkage method

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10019297B2 (en) * 2013-04-03 2018-07-10 Salesforce.Com, Inc. Systems and methods for implementing bulk handling in asynchronous processing
CN107454144A (en) * 2017-07-03 2017-12-08 深圳市金立通信设备有限公司 Information processing method and server
US10642877B2 (en) * 2017-12-29 2020-05-05 Facebook, Inc. Techniques for consistent reads in a split message store
CN108388407B (en) * 2018-02-10 2020-12-25 深圳壹账通智能科技有限公司 Message processing method and device, computer equipment and storage medium
CN109582446A (en) * 2018-10-11 2019-04-05 中国建设银行股份有限公司 Quasi real time asynchronous batch processing system, method, apparatus and storage medium
CN111385330B (en) * 2018-12-29 2024-01-26 广州市百果园信息技术有限公司 Message pushing method, device, computer equipment and storage medium
CN111770350B (en) * 2020-06-23 2022-09-16 北京字节跳动网络技术有限公司 Method and device for pulling message in live broadcast room, computer equipment and storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012058793A (en) * 2010-09-06 2012-03-22 Hitachi Information Systems Ltd Business information linkage system and business information linkage method

Also Published As

Publication number Publication date
CN114449036A (en) 2022-05-06

Similar Documents

Publication Publication Date Title
CN110290180B (en) Distributed task scheduling method and device, computer equipment and storage medium
CN109921843B (en) Beidou short message communication method for satellite remote education system
WO2021159831A1 (en) Programming platform user code running method, platform, node, device and medium
CN108900627B (en) Network request method, terminal device and storage medium
CN112286723A (en) Computer room disaster recovery control method, terminal and storage medium
CN111221793A (en) Data mining method, platform, computer equipment and storage medium
CN116566984B (en) Routing information creation method and device of k8s container cluster and electronic equipment
EP3091712A1 (en) Smart device for realizing multiple-device collaboration and working method for multiple-device collaboration
CN112256451A (en) Timing service message generation method and device, electronic equipment and storage medium
CN114449036B (en) Method and device for directionally distributing messages and computer equipment
CN113986534A (en) Task scheduling method and device, computer equipment and computer readable storage medium
CN110839061B (en) Data distribution method, device and storage medium
CN106790354B (en) Communication method and device for preventing data congestion
CN111104231B (en) Message receiving and sending method, receiving and sending device, server and system in multi-level environment
CN112714146B (en) Resource scheduling method, device, equipment and computer readable storage medium
CN111131741A (en) Multi-party video call method, system, device and computer readable storage medium
CN116974655A (en) Capability scheduling method and capability scheduling functional entity
CN112615773B (en) Message processing method and system
CN114501347A (en) Information interaction method, device and system between heterogeneous systems
CN112437162A (en) Unmanned ship information interaction method, system and terminal based on subscription and release mechanism
CN112613298A (en) Data verification method, system, computer program product and electronic equipment
CN112417015A (en) Data distribution method and device, storage medium and electronic device
US20210297986A1 (en) Method and device of transmitting information and base station
CN113453043B (en) Video scheduling optimization method and device, computer equipment and storage medium
CN112087373B (en) Message sending method and service device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant