A message pushing method, device, apparatus and storage medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-21
- Publication Date
- 2026-08-11
AI Technical Summary
现有技术中,资源消息在各业务系统中的交互方法有较大的局限性,用户需要订阅某个资源时,需要依次订阅该资源的上级资源以及该资源,整个过程需要多次订阅操作,降低了资源消息加载和发送的效率,并且手动寻找订阅容易出现遗漏
[0030] In this application, a subscription strategy for a target resource subscription system is obtained, and a corresponding target resource message is determined based on the subscription strategy. The parent resource message corresponding to the target resource message is determined based on the resource dependencies of the target resource message. The target resource message and the parent resource message are added to a corresponding pending-send queue, and the resource messages in the pending-send queue are sent to the target resource subscription system. It is evident that by automatically determining the parent resource message corresponding to the target resource message based on its resource dependencies and storing both the parent and target resource messages in the pending-send queue, the problem of manually creating subscriptions for dependent resources during resource message creation is solved. In other words, a single subscription automatically creates subscription strategies for all dependent resources, enabling the push of discrete messages with dependent relationships.
Smart Images

Figure CN116708550B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a message push method, apparatus, device, and storage medium. Background Technology
[0002] Currently, with the rapid development of information network platforms, resources between various business systems within these platforms need to be mutually subscribed to. Therefore, the stability and integrity of resource message transmission must be guaranteed. Existing technologies have significant limitations in the interaction methods of resource messages between business systems. When a user needs to subscribe to a resource, they must sequentially subscribe to the resource's parent resource and then to the resource itself. This process requires multiple subscription operations, reducing the efficiency of resource message loading and sending, and manually searching for subscriptions can easily lead to omissions. Summary of the Invention
[0003] In view of this, the purpose of this invention is to provide a message push method, apparatus, device, and medium that can subscribe to all related resources with dependencies through a single subscription. The specific solution is as follows:
[0004] Firstly, this application discloses a message push method, including:
[0005] Obtain the subscription policy for the target resource subscription system, and determine the corresponding target resource message based on the subscription policy;
[0006] The parent resource message corresponding to the target resource message is determined based on the resource dependency relationship of the target resource message;
[0007] The target resource message and the parent resource message are added to the corresponding queue to be sent, and the resource messages in the queue to be sent are sent to the target resource subscription system.
[0008] Optionally, adding the target resource message and the parent resource message to the corresponding queue to be sent includes:
[0009] Check if there are any filtering conditions for the parent resource message in the subscription strategy;
[0010] If it exists, the superior resource message is filtered according to the filtering conditions to obtain the target superior resource message;
[0011] Add the target resource message and the target parent resource message to the queue to be sent.
[0012] Optionally, determining the parent resource message corresponding to the target resource message based on the resource dependency relationship of the target resource message includes:
[0013] Based on the resource dependencies of the target resource message, the first parent resource message corresponding to the target resource message is determined. Then, based on the resource dependencies of the first parent resource message, the parent resource message corresponding to the first parent resource message is determined, until all parent resource messages corresponding to the target resource message are found.
[0014] Optionally, sending the resource messages in the queue to be sent to the target resource subscription system includes:
[0015] In accordance with the order of resources from superior to subordinate, the resource messages in the queue to be sent are sent to the target resource subscription system in sequence, and before sending each resource message, it is determined whether the resource message meets the sending conditions.
[0016] Optionally, the sending conditions include the resource message being the top-level resource message, or the direct parent resource message of the resource message being successfully sent.
[0017] Optionally, sending the resource messages in the queue to be sent to the target resource subscription system includes:
[0018] The resource messages in the queue to be sent are sent to the message registration and sending service, so that the message registration and sending service can perform channel checks and translation encryption before sending the resource messages to the target resource subscription system.
[0019] The message registration and sending service is also used to display resource messages to be sent, resource messages sent successfully, and resource messages sent abnormally.
[0020] Optionally, after sending the resource messages in the queue to be sent to the target resource subscription system, the method further includes:
[0021] Receive message receipts from the target resource subscription system and modify the status of the corresponding resource messages according to the message receipts so that unsuccessfully received resource messages can be resent after restarting.
[0022] Secondly, this application discloses a message push device, comprising:
[0023] The strategy acquisition module is used to acquire the subscription strategy for the target resource subscription system and determine the corresponding target resource message based on the subscription strategy.
[0024] The superior resource determination module is used to determine the superior resource message corresponding to the target resource message based on the resource dependency relationship of the target resource message;
[0025] The resource message sending module is used to add the target resource message and the superior resource message to the corresponding waiting queue, and send the resource message in the waiting queue to the target resource subscription system.
[0026] Thirdly, this application discloses an electronic device, including:
[0027] Memory, used to store computer programs;
[0028] A processor is used to execute the computer program to implement the aforementioned message push method.
[0029] Fourthly, this application discloses a computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the aforementioned message push method.
[0030] In this application, a subscription strategy for a target resource subscription system is obtained, and a corresponding target resource message is determined based on the subscription strategy. The parent resource message corresponding to the target resource message is determined based on the resource dependencies of the target resource message. The target resource message and the parent resource message are added to a corresponding pending-send queue, and the resource messages in the pending-send queue are sent to the target resource subscription system. It is evident that by automatically determining the parent resource message corresponding to the target resource message based on its resource dependencies and storing both the parent and target resource messages in the pending-send queue, the problem of manually creating subscriptions for dependent resources during resource message creation is solved. In other words, a single subscription automatically creates subscription strategies for all dependent resources, enabling the push of discrete messages with dependent relationships. Attached Figure Description
[0031] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0032] Figure 1 A flowchart of a message push method provided in this application;
[0033] Figure 2 A flowchart of a specific message push method provided in this application;
[0034] Figure 3 A schematic diagram of a message push device provided in this application;
[0035] Figure 4This application provides a structural diagram of an electronic device. Detailed Implementation
[0036] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0037] In existing technologies, the interaction methods of resource messages in various business systems have significant limitations. When a user needs to subscribe to a resource, they need to subscribe to the resource's parent resource and the resource itself in sequence. The entire process requires multiple subscription operations, which reduces the efficiency of resource message loading and sending.
[0038] This application discloses a message push method, see [link to relevant documentation] Figure 1 As shown, the method may include the following steps:
[0039] Step S11: Obtain the subscription policy for the target resource subscription system, and determine the corresponding target resource message based on the subscription policy.
[0040] In this embodiment, the user's subscription policy for the target resource subscription system is first obtained, and then the corresponding target resource message is determined according to the subscription policy. The subscription policy can be a single-selection subscription policy, such as subscription for a certain type of academic qualification.
[0041] Step S12: Determine the parent resource message corresponding to the target resource message based on the resource dependency relationship of the target resource message.
[0042] In this embodiment, after determining the target resource message, the corresponding parent resource message is determined based on the resource dependencies of the target resource message. It is understood that resources, as indispensable and important components, do not exist independently in the business system; they will always have dependencies on other resources. Therefore, the parent resource message of the target resource message is determined through these dependencies. Typically, the target resource message is the lowest-level resource message, and then the parent resource message is searched upwards based on this.
[0043] In this embodiment, determining the parent resource message corresponding to the target resource message based on the resource dependency relationship of the target resource message may include: determining the first parent resource message corresponding to the target resource message based on the resource dependency relationship of the target resource message, then determining the parent resource message corresponding to the first parent resource message based on the resource dependency relationship of the first parent resource message, and so on, until all parent resource messages corresponding to the target resource message are found. That is, parent resource messages may include the direct parent resource message of the target resource message, as well as the next-highest parent resource message, up to the highest-level resource type message. For example, the target resource message is a user resource message, the parent resource message of the user resource message is an organization resource message, and the parent resource message of the organization resource message is an institutional resource message.
[0044] Step S13: Add the target resource message and the parent resource message to the corresponding queue to be sent, and send the resource message in the queue to the target resource subscription system.
[0045] In this embodiment, the identified target resource message and its parent resource message are added to their respective pending-send queues. Then, the resource messages in these queues are sent to the target resource subscription system. Specifically, a pending-send queue is created for each target resource message, storing the target resource message and its dependent parent resource messages. This ensures that if an error occurs during resource message transmission, subsequent undependent resource messages can still be pushed, guaranteeing the timeliness of resource messages. Simultaneously, concurrent operations are performed based on the contents of the pending-send queues, improving the efficiency of resource message transmission.
[0046] In this embodiment, adding the target resource message and the parent resource message to the corresponding sending queue may include: querying whether there are filtering conditions for the parent resource message in the subscription strategy; if so, filtering the parent resource message according to the filtering conditions to obtain the target parent resource message; and adding the target resource message and the target parent resource message to the sending queue. That is, the number of parent resource messages for the target resource message may be massive. Users can select a portion of the parent resource messages using filtering conditions and add that portion as the target parent resource message to the sending queue, improving the accuracy of resource messages and saving transmission bandwidth. Specifically, filtering can be achieved by automatically constructing subscription strategies for organizational resources and institutional resources based on filtering conditions on the basis of the original subscription strategy, making the resource message construction strategy more efficient and stable.
[0047] In this embodiment, sending the resource messages in the queue to be sent to the target resource subscription system may include: sequentially sending the resource messages in the queue to be sent to the target resource subscription system according to the order of resources from superior to subordinate, and determining whether the resource message meets the sending conditions before sending each resource message. That is, resource synchronization is performed sequentially according to the level of dependency, message interaction is also performed sequentially, and it is necessary to determine whether the sending conditions are met before sending.
[0048] In this embodiment, the sending conditions include the resource message being the top-level resource message, or the direct parent resource message of the resource message being successfully sent. That is, resources at the head of the queue are sequentially retrieved from the queue to be sent, and their sending conditions are checked. Specifically, it is determined whether the resource's parent dependent resource has been successfully sent. If sent successfully, the resource can be sent; for example, if an organizational resource is successfully sent, the current organizational resource can be sent. If the resource has no parent dependent resource, such as an organizational resource, then the sending conditions are met.
[0049] In this embodiment, sending the resource messages in the queue to be sent to the target resource subscription system may include: sending the resource messages in the queue to be sent to a message registration and sending service, so that the message registration and sending service can perform channel checks and translation encryption before sending the resource messages to the target resource subscription system; the message registration and sending service is also used to display the resource messages to be sent, the resource messages sent successfully, and the resource messages sent abnormally.
[0050] In this embodiment, the core service of a pre-created synchronous resource algorithm can be applied. Specifically, the resource message is sent to the message registration and sending service. After channel checking and translation encryption, the message registration and sending service forwards it to the target resource subscription system. The message registration and sending service loads the relevant information of the target resource subscription system according to the subscription strategy of the resource to be sent and checks the message interaction channel of that resource subscription system. Then, according to the communication protocol, it translates the resource to be sent and encrypts the translation result to construct the sending message. Finally, according to the message exchange address of the resource subscription system, the resource message is sent to the target resource subscription system. Simultaneously, the message registration and sending service also displays resource messages to be sent, successfully sent resource messages, and abnormally sent resource messages. Users can view these messages and their specific reasons for abnormalities in the resource message monitoring list of the message registration and sending service. Therefore, by implementing a more comprehensive resource message sending monitoring system through the message registration and sending service, the lifecycle of resource message sending can be monitored, resource messages in various states can be managed uniformly, and the operation and maintenance costs of the resource message sending service can be reduced.
[0051] In this embodiment, after sending the resource messages in the queue to be sent to the target resource subscription system, the process may further include: receiving a message receipt from the target resource subscription system and modifying the status of the corresponding resource message according to the message receipt, so as to resend unsuccessfully received resource messages after restarting. That is, after receiving the resource message, the target resource subscription system sends a message receipt to the message registration and sending service, which then forwards it to the core service of the synchronization resource algorithm, so as to modify the status of the corresponding resource message according to the message receipt, such as whether it has been successfully sent or not, so as to resend unsuccessfully received resource messages after restarting. Therefore, for messages that fail to be sent, a reasonable message resending mechanism ensures that the use of other business functions of the system is not affected. It is evident that, regarding the problem in the prior art where the system cannot continue to perform previously unfinished resource message interactions after a system crash and restart, this embodiment can effectively solve the problem of efficient resource loading in the system, ensuring that resource messages are sent sequentially according to certain dependencies and are guaranteed to succeed; at the same time, after the system crashes and restarts, it can continue to interact with other systems regarding unsuccessfully sent resource messages.
[0052] As can be seen from the above, this embodiment obtains the subscription strategy for the target resource subscription system, determines the corresponding target resource message based on the subscription strategy, determines the corresponding parent resource message based on the resource dependency relationship of the target resource message, adds the target resource message and the parent resource message to the corresponding waiting queue, and sends the resource messages in the waiting queue to the target resource subscription system. It is evident that by automatically determining the parent resource message corresponding to the target resource message based on the resource dependency relationship, and storing both the parent resource message and the target resource message in the waiting queue, the problem of manually creating subscriptions for related resources with dependencies during the resource message creation process is solved. That is, a single subscription automatically creates subscription strategies for all resources with dependencies, enabling the push of discrete messages with dependencies on resources, significantly improving the efficiency of server resource utilization during the resource message construction and message sending processes.
[0053] This application also discloses a specific message push method, see [link to relevant documentation] Figure 2 As shown, the method includes the following steps:
[0054] 1. Users (i.e. administrators) create the necessary subscription policies for specific resource subscription systems based on business needs, such as single-choice subscription policies.
[0055] 2. The created strategy is injected into the core service of the synchronization resource algorithm.
[0056] 3. The core service of the resource synchronization algorithm identifies all user / application / gateway resources that satisfy the subscription policy. This means that, in addition to identifying user resources, it can also determine the corresponding application and gateway resources based on the user's permissions.
[0057] 4. The core service of the synchronization resource algorithm automatically loads organizational resources that have dependencies on user / application / gateway resources that satisfy the subscription policy based on the algorithm.
[0058] 5. The core service of the synchronization resource algorithm automatically loads organizational resources that are dependent on the organizational resources in the previous step according to the algorithm.
[0059] 6. The core service of the synchronized resource algorithm automatically creates subscription strategies belonging to the organization within the same resource subscription system.
[0060] 7. Pre-label the subscription parameters related to the institutional resources of the resource cache center to represent the subscription.
[0061] 8. Place the organization's resources into the pending delivery queue.
[0062] 9. The core service of the synchronized resource algorithm will automatically create an organization's subscription policy for the same resource subscription system.
[0063] 10. Pre-label the subscription parameters related to the organization resources of the resource cache center to represent the subscription.
[0064] 11. Place the organization's resources into the pending delivery queue.
[0065] 12. Pre-label the subscription parameters related to user / application / gateway resources in the resource cache center to represent the subscription.
[0066] 13. Add user / application / gateway resources to the pending send queue.
[0067] 14. The core service of the synchronization resource algorithm retrieves the resource at the head of the queue from the queue to be sent and checks whether the resource meets the sending conditions. For example, it checks whether the resource's parent resource has been successfully sent. If the parent resource has been successfully sent, the resource can be sent. If the resource has no parent resource, such as an institutional resource, then the sending conditions are met.
[0068] 15. The core service of the synchronization resource algorithm notifies the message registration and sending service of resources that meet the sending conditions.
[0069] 16. The message registration and sending service loads relevant information about the resource subscription system according to the subscription strategy of the resource to be sent, and checks the message interaction channel of the resource subscription system.
[0070] 17. According to the communication protocol, translate the resource to be sent, encrypt the translation result, and construct the message to be sent.
[0071] 18. Send resource messages to the resource subscription system according to the message exchange address of the resource subscription system.
[0072] 19. Users can view pending resource messages, successfully sent resource messages, abnormally sent resource messages, and specific reasons for the abnormality in the message registration and sending service resource message monitoring list.
[0073] 20. The message registration and sending service receives message receipts from the resource subscription system and parses and translates them according to the communication protocol.
[0074] 21. The message registration and sending service will send the translated and parsed resource message receipt results back to the core service of the synchronization resource algorithm.
[0075] 22. The core service of the synchronization algorithm modifies and saves the values of the relevant subscription parameters of the subscribed resources stored in the resource cache center based on the message sending receipt.
[0076] As can be seen, in this embodiment, the subscription strategy for the target resource subscription system is obtained, and the corresponding target resource message is determined according to the subscription strategy; the parent resource message corresponding to the target resource message is determined according to the resource dependency relationship of the target resource message; the target resource message and the parent resource message are added to the corresponding pending-send queue, and the resource message in the pending-send queue is sent to the target resource subscription system. It is evident that the parent resource message corresponding to the target resource message is automatically determined according to the resource dependency relationship of the target resource message, and both the parent resource message and the target resource message are stored in the pending-send queue. This solves the problem that related resources with dependency relationships need to be manually subscribed during the resource message creation process. That is, a single subscription will automatically create subscription strategies for all resources with dependency relationships, realizing the push of discrete messages with dependency relationships.
[0077] Accordingly, this application also discloses a message push device, see [link to relevant documentation]. Figure 3 As shown, the device includes:
[0078] The strategy acquisition module 11 is used to acquire the subscription strategy for the target resource subscription system and determine the corresponding target resource message based on the subscription strategy.
[0079] The superior resource determination module 12 is used to determine the superior resource message corresponding to the target resource message based on the resource dependency relationship of the target resource message;
[0080] The resource message sending module 13 is used to add the target resource message and the superior resource message to the corresponding waiting queue, and send the resource message in the waiting queue to the target resource subscription system.
[0081] As can be seen from the above, this embodiment obtains the subscription strategy for the target resource subscription system, determines the corresponding target resource message based on the subscription strategy, determines the parent resource message corresponding to the target resource message based on the resource dependency relationship of the target resource message, adds the target resource message and the parent resource message to the corresponding waiting queue, and sends the resource messages in the waiting queue to the target resource subscription system. It is evident that by automatically determining the parent resource message corresponding to the target resource message based on the resource dependency relationship of the target resource message, and storing both the parent resource message and the target resource message in the waiting queue, the problem of manually creating subscriptions for related resources with dependencies during the resource message creation process is solved. That is, a single subscription automatically creates subscription strategies for all resources with dependencies, enabling the push of discrete messages with dependencies on resources.
[0082] In some specific embodiments, the resource message sending module 13 may specifically include:
[0083] The filtering condition query unit is used to query whether there are filtering conditions for the parent resource message in the subscription strategy;
[0084] A filtering unit is used to filter the superior resource message according to the filtering conditions if it exists, so as to obtain the target superior resource message.
[0085] Add the target resource message and the target parent resource message to the queue to be sent.
[0086] In some specific embodiments, the upper-level resource determination module 12 may specifically include:
[0087] The superior resource determination unit is used to determine the first superior resource message corresponding to the target resource message based on the resource dependency relationship of the target resource message, and then determine the superior resource message corresponding to the first superior resource message based on the resource dependency relationship of the first superior resource message, until all superior resource messages corresponding to the target resource message are found.
[0088] In some specific embodiments, the resource message sending module 13 may specifically include:
[0089] The resource message sending unit is used to send resource messages in the queue to be sent to the target resource subscription system in the order of resources from superior to subordinate, and to determine whether the resource message meets the sending conditions before sending each resource message.
[0090] In some specific embodiments, the sending conditions may include the resource message being the top-level resource message, or the direct parent resource message of the resource message being successfully sent.
[0091] In some specific embodiments, the resource message sending module 13 may specifically include:
[0092] The forwarding unit is used to send the resource messages in the queue to be sent to the message registration and sending service, so that the message registration and sending service can perform channel checks and translation encryption before sending the resource messages to the target resource subscription system.
[0093] The message registration and sending service is also used to display resource messages to be sent, resource messages sent successfully, and resource messages sent abnormally.
[0094] In some specific embodiments, the message push device may specifically include:
[0095] The status update unit is used to receive a message receipt from the target resource subscription system after sending the resource messages in the queue to be sent to the target resource subscription system, and modify the status of the corresponding resource messages according to the message receipt so that the unsuccessfully received resource messages can be resent after restarting.
[0096] Furthermore, this application also discloses an electronic device, see [link to relevant documentation]. Figure 4 As shown, the content in the figure should not be considered as any limitation on the scope of use of this application.
[0097] Figure 4 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the message push method disclosed in any of the foregoing embodiments.
[0098] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0099] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon include operating system 221, computer program 222 and data 223 including subscription policy, etc., and the storage method can be temporary storage or permanent storage.
[0100] The operating system 221 manages and controls the various hardware devices on the electronic device 20 and the computer program 222 to enable the processor 21 to perform calculations and processing on the massive amounts of data 223 in the memory 22. The operating system 221 can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the message push method executed by the electronic device 20 as disclosed in any of the foregoing embodiments, the computer program 222 may further include computer programs capable of performing other specific tasks.
[0101] Furthermore, this application also discloses a computer storage medium storing computer-executable instructions. When the computer-executable instructions are loaded and executed by a processor, they implement the message push method steps disclosed in any of the foregoing embodiments.
[0102] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0103] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0104] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0105] The above provides a detailed description of the message push method, apparatus, device, and medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A message push method, characterized in that, include: Obtain the user's subscription policy for the target resource subscription system, and determine the corresponding target resource message based on the subscription policy; The parent resource message corresponding to the target resource message is determined based on the resource dependency relationship of the target resource message; The target resource message and the superior resource message are added to the corresponding queue to be sent, and the resource message in the queue to be sent is sent to the target resource subscription system. The step of sending the resource messages in the queue to be sent to the target resource subscription system includes: In accordance with the order of resources from superior to subordinate, the resource messages in the queue to be sent are sent to the target resource subscription system in sequence. Before sending each resource message, it is determined whether the resource message meets the sending conditions. The sending conditions include that the resource message is the top-level resource message, or that the direct superior resource message of the resource message has been successfully sent. Before adding the target resource message and the parent resource message to the corresponding queue to be sent, the process further includes: Create a corresponding queue to be sent for each target resource message. This queue stores the target resource message and related parent resource messages that have dependencies. The step of sending the resource messages in the queue to be sent to the target resource subscription system includes: The resource messages in the queue to be sent are sent to the message registration and sending service, so that the message registration and sending service can perform channel checks and translation encryption before sending the resource messages to the target resource subscription system. The message registration and sending service is also used to display resource messages to be sent, resource messages sent successfully, and resource messages sent abnormally. The step of sending the resource messages in the queue to be sent to the target resource subscription system further includes: Receive message receipts from the target resource subscription system and modify the status of the corresponding resource messages according to the message receipts so that unsuccessfully received resource messages can be resent after restarting.
2. The message push method according to claim 1, characterized in that, The step of adding the target resource message and the parent resource message to the corresponding queue to be sent includes: Check if there are any filtering conditions for the parent resource message in the subscription strategy; If it exists, the superior resource message is filtered according to the filtering conditions to obtain the target superior resource message; Add the target resource message and the target parent resource message to the queue to be sent.
3. The message push method according to claim 1, characterized in that, Determining the parent resource message corresponding to the target resource message based on the resource dependency relationship of the target resource message includes: Based on the resource dependencies of the target resource message, the first parent resource message corresponding to the target resource message is determined. Then, based on the resource dependencies of the first parent resource message, the parent resource message corresponding to the first parent resource message is determined, until all parent resource messages corresponding to the target resource message are found.
4. A message push device, characterized in that, include: The strategy acquisition module is used to acquire the user's subscription strategy for the target resource subscription system, and determine the corresponding target resource message based on the subscription strategy. The superior resource determination module is used to determine the superior resource message corresponding to the target resource message based on the resource dependency relationship of the target resource message; The resource message sending module is used to add the target resource message and the superior resource message to the corresponding queue to be sent, and send the resource message in the queue to the target resource subscription system; The resource message sending module is used to send resource messages in the queue to be sent to the target resource subscription system in the order of resources from superior to subordinate, and to determine whether the resource message meets the sending conditions before sending each resource message; the sending conditions include that the resource message is the top-level resource message, or that the direct superior resource message of the resource message has been successfully sent. The message push device is further configured to create a corresponding queue to be sent for each target resource message before adding the target resource message and the superior resource message to the corresponding queue to be sent. The queue stores the target resource message and related superior resource messages that have a dependency relationship. The resource message sending module is used to send resource messages in the queue to be sent to the message registration and sending service, so that the message registration and sending service can perform channel checks and translation encryption before sending the resource messages to the target resource subscription system; the message registration and sending service is also used to display resource messages to be sent, resource messages sent successfully, and resource messages sent abnormally. The message push device is further configured to receive a message receipt from the target resource subscription system after sending the resource messages in the queue to be sent to the target resource subscription system, and modify the status of the corresponding resource messages according to the message receipt so as to resend the unsuccessfully received resource messages after restarting.
5. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the message push method as described in any one of claims 1 to 3.
6. A computer-readable storage medium, characterized in that, Used to store computer programs; wherein the computer programs, when executed by a processor, implement the message push method as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Information pushing method and device, server and storage medium
CN112287216A
Information recommendation method and device, electronic equipment and storage medium
CN114817749A
Multi-cloud management platform and cloud service provider resource synchronization method and device
CN115250278A