Information publishing method, device, system, electronic device and storage medium

By arranging the information to be released according to the release time in the dispatch center and using the delay queue and distributed lock mechanism, the problem of inefficient information push in the existing technology is solved and efficient and accurate information release is achieved.

CN115396498BActive Publication Date: 2024-09-27QINGDAO INTELLIFUSION TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210819542.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-12
Publication Date
2024-09-27
Estimated Expiration
2042-07-12

AI Technical Summary

Technical Problem

Existing information push methods have disadvantages such as inefficiency, excessive data volume, long push time, easy missed push, and repeated push when faced with multiple push objects, resulting in low efficiency of information release.

Method used

By arranging the information to be released in the dispatch center according to the release time, and releasing information to the release object through the dispatch center, the release object is prevented from obtaining information through sessions or polling, and delay queue and distributed lock mechanisms are used to ensure that information is released on time.

Benefits of technology

It improves the efficiency of information release, reduces resource waste, ensures that information is pushed to each object accurately and on time, and avoids the problems of missed push and repeated push.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115396498B
    Figure CN115396498B
Patent Text Reader

Abstract

The embodiment of the present invention provides an information publishing method, which includes: obtaining information to be published, the information to be published includes a publishing object and a publishing time; publishing the information to be published to a scheduling center according to the publishing time, the scheduling center arranging the information to be published in the order of the publishing time; and publishing the information to the publishing object through the scheduling center. By arranging the information to be published in the order of the publishing time in the scheduling center and publishing the information to the publishing object through the debugging center, the publishing object does not need to obtain the corresponding information through a session or polling, thereby improving the efficiency of information publishing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication management, and in particular to an information publishing method, device, system, electronic equipment and storage medium. Background Art

[0002] The traditional method of pushing announcement information through timer timing execution analysis, when facing multiple push objects, generally adopts timed polling to push data, records the announcement information to be pushed in the table, initializes it as unread, and the front end obtains the push information through websocket session or http polling. This process is inefficient and leads to waste of resources. Therefore, when publishing information to multiple objects in different regions, with object diversity and information diversity, the current information push method has the disadvantages of inefficiency, excessive data volume, long push time, easy missed push, repeated push, etc., resulting in low information release efficiency. Summary of the invention

[0003] The embodiment of the present invention provides an information publishing method, which aims to solve the problem that when the existing information publishing method publishes information to multiple objects in different regions, there is a diversity of objects and information. The current information push method has the disadvantages of low efficiency, too much data volume, too long push time, easy to miss push, repeated push, etc., resulting in low information publishing efficiency. By arranging the information to be published in the scheduling center in the order of publishing time, and publishing the information to the publishing object through the debugging center, the publishing object does not need to obtain the corresponding information through a session or polling, thereby improving the information publishing efficiency.

[0004] In a first aspect, an embodiment of the present invention provides an information publishing method, the method comprising:

[0005] Acquire information to be published, wherein the information to be published includes a publishing object and a publishing time;

[0006] The information to be released is released to the dispatch center according to the release time, and the dispatch center arranges the information to be released in the order of the release time;

[0007] Information is published to the publishing object through the dispatch center.

[0008] Optionally, publishing the information to be published to the dispatch center according to the publishing time includes:

[0009] If the publishing time meets the preset conditions, the information to be published that meets the preset conditions is written into the distributed service, and the information to be published is published to the dispatch center through the distributed service;

[0010] If the release time does not meet the preset conditions, the corresponding information to be released will be directly released.

[0011] Optionally, the scheduling center includes a delay queue, and publishing the to-be-published information to the scheduling center according to the publishing time includes:

[0012] Determine the scheduling trigger time of the information to be published according to the publishing time;

[0013] The information to be published is added to the delay queue in the order of the scheduling trigger time.

[0014] Optionally, after adding the information to be published to the delay queue in the order of the scheduling trigger time, the method further includes:

[0015] Determining an identification of the information to be published;

[0016] Determining the locking granularity of the information to be published according to the identifier;

[0017] According to the locking granularity, the information to be published is distributedly locked by using a distributed lock.

[0018] Optionally, publishing information to the publishing object through the dispatch center includes:

[0019] Start the working thread;

[0020] Acquire the distributed lock through the worker thread, and take out the target information to be published from the delay queue according to the distributed lock;

[0021] Based on the target information to be published, information is published to the corresponding publishing object.

[0022] Optionally, publishing information to the corresponding publishing object based on the target information to be published includes:

[0023] The target information to be published is published to the corresponding publishing object through message queue telemetry transmission.

[0024] In a second aspect, an embodiment of the present invention provides an information publishing device, the information publishing device comprising:

[0025] An acquisition module is used to acquire information to be published, wherein the information to be published includes a publishing object and a publishing time;

[0026] A first publishing module, used for publishing the information to be published to the dispatching center according to the publishing time, and the dispatching center arranges the information to be published in the order of the publishing time;

[0027] The second publishing module is used to publish information to the publishing object through the scheduling center.

[0028] In a third aspect, an embodiment of the present invention provides an information publishing system, the information publishing system comprising: an information editing entity, an information publishing device and a publishing object, the information editing is connected to the information publishing device by signal, and the information publishing device is connected to the publishing object by signal;

[0029] The information editing entity is used to edit the information to be published, and the information to be published includes the publishing object and the publishing time;

[0030] The information publishing device is used to obtain the information to be published; publish the information to be published to the dispatch center according to the publishing time, and the dispatch center arranges the information to be published in the order of the publishing time; and publishes the information to the publishing object through the dispatch center;

[0031] The publishing object is used to receive the information published by the information publishing device.

[0032] In a fourth aspect, an embodiment of the present invention provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps in the information publishing method provided in the embodiment of the present invention when executing the computer program.

[0033] In a fifth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in the information publishing method provided in the embodiment of the invention are implemented.

[0034] In an embodiment of the present invention, information to be released is obtained, and the information to be released includes a release object and a release time; the information to be released is released to a scheduling center according to the release time, and the scheduling center arranges the information to be released in the order of the release time; and the information is released to the release object through the scheduling center. By arranging the information to be released in the order of the release time in the scheduling center and releasing the information to the release object through the debugging center, the release object does not need to obtain the corresponding information through a session or polling, thereby improving the efficiency of information release. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0036] Figure 1 It is an architecture diagram of an information publishing system provided by an embodiment of the present invention;

[0037] Figure 2 is an architecture diagram of another information publishing system provided by an embodiment of the present invention;

[0038] Figure 3 This is an architecture diagram of a dispatch center provided by an embodiment of the present invention.

[0039] Figure 4 A flowchart of an information publishing method provided by an embodiment of the present invention;

[0040] Figure 5 It is a structural schematic diagram of an information publishing device provided by an embodiment of the present invention;

[0041] Figure 6 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0042] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0043] See also Figure 1 , Figure 1 is an architecture diagram of an information publishing system provided by an embodiment of the present invention, such as Figure 1 As shown, the information publishing system includes: an information editing entity, an information publishing device and a publishing object, the information editing is connected to the information publishing device by signal, and the information publishing device is connected to the publishing object by signal; the information editing entity is used to edit the information to be published; the information publishing device is used to obtain the information to be published, and the information to be published includes the publishing object and the publishing time; the information to be published is published to the scheduling center according to the publishing time, and the scheduling center arranges the information to be published in the order of the publishing time; information is published to the publishing object through the scheduling center; the publishing object is used to receive the information published by the information publishing device.

[0044] The above-mentioned information release system can be applied to terminal-oriented announcement information release, and the above-mentioned information to be released can include announcement information, announcement administrative area related information, announcement attachments, announcement content and other information content.

[0045] The above-mentioned information editing entity can be a device or server that provides information editing, such as a government network host or server. The information provider uploads the corresponding announcement information, announcement administrative area related information, announcement attachments, announcement content and other information as information to be released through the information editing entity.

[0046] The above-mentioned information publishing device may be a device or a server that provides information scheduling, and the above-mentioned information publishing device may perform information scheduling according to the publishing time and publishing object of the information to be published.

[0047] The above-mentioned publishing object may be a terminal device, and the above-mentioned terminal device may be an intelligent device with an interactive interface. Each publishing object corresponds to a unique identifier, and the above-mentioned unique identifier is determined according to the administrative area and specific location where the publishing object is located.

[0048] Specifically, the above information release system is used to release prevention and control announcement information for pharmacy terminals as an example for explanation. The above information to be released can be prevention and control announcement information for each pharmacy terminal. The above information to be released includes the pharmacy terminal identification and release time. Please refer to Figure 2 , Figure 2 is an architecture diagram of another information publishing system provided by an embodiment of the present invention, such as Figure 2 As shown, the information publishing system includes: an information editing entity, an information publishing device and a publishing object, the information editing is connected to the information publishing device by signal, and the information publishing device is connected to the publishing object by signal.

[0049] The above-mentioned information editing entity is used to add new information to be released. The newly added information to be released may include announcement information, announcement administrative area related information, announcement attachments, announcement content, etc.

[0050] Among them, the announcement information may include the publishing object and the publishing time; the announcement administrative area related information may be an announcement administrative area related table, which records the relationship between the announcement information and each administrative area; the announcement attachment may be a file with a large amount of data; the announcement content may be an announcement content table, which records the main content of the new information to be released.

[0051] The information publishing device may include a first database and a dispatch center (Bulletin Dispatch Center). The first database is used to store the information to be published, and publish the stored information to be published to the dispatch center, which publishes the information to the publishing object. The publishing object receives the information published by the dispatch center and can show it to the pharmacy staff so that the pharmacy staff can know the content of the announcement. The first database may be a mysql database, which is used to store data such as announcement information, announcement administrative area association table, announcement attachments, and announcement content table.

[0052] Optionally, the information to be released is divided into direct release information and delayed release information according to the release time. The direct release information can be directly released to the dispatch center, and the delayed release information can be released to the first database for storage. The release time of the direct release information is relatively close to the current time. For example, the release time of the direct release information is within a time threshold from the current time, such as within half an hour. It can be understood that the direct release information will be released within half an hour. The release time of the delayed release information is outside the time threshold from the current time, such as more than half an hour. The delayed release information can be released to the dispatch center when the trigger time is reached. The trigger time is determined according to the release time. For example, the trigger time can be n minutes before the release time, where n is greater than or equal to 0.

[0053] Optionally, the above-mentioned information publishing device may also include a distributed service, which may be composed of a Kafka microservice architecture. Kafka is a distributed message queue (Message Queue) based on a publish / subscribe mode. By periodically polling the unpublished information to be published from the first database, the unpublished information to be published is added to the distributed service based on Kafka, and the information to be published is pushed to the dispatch center through the distributed service based on Kafka. Specifically, according to the release time of the information to be published, the push time of the information to be published is determined. When the push time is greater than the current time, the information to be published is pushed to the dispatch center with a delay. When the push time is less than or equal to the current time, the information to be published is pushed to the dispatch center immediately. The push time may be m minutes before the release time, where m is greater than 0. Through the distributed service, the information to be published can be backed up. After the dispatch center fails and restarts, the information to be published can be quickly obtained for scheduling by consuming the information to be published in the distributed service.

[0054] Optionally, the above-mentioned information publishing device also includes a second database and a message queue telemetry transmission (MQTT), and the corresponding information to be published in the dispatch center is saved in the second database. In the second database, the information to be published corresponds to the announcement push table, and the corresponding information to be published can be published to the message queue telemetry transmission according to the announcement push table, and the information is published to the publishing object through the message queue telemetry transmission. The above-mentioned message queue telemetry transmission can be combined with an asynchronous multi-threaded push method to publish information. The above-mentioned first database can be a mysql database, which is used to save a push table of data such as announcement information, announcement administrative district association table, announcement attachments, and announcement content table, and the push table is initialized as unread, and the unpublished information to be published is recorded in the push table.

[0055] Optional, please refer to Figure 3 , Figure 3 is an architecture diagram of a dispatching center provided by an embodiment of the present invention, such as Figure 3 As shown, the above scheduling center includes a Scheduled Thread Pool Executor scheduler, which concurrently executes scheduling through the Scheduled ThreadPool Executor class scheduler. The Scheduled Thread Pool Executor class can internally implement a delayed queue (Delayed Work Queue) based on a heap data structure. When a task (information to be released) is added to the heap, the heap structure will be adjusted and arranged according to the trigger time of the task, and the task that needs to be executed earliest will be placed in front. Specifically, SiftUp can be used to put the earliest executed task at the front of the delayed queue. When scheduling, a work thread (Work Queue) is started, and tasks are continuously taken out from the delayed queue for execution. At the same time, the task will also be written into a thread-safe Hash table (Concurrent Hash Map), and the cancellation function will be realized through the future handle. Each information to be released corresponds to a future handle. After the information to be released is scheduled by the scheduling center, the dispatching business (information to be released push business) is executed through assign, and distributed lock concurrency control and Spring transaction control are performed. The above-mentioned distributed lock can be a lock of a redis cluster. From the perspective of a single thread, before executing a specific business, it is necessary to obtain a lock in the redis cluster. The granularity of the lock is bulletin ID (bulletin ID, which is the identifier of the information to be released). Each bulletin ID corresponds to a lock in the redis cluster, thereby achieving efficient concurrent operations and avoiding multiple threads from operating on the same information to be released. In statistical analysis, Monitor Task, as a monitoring component, periodically monitors the data in the Hash table, removes completed tasks, releases memory, and reports various indicators of the blocking queue.

[0056] In the process of the message arriving at the pharmacy end (publishing object), the traditional way is that the pharmacy end obtains the push information through a websocket session or http polling. This process is relatively inefficient and leads to a waste of resources. The embodiment of the present invention utilizes a technology that combines a multi-threaded asynchronous mechanism and MQTT to accelerate the push of messages and optimize the interactive experience of the pharmacy end. Specifically, the information to be published is sent through assign, and the information to be published is sent to MQTT through a multi-threaded asynchronous mechanism, and the information to be published is published to the publishing object through the message transmission protocol of the publish / subscribe mode of MQTT.

[0057] In an embodiment of the present invention, the information to be published can be arranged in the scheduling center in the order of publishing time, and the information can be published to the publishing object through the debugging center. The publishing object does not need to obtain the corresponding information through conversation or polling, thereby improving the efficiency of information publishing.

[0058] Optional, see Figure 4 , Figure 4 is a flow chart of an information publishing method provided by an embodiment of the present invention, such as Figure 4 As shown, the information publishing method includes the following steps:

[0059] 401. Get the information to be published.

[0060] In an embodiment of the present invention, the information to be released includes a release object and a release time. The release object may be a terminal device that receives the message, such as a department terminal, a store terminal, or a personal terminal. In an embodiment of the present invention, the release object may be a store terminal, specifically a pharmacy terminal, and the information to be released may be an announcement based on drug control and epidemic prevention and control.

[0061] Furthermore, each object to be published corresponds to a unique identifier, which is determined according to the administrative district and specific location of the published object. For example, the unique identifier corresponding to Pharmacy B in District A can be XXXXYYYY, where XXXX represents the administrative district identifier and YYYY represents the specific location identifier.

[0062] The above-mentioned information to be released can be formulated and uploaded by the relevant superior departments. The superior department staff, as the information provider, can upload the corresponding announcement information, announcement administrative district related information, announcement attachments, announcement content and other information as the information to be released through the information editing entity. The above-mentioned information release method can be used to schedule the information to be released so that the information to be released can be pushed to different pharmacy terminals more accurately, efficiently and flexibly.

[0063] 402. Publish the information to be published to the dispatch center according to the publishing time.

[0064] In the embodiment of the present invention, the above-mentioned dispatch center arranges the information to be released in the order of release time.

[0065] Specifically, the above-mentioned information to be released can be divided into direct release information and delayed release information. The above-mentioned direct release information can be directly released to the dispatching center, and the above-mentioned delayed release information can be released to the first database for storage. The release time of the above-mentioned direct release information is relatively close to the current time. For example, the release time of the above-mentioned direct release information is within a time threshold from the current time, such as within half an hour. It can be understood that within half an hour, the direct release information will be released. The release time of the above-mentioned delayed release information is outside the time threshold from the current time, such as more than half an hour. The above-mentioned delayed release information can be released to the dispatching center when the trigger time is reached. The above-mentioned trigger time is determined according to the release time. For example, the above-mentioned trigger time can be n minutes before the release time, and n is greater than or equal to 0.

[0066] By dividing the information to be released into direct release information and delayed release information, and directly scheduling the direct release information and delaying the scheduling of delayed release information, information scheduling is more accurate and flexible.

[0067] Specifically, the dispatch center arranges the information to be released in a queue in the order of release time.

[0068] 403. Publish information to the publishing object through the dispatch center.

[0069] In the embodiment of the present invention, the dispatch center can take out the first information to be published from the queue and publish it according to the publishing time of each information to be published.

[0070] Specifically, each piece of information to be published includes a publishing object. When the current time is the same as the publishing time, the corresponding information to be published can be retrieved and pushed to the publishing object, thereby completing the information publishing.

[0071] In an embodiment of the present invention, information to be published is obtained, and the information to be published includes a publishing object and a publishing time; the information to be published is published to a scheduling center according to the publishing time, and the scheduling center arranges the information to be published in the order of the publishing time; and the information is published to the publishing object through the scheduling center. By arranging the information to be published in the order of the publishing time in the scheduling center and publishing the information to the publishing object through the debugging center, the publishing object does not need to obtain the corresponding information through a session or polling, thereby improving the efficiency of information publishing.

[0072] Optionally, in the step of publishing the information to be published to the dispatching center according to the publishing time, if the publishing time meets the preset conditions, the information to be published that meets the preset conditions will be written into the distributed service, and the information to be published will be published to the dispatching center through the distributed service; if the publishing time does not meet the preset conditions, the corresponding information to be published will be directly published.

[0073] In an embodiment of the present invention, the preset condition may be a condition that meets the delayed release condition. When the release time of the information to be released meets the delayed release condition, the information to be released may be determined to be delayed release information; when the release time of the information to be released does not meet the delayed release condition, the information to be released may be determined to be directly released information. For directly released information, it may be directly pushed to the scheduling center for scheduling and release.

[0074] Specifically, the above-mentioned distributed service can be composed of a Kafka microservice architecture. Kafka is a distributed message queue based on a publish / subscribe mode. By periodically polling the unpublished information to be published from the first database, the unpublished information to be published is added to the distributed service based on Kafka, and the information to be published is pushed to the dispatch center through the distributed service based on Kafka. Polling can be performed every half an hour. At this time, the information to be published with a publishing time within half an hour of the current time can be directly published to the dispatch center as direct publishing information, and the information to be published with a publishing time after half an hour of the current time can be written into the distributed service as delayed publishing information.

[0075] It should be noted that the above distributed service includes multiple listening queues, and delayed release information is written into multiple listening queues for monitoring and consumption. Consumption refers to publishing the to-be-released information in the listening queues to the dispatch center.

[0076] In a possible embodiment, the above-mentioned direct release information and the above-mentioned delayed release information are both directly released to the dispatch center. After the dispatch center sorts the direct release information and the delayed release information in the order of release time, they are released in the order of release time. At the same time, the first database is polled regularly, and the unpublished delayed release information is written from the first database to the distributed service. A fault-tolerant mechanism is established through the distributed service. When the dispatch center restarts due to an error, the delayed release information can be directly obtained from the distributed service for release. Through the distributed service, the information to be released can be backed up. After the dispatch center restarts due to a fault, the information to be released can be quickly obtained by consuming the information to be released in the distributed service for scheduling, thereby improving the accuracy of information release.

[0077] Optionally, the scheduling center includes a delay queue. In the step of publishing the information to be published to the scheduling center according to the publishing time, the scheduling trigger time of the information to be published can be determined according to the publishing time; the information to be published is added to the delay queue in the order of the scheduling trigger time.

[0078] In an embodiment of the present invention, the scheduling center includes a delay queue, and the delay queue can be a delay queue based on the heap data result implemented inside the ScheduledThread Pool Executor class. When information to be published is added to the heap, the Scheduled Thread Pool Executor class will adjust the heap structure, arrange it according to the trigger time of the information to be published, put the information to be published that needs to be executed first at the front, and start a working thread to continuously take out the information to be published from the delay queue for execution. At the same time, the information to be published will also be written into a thread-safe Hash table, and the future handle in the Hash table is used to implement the unscheduling function. Furthermore, the Monitor Task can also be used as a monitoring component to periodically monitor the data in the Hash table, remove completed tasks, release memory, and report various indicators of the blocking queue. The above-mentioned completed tasks can be understood as published information to be published.

[0079] The trigger time can be the release time of the information to be released, or a time point before the release time of the information to be released. For example, if the release time is 14:00, the trigger time can be 13:59. The information to be released is added to the delay queue in the order of the scheduling trigger time.

[0080] Optionally, after the information to be published is added to the delay queue in the order of the scheduling trigger time, the identifier of the information to be published can also be determined; based on the identifier, the locking granularity of the information to be published can be determined; based on the locking granularity, the information to be published can be distributed locked through a distributed lock.

[0081] In the embodiment of the present invention, each information to be released corresponds to an identifier, which may be bulletinId. For example, the identifier corresponding to information to be released 1 is bulletinId 1, the identifier corresponding to information to be released 2 is bulletinId 2, and so on.

[0082] The above-mentioned distributed lock can be a lock in a redis cluster, a Java in-memory data grid (In-Memory Data Grid) implemented on the basis of Redis. It not only provides a series of distributed Java common objects, but also can implement reentrant locks (Reentrant Lock), fair locks (Fair Lock, interlocking (MultiLock), red lock (RedLock), read-write locks (ReadWriteLock), etc., and also provides many distributed services.

[0083] The lock in the redis cluster can be locked at the bulletin ID, and each bulletin ID corresponds to a lock in the redis cluster.

[0084] Optionally, in the step of publishing information to the publishing object through the scheduling center, a working thread can be started; a distributed lock is obtained through the working thread, and the target information to be published is taken out from the delay queue based on the distributed lock; based on the target information to be published, information is published to the corresponding publishing object.

[0085] In the embodiment of the present invention, in the scheduling center, the target information to be published is taken out from the delay queue by a working thread. The target information to be published refers to the information to be published whose trigger time is the current time.

[0086] Specifically, the delay queue in the above-mentioned scheduling center is a distributed queue. For a single working thread, before taking out the target information to be published, it can first obtain the lock in the redis cluster. The lock in the redis cluster can be used to prevent a target information to be published from being read by multiple working threads at the same time, thereby achieving efficient concurrent operations and avoiding business conflicts during multiple concurrency.

[0087] After obtaining the target information to be published, the target information to be published can be published to the publishing object according to the publishing object of the target information to be published, thereby completing the information publishing.

[0088] Optionally, in the step of publishing information to a corresponding publishing object based on the target information to be published, the target information to be published can be published to the corresponding publishing object through message queue telemetry transmission.

[0089] In the embodiment of the present invention, information can be published to the publishing object through the above-mentioned message queue telemetry transmission MQTT.

[0090] Specifically, the target information to be published obtained by multiple working threads can be written into the message queue telemetry transmission MQTT in an asynchronous form, and the target information to be published can be published to the publishing object through the message transmission protocol of the publish / subscribe mode of the message queue telemetry transmission MQTT.

[0091] Compared with traditional pharmacy terminals that request announcement information through websocket sessions or http polling, the combination of asynchronous multithreading and MQTT can accelerate message push and optimize the interactive experience of pharmacy terminals.

[0092] In a possible embodiment, the publishing object may have a pushed announcement list, which records the information that has been published to the publishing object. When the publishing object reads a piece of information, the status of the corresponding information in the announcement list is read.

[0093] In a possible embodiment, when there is unread information in the announcement list, if the unread time of the unread information exceeds a preset time threshold, the publishing object may be prompted to read the information.

[0094] It should be noted that the information publishing method provided in the embodiment of the present invention can be applied to devices such as smart phones, computers, servers, etc. that can publish information.

[0095] Optional, see Figure 5 , Figure 5 is a schematic diagram of the structure of an information publishing device provided by an embodiment of the present invention, such as Figure 5 As shown, the device comprises:

[0096] The acquisition module 501 is used to acquire information to be published, wherein the information to be published includes a publishing object and a publishing time;

[0097] The first publishing module 502 is used to publish the information to be published to the scheduling center according to the publishing time, and the scheduling center arranges the information to be published in the order of the publishing time;

[0098] The second publishing module 503 is used to publish information to the publishing object through the scheduling center.

[0099] Optionally, the first publishing module 502 includes:

[0100] A first publishing submodule, configured to write the information to be published that meets the preset conditions into a distributed service if the publishing time meets the preset conditions, and publish the information to be published to the dispatch center through the distributed service;

[0101] The second publishing submodule is used to directly publish the corresponding information to be published if the publishing time does not meet the preset conditions.

[0102] Optionally, the scheduling center includes a delay queue, and the first publishing module 502 includes:

[0103] A first determination submodule, used to determine a scheduling trigger time of the information to be published according to the publishing time;

[0104] The third publishing submodule is used to add the information to be published to the delay queue in the order of the scheduling trigger time.

[0105] Optionally, the first publishing module 502 further includes:

[0106] A second determination submodule, used to determine the identifier of the information to be published;

[0107] A third determination submodule, configured to determine the locking granularity of the information to be released according to the identifier;

[0108] The locking submodule is used to perform distributed locking on the information to be published through a distributed lock according to the locking granularity.

[0109] Optionally, the second publishing module 503 includes:

[0110] Start submodule, used to start working thread;

[0111] An acquisition submodule, used to acquire the distributed lock through the working thread, and take out the target information to be published from the delay queue according to the distributed lock;

[0112] The fourth publishing submodule is used to publish information to the corresponding publishing object based on the target information to be published.

[0113] Optionally, the fourth publishing submodule is further used to publish the target information to be published to the corresponding publishing object through message queue telemetry transmission.

[0114] It should be noted that the information publishing device provided in the embodiment of the present invention can be applied to devices such as smart phones, computers, servers, etc. that can publish information.

[0115] The information publishing device provided in the embodiment of the present invention can implement each process implemented by the information publishing method in the above method embodiment and can achieve the same beneficial effect. To avoid repetition, it will not be described here.

[0116] See also Figure 6 , Figure 6 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention, such as Figure 6 As shown, it includes: a memory 602, a processor 601, and a computer program of an information publishing method stored in the memory 602 and executable on the processor 601, wherein:

[0117] The processor 601 is used to call the computer program stored in the memory 602 to perform the following steps:

[0118] Acquire information to be published, wherein the information to be published includes a publishing object and a publishing time;

[0119] The information to be released is released to the dispatch center according to the release time, and the dispatch center arranges the information to be released in the order of the release time;

[0120] Information is published to the publishing object through the dispatch center.

[0121] Optionally, the processor 601 executes the step of publishing the to-be-published information to the scheduling center at the publishing time, including:

[0122] If the publishing time meets the preset conditions, the information to be published that meets the preset conditions is written into the distributed service, and the information to be published is published to the dispatch center through the distributed service;

[0123] If the release time does not meet the preset conditions, the corresponding information to be released will be directly released.

[0124] Optionally, the scheduling center includes a delay queue, and the processor 601 executes the step of publishing the to-be-published information to the scheduling center according to the publishing time, including:

[0125] Determine the scheduling trigger time of the information to be published according to the publishing time;

[0126] The information to be published is added to the delay queue in the order of the scheduling trigger time.

[0127] Optionally, after adding the information to be published to the delay queue in the order of the scheduling trigger time, the method executed by the processor 601 further includes:

[0128] Determining an identification of the information to be published;

[0129] Determining the locking granularity of the information to be published according to the identifier;

[0130] According to the locking granularity, the information to be published is distributedly locked by using a distributed lock.

[0131] Optionally, the information publishing to the publishing object through the scheduling center executed by the processor 601 includes:

[0132] Start the working thread;

[0133] Acquire the distributed lock through the worker thread, and take out the target information to be published from the delay queue according to the distributed lock;

[0134] Based on the target information to be published, information is published to the corresponding publishing object.

[0135] Optionally, the processor 601 executes the information publishing to the corresponding publishing object based on the target information to be published, including:

[0136] The target information to be published is published to the corresponding publishing object through message queue telemetry transmission.

[0137] The electronic device provided in the embodiment of the present invention can implement each process implemented by the information publishing method in the above method embodiment and can achieve the same beneficial effect. To avoid repetition, it will not be described here.

[0138] An embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the computer program implements the various processes of the information publishing method or the application-side information publishing method provided by the embodiment of the present invention, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0139] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).

[0140] The above disclosure is only the preferred embodiment of the present invention, which certainly cannot be used to limit the scope of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.

Claims

1. An information publishing method, characterized in that: For the above information release system, the information release system includes: an information editing entity, an information release device and a release object, the information editing entity is connected to the information release device by signal, and the information release device is connected to the above release object by signal; the information release device includes a first database and a scheduling center, the scheduling center includes a delay queue, the first database is used to save the announcement push table, the announcement push table is initialized to unread, and the announcement push table records the unpublished information to be released, the information release device also includes a second database and message queue telemetry transmission, the corresponding information to be released in the scheduling center is saved in the second database, the information to be released corresponds to the announcement push table, so as to release the corresponding information to be released to the message queue telemetry transmission according to the announcement push table, and information is released to the release object through the message queue telemetry transmission, the information release device also includes a distributed service, and the method includes the following steps: Acquire information to be published, wherein the information to be published includes a publishing object and a publishing time; If the release time of the information to be released meets the condition of delayed release, the information to be released is determined to be delayed release information, the delayed release information is released to the first database, the first database is polled regularly, the unreleased delayed release information is written from the first database to the distributed service, and the delayed release information is released to the dispatch center through the distributed service; the release time of the directly released information is within a time threshold from the current time; the release time of the delayed release information is outside the time threshold from the current time; If the release time of the information to be released does not meet the condition for delayed release, the information to be released is determined to be direct release information, and the direct release information is directly released to the dispatch center; Determine the scheduling trigger time of the direct publishing information and the delayed publishing information according to the publishing time, and add the direct publishing information and the delayed publishing information to the delay queue in the order of the scheduling trigger time through the scheduling center; Start a working thread through the dispatch center; Acquire a distributed lock through the worker thread, and take out the target information to be published from the delay queue according to the distributed lock; The target information to be published is published to the corresponding publishing object through message queue telemetry transmission, and the message queue telemetry transmission is combined with asynchronous multi-threaded push mode to publish information; The information to be published is backed up through the distributed service, and after the scheduling center is restarted, the delayed publication information is directly obtained from the distributed service for publication.

2. The information publishing method according to claim 1, characterized in that: After adding the information to be published to the delay queue in the order of the scheduling trigger time, the method further includes: Determining an identification of the information to be published; Determining the locking granularity of the information to be published according to the identifier; According to the locking granularity, the information to be published is distributedly locked by using a distributed lock.

3. An information publishing device, characterized in that: For the above information release system, the information release system includes: an information editing entity, an information release device and a release object, the information editing entity is connected to the information release device by signal, and the information release device is connected to the above release object by signal; the information release device includes a first database and a scheduling center, the scheduling center includes a delay queue, the first database is used to save the announcement push table, the announcement push table is initialized to unread, and the announcement push table records the unpublished information to be released, the information release device also includes a second database and message queue telemetry transmission, the corresponding information to be released in the scheduling center is saved in the second database, the information to be released corresponds to the announcement push table, so as to release the corresponding information to be released to the message queue telemetry transmission according to the announcement push table, and release information to the release object through the message queue telemetry transmission, the information release device also includes a distributed service, and the information release device includes: An acquisition module is used to acquire information to be published, wherein the information to be published includes a publishing object and a publishing time; The first publishing module is used to determine that the information to be published is delayed publishing information if the publishing time of the information to be published meets the conditions for delayed publishing, write the delayed publishing information into the distributed service, and publish the delayed publishing information to the scheduling center through the distributed service; regularly poll the first database, write the unpublished delayed publishing information from the first database into the distributed service; back up the information to be published through the distributed service, and after the scheduling center is restarted, directly obtain the delayed publishing information from the distributed service for publishing; if the publishing time of the information to be published does not meet the conditions for delayed publishing, determine that the information to be published is directly published information, and publish the directly published information directly to the scheduling center; the publishing time of the directly published information is within a time threshold from the current time; the publishing time of the delayed publishing information is outside the time threshold from the current time; The second publishing module is used to determine the scheduling trigger time of the direct publishing information and the delayed publishing information according to the publishing time, and add the direct publishing information and the delayed publishing information to the delay queue in the order of the scheduling trigger time through the scheduling center; start the working thread through the scheduling center; obtain the distributed lock through the working thread, and take out the target to-be-published information from the delay queue according to the distributed lock; publish the target to-be-published information to the corresponding publishing object through the message queue telemetry transmission, and the message queue telemetry transmission is combined with the asynchronous multi-threaded push method to publish the information; back up the to-be-published information through the distributed service, and after the scheduling center is restarted, directly obtain the delayed publishing information from the distributed service for publishing.

4. An information publishing system, characterized in that: The information publishing system comprises: An information editing entity, an information publishing device and a publishing object, wherein the information editing is connected to the information publishing device by signal, and the information publishing device is connected to the publishing object by signal; a first database is used to store an announcement push table, wherein the announcement push table is initialized to unread, and the announcement push table records unpublished information to be published, and the information publishing device also includes a second database and a message queue telemetry transmission, wherein the corresponding information to be published in the dispatch center is saved in the second database, and the information to be published corresponds to the announcement push table, so that the corresponding information to be published is published to the message queue telemetry transmission according to the announcement push table, and information is published to the publishing object through the message queue telemetry transmission; the information publishing device also includes a distributed service; The information editing entity is used to edit the information to be published, and the information to be published includes the publishing object and the publishing time; The information publishing device is used to obtain the information to be published; if the publishing time of the information to be published meets the conditions for delayed publishing, the information to be published is determined to be delayed publishing information, the delayed publishing information is written into the distributed service, and the delayed publishing information is published to the dispatch center through the distributed service; the first database is polled regularly, and the unpublished delayed publishing information is written from the first database into the distributed service; the information to be published is backed up through the distributed service, and after the dispatch center is restarted, the delayed publishing information is directly obtained from the distributed service for publishing; if the publishing time of the information to be published does not meet the conditions for delayed publishing, the information to be published is determined to be directly published information, and the directly published information is directly published to the dispatch center; according to the publishing time, the direct publishing information and the delayed publishing information are determined. The scheduling trigger time of the information, the direct release information and the delayed release information are added to the delay queue in the order of the scheduling trigger time through the scheduling center; the working thread is started through the scheduling center; the distributed lock is obtained through the working thread, and the target information to be released is taken out from the delay queue according to the distributed lock; the target information to be released is released to the corresponding release object through the message queue telemetry transmission, and the message queue telemetry transmission is combined with the asynchronous multi-threaded push method to release the information; the information to be released is backed up through the distributed service, and after the scheduling center is restarted, the delayed release information is directly obtained from the distributed service for release; the release time of the direct release information is within a time threshold from the current time; the release time of the delayed release information is outside the time threshold from the current time; The publishing object is used to receive the information published by the information publishing device.

5. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the information publishing method as claimed in claim 1 or 2 when executing the computer program.

6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the information publishing method according to claim 1 or 2 are implemented.