CN115396498A - Information issuing method, device, system, electronic equipment and storage medium - Google Patents

Information issuing method, device, system, electronic equipment and storage medium Download PDF

Info

Publication number
CN115396498A
CN115396498A CN202210819542.6A CN202210819542A CN115396498A CN 115396498 A CN115396498 A CN 115396498A CN 202210819542 A CN202210819542 A CN 202210819542A CN 115396498 A CN115396498 A CN 115396498A
Authority
CN
China
Prior art keywords
information
issuing
issued
time
scheduling
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210819542.6A
Other languages
Chinese (zh)
Inventor
王天文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Yuntian Lifei Technology Co ltd
Shenzhen Intellifusion Technologies Co Ltd
Original Assignee
Qingdao Yuntian Lifei Technology Co ltd
Shenzhen Intellifusion Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qingdao Yuntian Lifei Technology Co ltd, Shenzhen Intellifusion Technologies Co Ltd filed Critical Qingdao Yuntian Lifei Technology Co ltd
Priority to CN202210819542.6A priority Critical patent/CN115396498A/en
Publication of CN115396498A publication Critical patent/CN115396498A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria
    • H04L47/625Queue scheduling characterised by scheduling criteria for service slots or service orders
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/26Special purpose or proprietary protocols or architectures

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computing Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the invention provides an information issuing method, which comprises the following steps: acquiring information to be issued, wherein the information to be issued comprises an issuing object and issuing time; the information to be issued is issued to a scheduling center according to the issuing time, and the scheduling center arranges the information to be issued according to the sequence of the issuing time; and issuing information to the issuing object through the dispatching center. The information to be issued is arranged in the scheduling center according to the issuing time sequence, the debugging center issues the information to the issuing object, the issuing object does not need to acquire corresponding information through conversation or polling, and the information issuing efficiency is improved.

Description

Information issuing method, device, system, electronic equipment and storage medium
Technical Field
The present invention relates to the field of communication management, and in particular, to an information distribution method, apparatus, system, electronic device, and storage medium.
Background
In a traditional way of executing and analyzing push announcement information regularly through a timer, when facing a plurality of push objects, regular polling push data is generally adopted, announcement information to be pushed is recorded in a table and initialized to be unread, the push information is obtained by a front end through websocket session or http polling, and the process is inefficient and causes resource waste. Therefore, when information is distributed to a plurality of objects in different areas, and the objects have diversity and information diversity, the existing information pushing method has the defects of low efficiency, overlarge data volume, overlong pushing time, easiness in missing pushing, repeated pushing and the like, and the information distribution efficiency is low.
Disclosure of Invention
The embodiment of the invention provides an information publishing method, aiming at solving the problems that the existing information publishing method has the defects of low efficiency, overlarge data volume, overlong pushing time, easy missing pushing, repeated pushing and the like under the condition of object diversity and information diversity when the existing information publishing method is used for publishing information facing to a plurality of objects in different areas, and the information publishing efficiency is low. The information to be issued is arranged in the scheduling center according to the sequence of the issuing time, the debugging center issues the information to the issuing object, and the issuing object does not need to acquire corresponding information through conversation or polling, so that the information issuing efficiency is improved.
In a first aspect, an embodiment of the present invention provides an information publishing method, where the method includes:
acquiring information to be issued, wherein the information to be issued comprises an issuing object and issuing time;
the information to be issued is issued to a scheduling center according to the issuing time, and the scheduling center arranges the information to be issued according to the sequence of the issuing time;
and issuing information to the issuing object through the dispatching center.
Optionally, the issuing the information to be issued to the scheduling center according to the issue time includes:
if the release time meets a preset condition, writing the information to be released meeting the preset condition into a distributed service, and releasing the information to be released to the dispatching center through the distributed service;
and if the release time does not accord with the preset condition, directly releasing the corresponding information to be released.
Optionally, the scheduling center includes a delay queue, and the issuing the information to be issued to the scheduling center according to the issue time includes:
determining the scheduling trigger time of the information to be issued according to the issuing time;
and adding the information to be issued to the delay queue according to the sequence of the scheduling trigger time.
Optionally, after the information to be issued is added to the delay queue according to the sequence of the scheduling trigger time, the method further includes:
determining the identifier of the information to be issued;
determining the locking granularity of the information to be issued according to the identification;
and according to the locking granularity, carrying out distributed locking on the information to be issued through a distributed lock.
Optionally, the issuing information to the issuing object through the scheduling center includes:
starting a working thread;
acquiring the distributed lock through the working thread, and taking out target information to be issued from the delay queue according to the distributed lock;
and issuing information to the corresponding issuing object based on the target information to be issued.
Optionally, the issuing information to the corresponding issuing object based on the target information to be issued includes:
and issuing the information to be issued to the corresponding issuing object by the information queue telemetry transmission.
In a second aspect, an embodiment of the present invention provides an information distribution apparatus, including:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring information to be issued, and the information to be issued comprises an issuing object and issuing time;
the first issuing module is used for issuing the information to be issued to a scheduling center according to the issuing time, and the scheduling center arranges the information to be issued according to the sequence of the issuing time;
and the second issuing module is used for issuing information to the issuing object through the dispatching center.
In a third aspect, an embodiment of the present invention provides an information distribution system, where the information distribution system includes: the information editing entity, the information issuing device and the issuing object, wherein the information editing is in signal connection with the information issuing device, and the information issuing device is in signal connection with the issuing object;
the information editing entity is used for editing information to be issued, and the information to be issued comprises an issuing object and issuing time;
the information issuing device is used for acquiring the information to be issued; the information to be issued is issued to a scheduling center according to the issuing time, and the scheduling center arranges the information to be issued according to the sequence of the issuing time; information is issued to the issuing object through the dispatching center;
the distribution object is used for receiving the information distributed by the information distribution device.
In a fourth aspect, an embodiment of the present invention provides an electronic device, including: the information distribution method comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor executes the computer program to realize the steps in the information distribution method provided by the embodiment of the invention.
In a fifth aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements the steps in the information publishing method provided by the embodiment of the present invention.
In the embodiment of the invention, information to be issued is acquired, wherein the information to be issued comprises an issuing object and issuing time; the information to be issued is issued to a scheduling center according to the issuing time, and the scheduling center arranges the information to be issued according to the sequence of the issuing time; and issuing information to the issuing object through the dispatching center. The information to be issued is arranged in the scheduling center according to the issuing time sequence, the debugging center issues the information to the issuing object, the issuing object does not need to acquire corresponding information through conversation or polling, and the information issuing efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is an architecture diagram of an information distribution system according to an embodiment of the present invention;
FIG. 2 is an architecture diagram of another information distribution system provided by an embodiment of the present invention;
fig. 3 is an architecture diagram of a dispatch center according to an embodiment of the present invention
Fig. 4 is a flowchart of an information distribution method according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an information distribution apparatus according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is an architecture diagram of an information distribution system according to an embodiment of the present invention, and as shown in fig. 1, the information distribution system includes: an information editing entity, an information distribution device and a distribution object, wherein the information editing is in signal connection with the information distribution device, and the information distribution device is in signal connection with the distribution object; the information editing entity is used for editing the information to be issued; the information issuing device is used for acquiring information to be issued, and the information to be issued comprises an issuing object and issuing time; the information to be issued is issued to a dispatching center according to the issuing time, and the dispatching center arranges the information to be issued according to the sequence of the issuing time; information is issued to the issuing object through the dispatching center; the distribution object is used for receiving the information distributed by the information distribution device.
The information distribution system can be applied to terminal-oriented distribution of the notice information, and the information to be distributed can include information contents such as notice information, notice administrative area associated information, notice attachments, notice contents and the like.
The information editing entity may be a device or a server providing information editing, such as a government affairs network host or a server, and the information provider uploads corresponding information such as announcement information, announcement administrative area association information, announcement attachments, announcement content and the like as information to be published through the information editing entity.
The information distribution device may be a device or a server providing information scheduling, and the information distribution device may perform information scheduling according to a distribution time and a distribution object of information to be distributed.
The release objects can be terminal devices, the terminal devices can be intelligent devices with interactive interfaces, each release object corresponds to a unique identifier, and the unique identifiers are determined according to the administrative area and the specific place where the release objects are located.
Specifically, for example, when the information distribution system is applied to distribution of preventive notice information to pharmacy terminals, the information to be distributed may be preventive notice information for each pharmacy terminal, and the information to be distributed includes a pharmacy terminal identifier and distribution time. Referring to fig. 2, fig. 2 is an architecture diagram of another information distribution system according to an embodiment of the present invention, as shown in fig. 2, the information distribution system includes: the information editing entity, the information distribution device and the distribution object, wherein the information editing is in signal connection with the information distribution device, and the information distribution device is in signal connection with the distribution object.
The information editing entity is used for newly adding information to be published, and the newly added information to be published can comprise announcement information, announcement administrative area association information, announcement attachments, announcement content and the like.
The announcement information may include a publishing object and a publishing time; the announcement administrative district association information can be an announcement administrative district association table and records the association relation between the announcement information and each administrative district; the announcement attachment can be a file with a large data volume; the announcement content can be an announcement content table, and records the main content of the newly added information to be issued.
The information issuing device may include a first database and a dispatching Center (Bulletin Dispatch Center), where the first database is configured to store the information to be issued, issue the stored information to be issued to the dispatching Center, and issue information from the dispatching Center to an object to be issued. The issuing object receives the information issued by the scheduling center and can show the information to pharmacy staff so that the pharmacy staff can know the announcement content. The first database may be a mysql database, and is used for storing data such as announcement information, an announcement administrative area association table, announcement attachments, and an announcement content table.
Optionally, the information to be published is divided into direct publishing information and delayed publishing information according to the publishing time, the direct publishing information may be directly published to the scheduling center, and the delayed publishing information may be published to the first database for storage. The issuing time of the directly issued information is closer to the current time, for example, the issuing time of the directly issued information is within a time threshold value, for example, within a half hour, which can be understood as that the directly issued information is to be issued within a half hour. The difference between the distribution time of the delayed distribution information and the current time is outside a time threshold, for example, the difference is more than half an hour. The delayed release information may be released to the scheduling center when a trigger time is reached, where the trigger time is determined according to the release time, for example, the trigger time may be n minutes before the release time, and n is greater than or equal to 0.
Optionally, the information publishing device may further include a distributed service, and the distributed service may be composed of a Kafka micro-service architecture, where Kafka is a distributed Message Queue (Message Queue) based on a publish/subscribe scheme, and the Message Queue polls unpublished information to be published from the first database at regular time, adds the unpublished information to be published to the distributed service based on Kafka, and pushes the information to be published to the scheduling center through the distributed service based on Kafka. Specifically, the pushing time of the information to be issued is determined according to the issuing time of the information to be issued, when the pushing time is greater than the current time, the pushing of the information to be issued to the scheduling center is delayed, and when the pushing time is less than or equal to the current time, the pushing of the information to be issued to the scheduling center is immediately performed. The push time may be the first m minutes of the release time, with m greater than 0. Through the distributed service, the information to be issued can be backed up, and after the fault restart of the dispatching center, the information to be issued can be quickly acquired by consuming the information to be issued in the distributed service for dispatching.
Optionally, the information publishing device further includes a second database and Message Queue Telemetry Transport (MQTT), and stores the corresponding to-be-published information in the scheduling center into 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 transmitted and published to the message queue in a telemetering manner according to the announcement push table, and the information can be published to the publishing object through the telemetering transmission of the message queue. The message queue telemetry transmission can be combined with an asynchronous multithreading pushing mode to carry out information publishing. The first database may be a mysql database, and is configured to store a push table of data such as announcement information, an announcement administrative area association table, an announcement attachment, an announcement content table, and the like, initialize the push table to be unread, and record information to be issued that is not issued in the push table.
Optionally, referring to fig. 3, fig. 3 is an architecture diagram of a scheduling center according to an embodiment of the present invention, as shown in fig. 3, the scheduling center includes a Scheduled Thread Pool execution scheduler, and concurrently executes scheduling through a Scheduled Thread Pool execution class scheduler, where the Scheduled Thread Pool execution class may implement a delay Queue (Delayed word Queue) based on a heap data structure inside, when a task (to-be-issued information) is added to a heap, the heap structure is adjusted, and according to the trigger time arrangement of the task, the task that needs to be executed earliest is placed in front. Specifically, the oldest executed task may be placed at the forefront of the delay queue by the siftop. When scheduling, a Work thread (Work Queue) is started, and the task is continuously taken out from the delay Queue for execution. Meanwhile, the task can be written into a secure Hash table (current Hash Map) of the thread, the scheduling cancellation function is realized through the future handles, and each piece of information to be issued corresponds to one future handle. After the information to be issued is scheduled by the scheduling center, the issuing service (information pushing service to be issued) is executed through assign, and distributed lock concurrency control and Spring transaction control are performed. The distributed lock may be a lock of a redis cluster, and from the perspective of a single thread, before a specific service is executed, a lock in the redis cluster needs to be acquired, the granularity of locking is bulletin Id (advertisement Id, which is an identifier of information to be issued), and each bulletin Id corresponds to one lock in the redis cluster, so that efficient concurrent operation is realized, and multiple threads are prevented from operating the same information to be issued. In terms of statistical analysis, monitor Task is used as a monitoring component to periodically Monitor data in the Hash table, remove completed tasks, release memory, and report various indexes of a blocked queue.
In the process of message arrival at the pharmacy end (issuing object), the traditional mode is that the pharmacy end acquires push information through websocket session or http polling, and the process is inefficient and causes resource waste. The embodiment of the invention utilizes the technology of combining a multithreading asynchronous mechanism and MQTT to accelerate the pushing of the message and optimize the interactive experience at the pharmacy end. Specifically, the information to be published is issued through the assign, the information to be published is issued to the MQTT through a multithreading asynchronous mechanism, and the information to be published is published to the publishing object through a message transmission protocol of a publishing/subscribing mode of the MQTT.
In the embodiment of the invention, the information to be issued can be arranged in the scheduling center according to the sequence of the issuing time, the debugging center issues the information to the issuing object, and the issuing object does not need to acquire corresponding information through conversation or polling, so that the information issuing efficiency is improved.
Optionally, referring to fig. 4, fig. 4 is a flowchart of an information publishing method provided in an embodiment of the present invention, and as shown in fig. 4, the information publishing method includes the following steps:
401. and acquiring the information to be issued.
In the embodiment of the present invention, the information to be published includes a publishing object and publishing time. The distribution object may be a terminal device that receives a message, and may be, for example, a department terminal, a store terminal, or a personal terminal. In the embodiment of the present invention, the publishing object may be a store terminal, specifically, a pharmacy terminal, and the information to be published may be announcement information based on medication management and control and epidemic prevention and control.
Furthermore, each object to be issued corresponds to a unique identifier, and the unique identifier is determined according to the administrative area and the specific place where the issued object is located. For example, the unique identifier corresponding to the pharmacy a-B may be xxxxxyyyy, where XXXX represents a district identifier and YYYY represents a specific location identifier.
The information to be published can be formulated and uploaded by relevant upper departments, and the upper department staff can be used as an information provider and can upload corresponding information such as announcement information, announcement administrative area associated information, announcement attachments, announcement contents and the like as the information to be published through an information editing entity. The information issuing method can be used for scheduling the information to be issued, so that the information to be issued can be more accurately, more efficiently and more flexibly pushed to different pharmacy terminals.
402. And issuing the information to be issued to the dispatching center according to the issuing time.
In the embodiment of the invention, the scheduling center arranges the information to be issued according to the sequence of the issuing time.
Specifically, the information to be published may be divided into direct publication information and delayed publication information, the direct publication information may be directly published to the scheduling center, and the delayed publication information may be published to the first database for storage. The issuing time of the directly issued information is closer to the current time, for example, the issuing time of the directly issued information is within a time threshold value, for example, within a half hour, which can be understood as that the directly issued information is to be issued within a half hour. The difference between the distribution time of the delayed distribution information and the current time is outside a time threshold, for example, the difference is more than half an hour. The delayed release information may be released to the scheduling center when a trigger time is reached, where the trigger time is determined according to the release time, for example, the trigger time may be n minutes before the release time, and n is greater than or equal to 0.
The information to be issued is divided into the direct issuing information and the delayed issuing information, the direct issuing information is directly scheduled, and the delayed issuing information is scheduled in a delayed manner, so that the information scheduling is more accurate and flexible.
Specifically, the scheduling center arranges the information to be issued in the queue according to the order of the issuing time.
403. And issuing information to the issuing object through the dispatching center.
In the embodiment of the invention, the dispatching center can take out the information to be issued at the front from the queue for issuing according to the issuing time of each information to be issued.
Specifically, each piece of information to be published includes a publishing object, and when the current time is the same as the publishing time, the corresponding piece of information to be published is taken out and pushed to the publishing object, so that information publishing is completed.
In the embodiment of the invention, information to be issued is acquired, wherein the information to be issued comprises an issuing object and issuing time; the information to be issued is issued to a scheduling center according to the issuing time, and the scheduling center arranges the information to be issued according to the sequence of the issuing time; and issuing information to the issuing object through the dispatching center. The information to be issued is arranged in the scheduling center according to the sequence of the issuing time, the debugging center issues the information to the issuing object, and the issuing object does not need to acquire corresponding information through conversation or polling, so that the information issuing efficiency is improved.
Optionally, in the step of issuing the information to be issued to the scheduling center according to the issuing time, if the issuing time meets a preset condition, writing the information to be issued meeting the preset condition into the distributed service, and issuing the information to be issued to the scheduling center through the distributed service; and if the release time does not meet the preset condition, directly releasing the corresponding information to be released.
In the embodiment of the present invention, the preset condition may be a condition meeting delayed release, and when the release time of the information to be released meets the condition of delayed release, 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 condition of delayed release, the information to be released can be determined to be directly released information. And for the directly issued information, the directly issued information can be directly pushed to a dispatching center for dispatching and issuing.
Specifically, the distributed service may be composed of a Kafka micro-service architecture, where Kafka is a distributed message queue based on a publish/subscribe scheme, and polls unpublished information to be published from the first database at regular time, adds the unpublished information to be published to the Kafka-based distributed service, and pushes the unpublished information to the scheduling center through the Kafka-based distributed service. The polling may be performed every half hour, at this time, the information to be issued within half an hour of the current time may be directly issued to the scheduling center as the direct issue information, and the information to be issued after half an hour of the current time may be written in the distributed service as the delayed issue information.
It should be noted that, the distributed service includes a plurality of snoop queues, and the delayed issue information is respectively written into the plurality of snoop queues for snooping and consuming, where consuming refers to issuing the information to be issued in the snoop queues to the scheduling center.
In a possible embodiment, the directly issued information and the delayed issued information are both directly issued to a scheduling center, and the directly issued information and the delayed issued information are issued in the order of the issuing time after being sorted in the order of the issuing time by the scheduling center. Meanwhile, polling is carried out on the first database at regular time, unpublished delayed release information is written into the distributed service from the first database, a fault tolerance mechanism is established through the distributed service, when the dispatching center is restarted by mistake, the delayed release information can be directly obtained from the distributed service to be released, the information to be released can be backed up through the distributed service, after the dispatching center is restarted by faults, the information to be released can be quickly obtained through consuming the information to be released in the distributed service to be dispatched, and the accuracy of information release is improved.
Optionally, the scheduling center includes a delay queue, and in the step of issuing the information to be issued to the scheduling center according to the issue time, the scheduling trigger time of the information to be issued may be determined according to the issue time; and adding the information to be issued to the delay queue according to the sequence of the scheduling trigger time.
In the embodiment of the present invention, the dispatch center includes a delay queue, and the delay queue may be a delay queue based on heap data result implemented inside the Scheduled Thread Pool analyzer class. When information to be issued is added into the heap, the Scheduled Thread Pool executors adjust the heap structure, arrange according to the trigger time of the information to be issued, put the information to be issued which needs to be executed first at the forefront, start a working Thread, and continuously take out the information to be issued from the delay queue for execution. Meanwhile, the information to be issued can also be written into the Hash table with thread safety, and the scheduling cancellation function is realized in the Hash table through a future handle. Furthermore, data in the Hash table can be periodically monitored by taking the Monitor Task as a monitoring component, completed tasks are removed, the memory is released, and various indexes of a blocking queue are reported, wherein the completed tasks can be understood as issued information to be issued.
The trigger time may be the distribution time of the information to be distributed, or may be a time point before the distribution time of the information to be distributed, for example, the distribution time is 14:00, the trigger time may be 13:59. and adding the information to be issued to the delay queue according to the sequence of the scheduling trigger time.
Optionally, after the information to be issued is added to the delay queue according to the sequence of the scheduling trigger time, the identifier of the information to be issued may also be determined; determining the locking granularity of the information to be issued according to the identification; and according to the locking granularity, carrying out distributed locking on the information to be issued through the distributed locks.
In the embodiment of the present invention, each piece of information to be published corresponds to an identifier, and the identifier may be a bulletin Id, for example, the identifier corresponding to the information to be published 1 is bulletin Id 1, the identifier corresponding to the information to be published 2 is bulletin Id 2, and so on.
The distributed lock may be a lock In a Redis cluster, and a Java resident Memory Data Grid (In-Memory Data Grid) is implemented on the basis of Redis. The distributed Java common objects are provided, reentrant locks (Reentrant locks), fair locks (Fair locks, interlock (MultiLock), red locks (RedLock), read-write locks (ReadWriteLock) and the like can be realized, and a plurality of distributed services are provided.
The granularity of the locks in a redis cluster, corresponding to locking, may be butletin Ids, each of which corresponds to a lock in the redis cluster.
Optionally, in the step of issuing information to the issuing object through the scheduling center, a working thread may be started; acquiring a distributed lock through a working thread, and taking out target information to be issued from a delay queue according to the distributed lock; and issuing information to the corresponding issuing object based on the target information to be issued.
In the embodiment of the invention, in the dispatching center, the target information to be issued is taken out from the delay queue through the working thread. The target information to be issued refers to information to be issued with the trigger time being the current time.
Specifically, the delay queue in the scheduling center is a distributed queue, for a single working thread, before the target information to be issued is taken out, a lock in a redis cluster may be acquired, and the lock in the redis cluster is used to prevent the target information to be issued from being read by multiple working threads at the same time, so that efficient concurrent operation is realized, and service conflict during multiple concurrencies is avoided.
After the target information to be published is obtained, 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, so that information publishing is completed.
Optionally, in the step of issuing information to the corresponding issuing object based on the target information to be issued, the target information to be issued may be issued to the corresponding issuing object through message queue telemetry transmission.
In the embodiment of the invention, the information can be published to the publishing object through the message queue telemetry transmission MQTT.
Specifically, the target information to be published acquired by the multiple working threads can be written into the message queue telemetry transport MQTT in an asynchronous manner, and the target information to be published is published into the publishing object through a message transmission protocol of a publish/subscribe mode of the message queue telemetry transport MQTT.
Compared with the traditional pharmacy terminal which requests announcement information through websocket conversation or http polling, the method has the advantages that the message pushing can be accelerated and the interaction experience of the pharmacy terminal is optimized through the combination of asynchronous multithreading and MQTT.
In a possible embodiment, the publishing object may have pushed a bulletin list, where the pushed bulletin list records information published to the publishing object, and when the publishing object reads an information, the publishing object is read according to a state of the corresponding information in the bulletin list.
In a possible embodiment, when the information of the unread state exists in the bulletin list, if the unread duration of the unread state information exceeds a preset time threshold, the published object may be prompted to read.
It should be noted that the information publishing method provided by the embodiment of the present invention can be applied to devices such as smart phones, computers, servers, and the like, which can publish information.
Optionally, referring to fig. 5, fig. 5 is a schematic structural diagram of an information publishing device provided in an embodiment of the present invention, and as shown in fig. 5, the information publishing device includes:
an obtaining module 501, configured to obtain information to be published, where the information to be published includes a publishing object and publishing time;
a first publishing module 502, configured to publish the information to be published to a scheduling center according to the publishing time, where the scheduling center arranges the information to be published according to a sequence of the publishing time;
a second publishing module 503, configured to publish information to the publishing object through the scheduling center.
Optionally, the first distribution module 502 includes:
the first publishing submodule is used for writing the information to be published meeting the preset condition into the distributed service if the publishing time meets the preset condition, and publishing the information to be published to the dispatching center through the distributed service;
and the second issuing submodule is used for directly issuing the corresponding information to be issued if the issuing time does not accord with the preset condition.
Optionally, the dispatch center includes a delay queue, and the first distribution module 502 includes:
the first determining submodule is used for determining the scheduling trigger time of the information to be issued according to the issuing time;
and the third issuing submodule is used for adding the information to be issued to the delay queue according to the sequence of the scheduling trigger time.
Optionally, the first distribution module 502 further includes:
the second determining submodule is used for determining the identifier of the information to be issued;
the third determining submodule is used for determining the locking granularity of the information to be issued according to the identification;
and the locking submodule is used for carrying out distributed locking on the information to be issued through a distributed lock according to the locking granularity.
Optionally, the second publishing module 503 includes:
the starting submodule is used for starting a working thread;
the acquisition submodule is used for acquiring the distributed lock through the working thread and taking out target information to be issued from the delay queue according to the distributed lock;
and the fourth publishing submodule is used for publishing the information to the corresponding publishing object based on the target information to be published.
Optionally, the fourth publishing sub-module is further configured to publish the target to-be-published information to the corresponding publishing object through message queue telemetry transmission.
The information distribution device provided by the embodiment of the invention can be applied to equipment such as smart phones, computers, servers and the like which can distribute information.
The information issuing device provided by the embodiment of the invention can realize each process realized by the information issuing method in the method embodiment and can achieve the same beneficial effect. To avoid repetition, further description is omitted here.
Referring to fig. 6, fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, as shown in fig. 6, including: a memory 602, a processor 601, and a computer program of an information distribution method stored on the memory 602 and executable on the processor 601, wherein:
the processor 601 is used for calling the computer program stored in the memory 602, and executing the following steps:
acquiring information to be issued, wherein the information to be issued comprises an issuing object and issuing time;
the information to be issued is issued to a scheduling center according to the issuing time, and the scheduling center arranges the information to be issued according to the sequence of the issuing time;
and issuing information to the issuing object through the dispatching center.
Optionally, the issuing, performed by the processor 601, the information to be issued to the scheduling center according to the issue time includes:
if the release time meets a preset condition, writing the information to be released meeting the preset condition into a distributed service, and releasing the information to be released to the dispatching center through the distributed service;
and if the release time does not meet the preset condition, directly releasing the corresponding information to be released.
Optionally, the scheduling center includes a delay queue, and the issuing the information to be issued to the scheduling center according to the issue time performed by the processor 601 includes:
determining the scheduling trigger time of the information to be issued according to the issuing time;
and adding the information to be issued to the delay queue according to the sequence of the scheduling trigger time.
Optionally, after the information to be issued is added to the delay queue according to the sequence of the scheduling trigger time, the method executed by the processor 601 further includes:
determining the identifier of the information to be issued;
determining the locking granularity of the information to be issued according to the identification;
and according to the locking granularity, carrying out distributed locking on the information to be issued through a distributed lock.
Optionally, the issuing information to the issuing object through the scheduling center by the processor 601 includes:
starting a working thread;
acquiring the distributed lock through the working thread, and taking out target information to be issued from the delay queue according to the distributed lock;
and issuing information to the corresponding issuing object based on the target information to be issued.
Optionally, the information issuing, performed by the processor 601, to the corresponding issuing object based on the target information to be issued includes:
and issuing the information to be issued to the corresponding issuing object by the information queue telemetry transmission.
The electronic equipment provided by the embodiment of the invention can realize each process realized by the information issuing method in the embodiment of the method, and can achieve the same beneficial effect. To avoid repetition, further description is omitted here.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the information publishing method or the application-side information publishing method provided in the embodiment of the present invention, and can achieve the same technical effect, and in order to avoid repetition, the details are not repeated here.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present invention, and it is therefore to be understood that the invention is not limited by the scope of the appended claims.

Claims (10)

1. An information issuing method is characterized by comprising the following steps:
acquiring information to be issued, wherein the information to be issued comprises an issuing object and issuing time;
the information to be issued is issued to a scheduling center according to the issuing time, and the scheduling center arranges the information to be issued according to the sequence of the issuing time;
and issuing information to the issuing object through the dispatching center.
2. The information issuing method according to claim 1, wherein the issuing the information to be issued to the scheduling center according to the issuing time includes:
if the release time meets a preset condition, writing the information to be released meeting the preset condition into a distributed service, and releasing the information to be released to the dispatching center through the distributed service;
and if the release time does not meet the preset condition, directly releasing the corresponding information to be released.
3. The information distribution method according to claim 1, wherein the scheduling center includes a delay queue, and the distributing the information to be distributed to the scheduling center according to the distribution time includes:
determining the scheduling trigger time of the information to be issued according to the issuing time;
and adding the information to be issued to the delay queue according to the sequence of the scheduling trigger time.
4. The information distribution method according to claim 3, wherein after the information to be distributed is added to the delay queue in the order of the scheduling trigger time, the method further comprises:
determining the identifier of the information to be issued;
determining the locking granularity of the information to be issued according to the identification;
and according to the locking granularity, carrying out distributed locking on the information to be issued through a distributed lock.
5. The information distribution method according to claim 4, wherein the distributing information to the distribution object by the scheduling center includes:
starting a working thread;
acquiring the distributed lock through the working thread, and taking out target information to be issued from the delay queue according to the distributed lock;
and issuing information to the corresponding issuing object based on the target information to be issued.
6. The information distribution method according to claim 5, wherein the distributing information to the corresponding distribution object based on the target information to be distributed includes:
and issuing the target information to be issued to the corresponding issuing object through message queue telemetry transmission.
7. An information distribution apparatus characterized by comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring information to be issued, and the information to be issued comprises an issuing object and issuing time;
the first issuing module is used for issuing the information to be issued to a scheduling center according to the issuing time, and the scheduling center arranges the information to be issued according to the sequence of the issuing time;
and the second issuing module is used for issuing information to the issuing object through the dispatching center.
8. An information distribution system characterized by comprising: the information editing entity, the information issuing device and the issuing object, wherein the information editing is in signal connection with the information issuing device, and the information issuing device is in signal connection with the issuing object;
the information editing entity is used for editing information to be issued, and the information to be issued comprises an issuing object and issuing time;
the information issuing device is used for acquiring the information to be issued; the information to be issued is issued to a scheduling center according to the issuing time, and the scheduling center arranges the information to be issued according to the sequence of the issuing time; information is issued to the issuing object through the dispatching center;
the distribution object is used for receiving the information distributed by the information distribution device.
9. An electronic device, comprising: memory, processor and computer program stored on the memory and executable on the processor, the processor implementing the steps in the information distribution method according to any one of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium, characterized in that a computer program is stored thereon, which computer program, when being executed by a processor, carries out the steps in the information distribution method according to any one of claims 1 to 6.
CN202210819542.6A 2022-07-12 2022-07-12 Information issuing method, device, system, electronic equipment and storage medium Pending CN115396498A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210819542.6A CN115396498A (en) 2022-07-12 2022-07-12 Information issuing method, device, system, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210819542.6A CN115396498A (en) 2022-07-12 2022-07-12 Information issuing method, device, system, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115396498A true CN115396498A (en) 2022-11-25

Family

ID=84116204

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210819542.6A Pending CN115396498A (en) 2022-07-12 2022-07-12 Information issuing method, device, system, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115396498A (en)

Citations (26)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020123989A1 (en) * 2001-03-05 2002-09-05 Arik Kopelman Real time filter and a method for calculating the relevancy value of a document
CN101124578A (en) * 2005-01-14 2008-02-13 国际商业机器公司 Sharable multi-tenant reference data utility and repository, including value enhancement and on-demand data delivery and methods of operation
CN101141479A (en) * 2006-09-07 2008-03-12 捷讯研究有限公司 Mediated registration of client applications and content providers with push content delivery system
US20080147646A1 (en) * 2002-02-07 2008-06-19 The Relegence Corporation Method for real time relevancy determination of terms
CN101588376A (en) * 2009-06-11 2009-11-25 腾讯科技(深圳)有限公司 Information releasing method, device and system
CN101944769A (en) * 2010-07-16 2011-01-12 北京中科伏瑞电气技术有限公司 Wind power transmission protocol
CN102572554A (en) * 2012-01-11 2012-07-11 深圳市同洲视讯传媒有限公司 Information distribution system and method
CN103021170A (en) * 2012-12-06 2013-04-03 苏州亿倍信息技术有限公司 Information interaction method and system
CN103066701A (en) * 2012-12-19 2013-04-24 云南电力调度控制中心 Power grid dispatching real-time operation command method and system
CN103312780A (en) * 2013-05-13 2013-09-18 济南政和科技有限公司 Cluster type information issuing method of portal website in county and municipal institutions
CN103313109A (en) * 2012-03-12 2013-09-18 李雪菲 Method and system for releasing advertisement
CN103428290A (en) * 2013-08-19 2013-12-04 北京网秦天下科技有限公司 Method and device for pushing data
CN104244203A (en) * 2014-09-25 2014-12-24 小米科技有限责任公司 Message pushing method and device
CN104796435A (en) * 2015-05-08 2015-07-22 集怡嘉数码科技(深圳)有限公司 Message pushing method and message server
CN105491115A (en) * 2015-11-25 2016-04-13 努比亚技术有限公司 Message pushing device and method
CN106355318A (en) * 2016-08-29 2017-01-25 深圳市中润四方信息技术有限公司 Information release processing method and system
CN107122836A (en) * 2017-04-14 2017-09-01 上海雷腾软件股份有限公司 A kind of method and apparatus for vehicle distribute leaflets
CN107220262A (en) * 2016-03-22 2017-09-29 阿里巴巴集团控股有限公司 Information processing method and device
CN107222463A (en) * 2017-05-10 2017-09-29 北京潘达互娱科技有限公司 information issuing method and device
CN110457634A (en) * 2019-08-12 2019-11-15 拉扎斯网络科技(上海)有限公司 Information issuing method, device, electronic equipment and computer readable storage medium
CN110765288A (en) * 2019-09-04 2020-02-07 北京旷视科技有限公司 Image information synchronization method, device and system and storage medium
CN110990166A (en) * 2019-11-15 2020-04-10 上海易点时空网络有限公司 Data processing method and device for content distribution
CN111353618A (en) * 2020-02-27 2020-06-30 汉海信息技术(上海)有限公司 Reservation information processing method and device
CN111679922A (en) * 2020-06-10 2020-09-18 中国银行股份有限公司 Event-driven message publishing method, device and system
CN113127217A (en) * 2019-12-30 2021-07-16 中移(成都)信息通信科技有限公司 Data distribution method, device, equipment and storage medium
CN113179329A (en) * 2021-05-24 2021-07-27 深圳平安智汇企业信息管理有限公司 Service distribution method and device, server and storage medium

Patent Citations (26)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020123989A1 (en) * 2001-03-05 2002-09-05 Arik Kopelman Real time filter and a method for calculating the relevancy value of a document
US20080147646A1 (en) * 2002-02-07 2008-06-19 The Relegence Corporation Method for real time relevancy determination of terms
CN101124578A (en) * 2005-01-14 2008-02-13 国际商业机器公司 Sharable multi-tenant reference data utility and repository, including value enhancement and on-demand data delivery and methods of operation
CN101141479A (en) * 2006-09-07 2008-03-12 捷讯研究有限公司 Mediated registration of client applications and content providers with push content delivery system
CN101588376A (en) * 2009-06-11 2009-11-25 腾讯科技(深圳)有限公司 Information releasing method, device and system
CN101944769A (en) * 2010-07-16 2011-01-12 北京中科伏瑞电气技术有限公司 Wind power transmission protocol
CN102572554A (en) * 2012-01-11 2012-07-11 深圳市同洲视讯传媒有限公司 Information distribution system and method
CN103313109A (en) * 2012-03-12 2013-09-18 李雪菲 Method and system for releasing advertisement
CN103021170A (en) * 2012-12-06 2013-04-03 苏州亿倍信息技术有限公司 Information interaction method and system
CN103066701A (en) * 2012-12-19 2013-04-24 云南电力调度控制中心 Power grid dispatching real-time operation command method and system
CN103312780A (en) * 2013-05-13 2013-09-18 济南政和科技有限公司 Cluster type information issuing method of portal website in county and municipal institutions
CN103428290A (en) * 2013-08-19 2013-12-04 北京网秦天下科技有限公司 Method and device for pushing data
CN104244203A (en) * 2014-09-25 2014-12-24 小米科技有限责任公司 Message pushing method and device
CN104796435A (en) * 2015-05-08 2015-07-22 集怡嘉数码科技(深圳)有限公司 Message pushing method and message server
CN105491115A (en) * 2015-11-25 2016-04-13 努比亚技术有限公司 Message pushing device and method
CN107220262A (en) * 2016-03-22 2017-09-29 阿里巴巴集团控股有限公司 Information processing method and device
CN106355318A (en) * 2016-08-29 2017-01-25 深圳市中润四方信息技术有限公司 Information release processing method and system
CN107122836A (en) * 2017-04-14 2017-09-01 上海雷腾软件股份有限公司 A kind of method and apparatus for vehicle distribute leaflets
CN107222463A (en) * 2017-05-10 2017-09-29 北京潘达互娱科技有限公司 information issuing method and device
CN110457634A (en) * 2019-08-12 2019-11-15 拉扎斯网络科技(上海)有限公司 Information issuing method, device, electronic equipment and computer readable storage medium
CN110765288A (en) * 2019-09-04 2020-02-07 北京旷视科技有限公司 Image information synchronization method, device and system and storage medium
CN110990166A (en) * 2019-11-15 2020-04-10 上海易点时空网络有限公司 Data processing method and device for content distribution
CN113127217A (en) * 2019-12-30 2021-07-16 中移(成都)信息通信科技有限公司 Data distribution method, device, equipment and storage medium
CN111353618A (en) * 2020-02-27 2020-06-30 汉海信息技术(上海)有限公司 Reservation information processing method and device
CN111679922A (en) * 2020-06-10 2020-09-18 中国银行股份有限公司 Event-driven message publishing method, device and system
CN113179329A (en) * 2021-05-24 2021-07-27 深圳平安智汇企业信息管理有限公司 Service distribution method and device, server and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
MOHAMMAD ALSHAYEB: ""A framework for an integrated unified modeling language"", 《FITEE》 *
张世帅,张学松,孔庆,何洋: ""电力市场多维定向信息发布技术研究"", 《POWER SYSTEM TECHNOLOGY》 *

Similar Documents

Publication Publication Date Title
CN108536532B (en) Batch task processing method and system
US8763012B2 (en) Scalable, parallel processing of messages while enforcing custom sequencing criteria
CN111124653A (en) Delayed message processing method, system, device and storage medium
CN102369523A (en) Monitoring of distributed applications
CA3125575A1 (en) Blockchain transaction manager
US20060288037A1 (en) Queued system event notification and maintenance
KR101416280B1 (en) Event handling system and method
CN108833199A (en) Method, apparatus, equipment and the storage medium that data report
CN111225029A (en) Dynamic message pushing method and system and automobile diagnosis server
CN111784318A (en) Data processing method and device, electronic equipment and storage medium
CN110727507B (en) Message processing method and device, computer equipment and storage medium
CN113672500A (en) Deep learning algorithm testing method and device, electronic device and storage medium
CN111597056B (en) Distributed scheduling method, system, storage medium and equipment
CN115396498A (en) Information issuing method, device, system, electronic equipment and storage medium
CN115333942B (en) Event retry method and device, storage medium and electronic equipment
CN116842090A (en) Accounting system, method, equipment and storage medium
CN110515749B (en) Method, device, server and storage medium for queue scheduling of information transmission
CN110750350B (en) Large resource scheduling method, system, device and readable storage medium
CN108572863B (en) Distributed task scheduling system and method
CN116737395A (en) Asynchronous information processing system and method
CN115525449B (en) Micro-service data transmission system, method and storage medium
CN111652681A (en) Receipt processing method, server and computer readable storage medium
CN112035460A (en) Identification distribution method, device, equipment and storage medium
CN111405015B (en) Data processing method, device, equipment and storage medium
CN111343152B (en) Data processing method and device, electronic equipment and storage medium

Legal Events

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