CN115665075A - Data pushing method and system for message queue, electronic device and medium - Google Patents

Data pushing method and system for message queue, electronic device and medium Download PDF

Info

Publication number
CN115665075A
CN115665075A CN202211295593.XA CN202211295593A CN115665075A CN 115665075 A CN115665075 A CN 115665075A CN 202211295593 A CN202211295593 A CN 202211295593A CN 115665075 A CN115665075 A CN 115665075A
Authority
CN
China
Prior art keywords
data
pushing
theme
push
address
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
CN202211295593.XA
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.)
Zhejiang Geely Holding Group Co Ltd
Guangyu Mingdao Digital Technology Co Ltd
Original Assignee
Zhejiang Geely Holding Group Co Ltd
Guangyu Mingdao Digital Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Geely Holding Group Co Ltd, Guangyu Mingdao Digital Technology Co Ltd filed Critical Zhejiang Geely Holding Group Co Ltd
Priority to CN202211295593.XA priority Critical patent/CN115665075A/en
Publication of CN115665075A publication Critical patent/CN115665075A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention relates to the technical field of data pushing, and discloses a data pushing method, a system, electronic equipment and a medium for a message queue.

Description

Data pushing method and system for message queue, electronic device and medium
Technical Field
The present invention relates to the field of data pushing technologies, and in particular, to a data pushing method and system for a message queue, an electronic device, and a medium.
Background
Currently, there is information interaction between items, and in order not to affect a main flow of a user in the information interaction process, asynchronous push processing is usually performed on the information interaction through MQ (Message Queue) Message interfacing.
In an actual business scenario, however, there may be business associations between different MQ messages. For example, the product module and the workbench are two independent items, but belong to the same system on the service partition, and the product module sends the creation data to the workbench through MQ messages when creating the application and creating the menu, but due to the lack of data consumption logic, if the creation data of the creation menu is consumed before the creation data of the creation application is consumed, the service of the product module cannot be closed, so that the integrity of the service is lost, and the stability of service execution is poor.
Disclosure of Invention
The following presents a simplified summary in order to provide a basic understanding of some aspects of the disclosed embodiments. This summary is not an extensive overview and is intended to neither identify key/critical elements nor delineate the scope of such embodiments, but is intended to be a prelude to the more detailed description that is presented later.
In view of the above shortcomings in the prior art, the present invention discloses a data pushing method, system, electronic device and medium for message queue, so as to weave data consumption logic in the message queue and improve the stability of service execution.
The invention discloses a data pushing method for a message queue, which comprises the following steps: acquiring a plurality of data pushing information, wherein the data pushing information comprises a message queue address, a data subject and a data number; respectively establishing data push services corresponding to the message queue addresses according to the data topics, and receiving topic data pushed by the data push services, wherein the data push services are used for pushing topic data corresponding to the data topics in the message queue addresses; matching the data numbers corresponding to the subject data to obtain a preset push address corresponding to each subject data, and arranging the received subject data according to the sequence of the data numbers to obtain a subject data sequence; and sequentially pushing the theme data in the theme data sequence to corresponding preset pushing addresses.
Optionally, the data pushing service pushes topic data corresponding to the data topic in the message queue address in the following manner: monitoring a message queue corresponding to the message queue address; if theme data corresponding to the data theme exists in the message queue, extracting the theme data from the message queue; and pushing the theme data.
Optionally, sequentially pushing the theme data in the theme data sequence to a corresponding preset push address includes: matching according to the data numbers corresponding to the theme data to obtain a preset pushing mode corresponding to each theme data; packaging the subject data in the subject data sequence according to a corresponding preset pushing mode to obtain a data receiving request; and sequentially pushing the data receiving requests corresponding to the theme data to the corresponding preset pushing addresses.
Optionally, after receiving the theme data pushed by the data push service, the method further includes: storing the theme data in a preset database; after the theme data in the theme data sequence are sequentially pushed to the corresponding preset pushing addresses, pushing result information fed back by each preset pushing address is received; if the pushing result information of the theme data comprises successful pushing, deleting the theme data from the preset database; and if the pushing result information of the subject data comprises pushing failure, obtaining a retry strategy corresponding to the subject data according to data number matching corresponding to the subject data, and storing the subject data into a preset failure retry pool, wherein the failure retry pool is used for re-pushing the subject data in the failure retry pool to a corresponding preset pushing address according to the retry strategy.
Optionally, obtaining a plurality of data push information includes: the method comprises the steps of obtaining an encryption key and a client, wherein the client is provided with the encryption key and is used for receiving a plurality of data push information input by a user; receiving an access token sent by the client, wherein the access token is generated according to the encryption key; carrying out key verification on the access token according to the encryption key and generating a key verification result; if the key verification result comprises successful verification, receiving each data pushing message sent by the client; and if the key verification result comprises verification failure, sending verification failure information to the client.
Optionally, the method further comprises at least one of: sequentially pushing the subject data in the subject data sequence to the front of a corresponding preset pushing address, acquiring a data encryption rule, and encrypting each subject data according to the data encryption rule; after preset push addresses corresponding to the subject data are obtained according to data number matching corresponding to the subject data, the subject data in the subject data sequence are sequentially pushed to the front of the corresponding preset push addresses, an address white list is obtained, matching is conducted on the preset push addresses according to the address white list, illegal push addresses are obtained, and the illegal push addresses are deleted, wherein the address white list comprises at least one legal push address, and the illegal push addresses comprise the preset push addresses different from the legal push addresses.
Optionally, after the received subject data is subjected to data arrangement according to the sequence of the data numbers to obtain a subject data sequence, the subject data in the subject data sequence is sequentially pushed to a corresponding preset pushing address, and the method further includes: determining the theme data corresponding to the same preset push address as the same group of data; counting the number of the same group of data existing after each topic data to obtain the number of subsequent data, and adding the number of the subsequent data corresponding to the topic data into the topic data; and after the theme data in the theme data sequence are sequentially pushed to the corresponding preset push addresses, the preset push addresses carry out follow-up reminding according to the quantity of the received follow-up data.
The invention discloses a data pushing system for a message queue, which comprises: the device comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring a plurality of data pushing information, and the data pushing information comprises a message queue address, a data subject and a data number; the establishing module is used for respectively establishing data pushing services corresponding to the message queue addresses according to the data topics and receiving topic data pushed by the data pushing services, wherein the data pushing services are used for pushing the topic data corresponding to the data topics in the message queue addresses; the arranging module is used for obtaining a preset push address corresponding to each topic data according to the data number matching corresponding to the topic data, and carrying out data arrangement on the received topic data according to the sequence of the data numbers to obtain a topic data sequence; and the pushing module is used for sequentially pushing the theme data in the theme data sequence to the corresponding preset pushing addresses.
The invention discloses an electronic device, comprising: a processor and a memory; the memory is used for storing computer programs, and the processor is used for executing the computer programs stored by the memory so as to make the electronic equipment execute the method.
The invention discloses a computer-readable storage medium, on which a computer program is stored: which when executed by a processor implements the method described above.
The invention has the beneficial effects that:
the data pushing service corresponding to the message queue address is established through the data theme, so that theme data corresponding to the data theme are pushed through the data pushing service, preset pushing addresses are obtained according to the data numbers, the obtained theme data are sequenced, and therefore the theme data are sequentially pushed to the corresponding preset pushing addresses according to the obtained theme data sequence. Therefore, the theme data is pushed specially by the data pushing module, and the correct pushing and consumption sequence of the data is ensured by the data serial number, so that the asynchronous pushing of the data in the message queue is realized, the condition that project services cannot be closed or service integrity is lost is avoided, and the stability of service execution is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application. It is obvious that the drawings in the following description are only some embodiments of the application, and that for a person skilled in the art, other drawings can be derived from them without inventive effort. In the drawings:
FIG. 1 is a flow chart illustrating a message queue pushing method according to an embodiment of the present invention;
FIG. 2 is a flow chart illustrating another message queue pushing method according to an embodiment of the present invention
FIG. 3 is a flow chart of another message queue pushing method in an embodiment of the present invention;
FIG. 4 is a diagram illustrating a structure of a message queue pushing system according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device in an embodiment of the present invention.
Detailed Description
The embodiments of the present invention are described below with reference to specific embodiments, and other advantages and effects of the present invention will be easily understood by those skilled in the art from the disclosure of the present specification. The invention is capable of other and different embodiments and of being practiced or of being carried out in various ways, and its several details are capable of modification in various respects, all without departing from the spirit and scope of the present invention. It should be noted that, in the following embodiments and examples, subsamples may be combined with each other without conflict.
It should be noted that the drawings provided in the following embodiments are only for illustrating the basic idea of the present invention, and the drawings only show the components related to the present invention rather than being drawn according to the number, shape and size of the components in actual implementation, and the type, amount and proportion of each component in actual implementation can be changed freely, and the layout of the components can be more complicated.
In the following description, numerous details are set forth to provide a more thorough explanation of embodiments of the present invention, however, it will be apparent to one skilled in the art that embodiments of the present invention may be practiced without these specific details, and in other embodiments, well-known structures and devices are shown in block diagram form, rather than in detail, in order to avoid obscuring embodiments of the present invention.
The terms "first," "second," and the like in the description and claims of the embodiments of the disclosure and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the present disclosure described herein may be made. Furthermore, the terms "comprising" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions.
The term "plurality" means two or more unless otherwise specified.
In the embodiment of the present disclosure, the character "/" indicates that the preceding and following objects are in an or relationship. For example, A/B represents: a or B.
The term "and/or" is an associative relationship that describes objects, meaning that three relationships may exist. E.g., a and/or B, represents: a or B, or A and B.
As shown in fig. 1, an embodiment of the present disclosure provides a data pushing method for a message queue, including:
step S101, acquiring a plurality of data push information;
the data push information comprises a message queue address, a data subject and a data number;
step S102, respectively establishing data push services corresponding to the message queue addresses according to the data topics, and receiving topic data pushed by the data push services;
the data pushing service is used for pushing theme data corresponding to the data theme in the message queue address;
step S103, obtaining preset push addresses corresponding to the subject data according to the data number matching corresponding to the subject data, and performing data arrangement on the received subject data according to the sequence of the data numbers to obtain a subject data sequence;
and step S104, sequentially pushing the theme data in the theme data sequence to the corresponding preset pushing address.
By adopting the data pushing method for the message queue provided by the embodiment of the disclosure, the data pushing service corresponding to the message queue address is established through the data topic, so that the topic data corresponding to the data topic is pushed through the data pushing service, the preset pushing address is obtained according to the data number, the obtained topic data is sequenced, and the topic data is sequentially pushed to the corresponding preset pushing address according to the obtained topic data sequence. Therefore, the theme data is specially pushed through the data pushing module, and the correct pushing and consuming sequence of the data is ensured through the data serial number, so that the asynchronous pushing of the data in the message queue is realized, the condition that project services cannot be closed or service integrity is lost is avoided, and the stability of service execution is improved.
Optionally, obtaining a plurality of data push information includes: the method comprises the steps of obtaining an encryption key and a client, wherein the client is provided with the encryption key and is used for receiving a plurality of data push information input by a user; receiving an access token sent by a client, wherein the access token is generated according to an encryption key; carrying out key verification on the access token according to the encryption key and generating a key verification result; if the key verification result comprises successful verification, receiving data push information sent by the client; and if the key verification result comprises verification failure, sending verification failure information to the client.
In some embodiments, the data pushing information further includes a preset pushing address corresponding to the data number.
In some embodiments, before using the data push service, the data push information needs to be key-checked by a key.
Optionally, the data pushing service pushes topic data corresponding to the data topic in the message queue address by the following method: monitoring a message queue corresponding to the message queue address; if theme data corresponding to the data theme exists in the message queue, extracting the theme data from the message queue; and pushing theme data.
In some embodiments, subject data is backed up periodically, using a database (e.g., mySQL) as the data storage scheme, avoiding data loss.
In some embodiments, the configured data push service is loaded at project startup; monitoring the message queue address based on theme configuration by configuring a data push service, and storing the monitored data in a database; each data push service has a unique data number (KEY), and each data number is used for representing one type of traffic data.
Optionally, sequentially pushing the theme data in the theme data sequence to the corresponding preset push address, including: obtaining a preset pushing mode corresponding to each topic data according to the data number matching corresponding to the topic data; packaging the subject data in the subject data sequence according to a corresponding preset pushing mode to obtain a data receiving request; and sequentially pushing the data receiving requests corresponding to the theme data to the corresponding preset pushing addresses.
In some embodiments, the service data a, B, and C need to be pushed in order, the key consumption order of the three service data is sorted, and the order of the data is logically ensured in the pushing.
In some embodiments, the preset push manner includes an HTTP (hypertext Transfer Protocol) Protocol or an MQ message, where the HTTP Protocol needs to configure a corresponding data number, an HTTP push address, data push time, push retry times, a communication manner of an associated person, and the MQ message needs a corresponding data number, an MQ address, a data subject, data push time, push retry times, and the like.
In some embodiments, the subject data that needs to be pushed is scanned out for encapsulation, where different requests are assembled according to the type configuration according to the type of each message.
Optionally, after receiving the theme data pushed by the data pushing service, the method further includes: storing the theme data in a preset database; after sequentially pushing the theme data in the theme data sequence to the corresponding preset pushing addresses, receiving pushing result information fed back by each preset pushing address; if the pushing result information of the theme data comprises successful pushing, deleting the theme data from a preset database; and if the pushing result information of the theme data comprises pushing failure, obtaining a retry strategy corresponding to the theme data according to the data number matching corresponding to the theme data, and storing the theme data into a preset failure retry pool, wherein the failure retry pool is used for re-pushing the theme data in the failure retry pool to a corresponding preset pushing address according to the retry strategy.
In some embodiments, the push data obtains the return information, the state is modified if the push data is successful, and the retry strategy is adopted if the push data is failed, so that the full success is ensured.
Optionally, the method further comprises at least one of: sequentially pushing the subject data in the subject data sequence to the front of the corresponding preset pushing address, acquiring a data encryption rule, and encrypting each subject data according to the data encryption rule; after preset push addresses corresponding to the theme data are obtained according to data number matching corresponding to the theme data, the theme data in the theme data sequence are sequentially pushed to the positions before the corresponding preset push addresses, an address white list is obtained, the preset push addresses are matched according to the address white list, illegal push addresses are obtained, and the illegal push addresses are deleted, wherein the address white list comprises at least one legal push address, and the illegal push addresses comprise preset push addresses different from the legal push addresses.
In some embodiments, a data transmission encryption algorithm is provided to encrypt data according to encryption and decryption rules fixed by the platform.
In some embodiments, the IP white list is configured, and the white list needs to be configured for intercepting both the data push service and the preset push address.
In some embodiments, the cluster-mode deployment is used, the service availability is high, and the service blocking is prevented.
In some embodiments, dynamic capacity expansion is used, and is performed when the data volume is large to ensure availability.
Therefore, the key is verified before the data push information is acquired, the data is encrypted in the data transmission process, and the white list is added in the data push process, so that the safety of data push is improved.
Optionally, after the received subject data is subjected to data arrangement according to the sequence of the data numbers to obtain a subject data sequence, the subject data in the subject data sequence is sequentially pushed to the corresponding preset push address, and the method further includes: determining theme data corresponding to the same preset push address as the same group of data; counting the number of the same group of data existing after each topic data to obtain the number of subsequent data, and adding the number of the subsequent data corresponding to the topic data into the topic data; and after the theme data in the theme data sequence are sequentially pushed to the corresponding preset push addresses, the preset push addresses carry out follow-up reminding according to the quantity of the received follow-up data.
In some embodiments, the subsequent reminder is used to receive a reminder for a manager corresponding to the pushed data, and is also used to manage the thread when the memory occupies a relatively large amount, so as to provide a memory space for the subsequent data.
Therefore, the preset push address is subsequently reminded, so that manager reminding, memory thread management and the like are carried out on the preset push address according to the subsequent reminding, the flexibility of data use is improved, and the use experience of a user is improved.
As shown in fig. 2, an embodiment of the present disclosure provides a data pushing method for a message queue, including:
step S201, receiving a plurality of data push messages;
the data push information comprises a message queue address, a data subject and a data number;
step S202, respectively establishing data push services corresponding to the message queue addresses according to the data topics;
step S203, receiving theme data pushed by the data pushing service;
step S204, judging whether data pushing and arranging are needed, if so, skipping to step S205, and if not, skipping to step S206;
step S205, arranging the received subject data according to the sequence of the data numbers to obtain a subject data sequence, and skipping to step S206;
step S206, a preset push address corresponding to each theme data is obtained according to data number matching corresponding to the theme data;
step S207, sequentially pushing the theme data in the theme data sequence to corresponding preset pushing addresses;
step S208, judging whether the theme data is pushed successfully or not, if so, skipping to step S209, and if not, skipping to step S207;
step S209 ends.
By adopting the data pushing method for the message queue provided by the embodiment of the disclosure, the data pushing service corresponding to the message queue address is established through the data topic, so as to push the topic data corresponding to the data topic through the data pushing service, then the preset pushing address is obtained according to the data number, and the obtained topic data is sequenced, so that the topic data is sequentially pushed to the corresponding preset pushing address according to the obtained topic data sequence. Therefore, the theme data is specially pushed through the data pushing module, and the correct pushing and consuming sequence of the data is ensured through the data serial number, so that the asynchronous pushing of the data in the message queue is realized, the condition that project services cannot be closed or service integrity is lost is avoided, and the stability of service execution is improved.
As shown in fig. 3, an embodiment of the present disclosure provides a data pushing method for a message queue, including:
step S301, a distribution service acquires a plurality of data push information;
the data push information comprises a message queue address, a data subject and a data number;
step S302, the distribution service establishes data push service to the message queue;
step S303, the message queue sends theme data corresponding to the data theme to the server side through the data push service;
step S304, the distribution service carries out data arrangement on the received subject data according to the sequence of the data numbers to obtain a subject data sequence;
step S305, the distribution service obtains preset push addresses corresponding to the subject data according to the data number matching corresponding to the subject data;
step S306, the distribution service sequentially pushes the theme data in the theme data sequence to the corresponding preset push address.
By adopting the data pushing method for the message queue provided by the embodiment of the disclosure, the data pushing service corresponding to the message queue address is established through the data topic, so as to push the topic data corresponding to the data topic through the data pushing service, then the preset pushing address is obtained according to the data number, and the obtained topic data is sequenced, so that the topic data are sequentially pushed to the corresponding preset pushing address according to the obtained topic data sequence, and the method has the following advantages:
firstly, topic data is pushed specially through a data pushing module, and correct pushing and consuming sequences of the data are ensured through data numbering, so that asynchronous pushing of the data in a message queue is realized, project business can not be closed or business integrity is not lost, and the stability of business execution is improved;
secondly, key verification is carried out before data pushing information is obtained, data encryption is carried out in the data transmission process, and a white list is added in the data pushing process, so that the safety of data pushing is improved;
and thirdly, subsequent reminding is carried out on the preset push address, so that manager reminding, memory thread management and the like are carried out on the preset push address according to the subsequent reminding, the flexibility of data use is improved, and the use experience of a user is improved.
As shown in fig. 4, an embodiment of the present disclosure provides a data pushing system for a message queue, including: the obtaining module 401 is configured to obtain a plurality of data pushing information, where the data pushing information includes a message queue address, a data topic, and a data number; the establishing module 402 is configured to respectively establish a data pushing service corresponding to each message queue address according to a data topic, and receive topic data pushed by the data pushing service, where the data pushing service is used to push topic data corresponding to a data topic in the message queue addresses; the arranging module 403 is configured to obtain a preset push address corresponding to each topic data according to the matching of the data numbers corresponding to the topic data, and perform data arrangement on the received topic data according to the sequence of the data numbers to obtain a topic data sequence; the pushing module 404 is configured to sequentially push the theme data in the theme data sequence to the corresponding preset pushing addresses.
By adopting the data pushing system for the message queue provided by the embodiment of the disclosure, the data pushing service corresponding to the message queue address is established through the data topic, so as to push the topic data corresponding to the data topic through the data pushing service, then the preset pushing address is obtained according to the data number, and the obtained topic data is sequenced, so that the topic data is sequentially pushed to the corresponding preset pushing address according to the obtained topic data sequence. Therefore, the theme data is pushed specially by the data pushing module, and the correct pushing and consumption sequence of the data is ensured by the data serial number, so that the asynchronous pushing of the data in the message queue is realized, the condition that project services cannot be closed or service integrity is lost is avoided, and the stability of service execution is improved.
FIG. 5 illustrates a schematic structural diagram of a computer system suitable for use to implement the electronic device of the embodiments of the subject application. It should be noted that the computer system 500 of the electronic device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 5, the computer system 500 includes a Central Processing Unit (CPU) 501, which can perform various suitable actions and processes, such as executing the method in the above-mentioned embodiment, according to a program stored in a Read-Only Memory (ROM) 502 or a program loaded from a storage portion 508 into a Random Access Memory (RAM) 503. In the RAM503, various programs and data necessary for system operation are also stored. The CPU501, ROM502, and RAM503 are connected to each other through a bus 504. An Input/Output (I/O) interface 505 is also connected to bus 504.
The following components are connected to the I/O interface 505: an input portion 506 including a keyboard, a mouse, and the like; an output section 507 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage portion 508 including a hard disk and the like; and a communication section 509 including a Network interface card such as a LAN (Local Area Network) card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The driver 510 is also connected to the I/O interface 505 as necessary. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted into the storage section 508 as necessary.
In particular, according to embodiments of the present application, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising a computer program for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 509, and/or installed from the removable medium 511. The computer program executes various functions defined in the system of the present application when executed by a Central Processing Unit (CPU) 501.
It should be noted that the computer readable medium shown in the embodiments of the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. The computer readable storage medium may be, for example, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read-Only Memory (ROM), an Erasable Programmable Read-Only Memory (EPROM), a flash Memory, an optical fiber, a portable Compact Disc Read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer-readable signal medium may include a propagated data signal with a computer program embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
The disclosed embodiments also provide a computer-readable storage medium on which a computer program is stored, which when executed by a processor implements any of the methods in the embodiments.
The computer-readable storage medium in the embodiments of the present disclosure may be understood by those skilled in the art as follows: all or part of the steps for implementing the above method embodiments may be performed by hardware associated with a computer program. The aforementioned computer program may be stored in a computer readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
The electronic device disclosed in this embodiment includes a processor, a memory, a transceiver, and a communication interface, where the memory and the communication interface are connected to the processor and the transceiver and perform mutual communication, the memory is used to store a computer program, the communication interface is used to perform communication, and the processor and the transceiver are used to run the computer program, so that the electronic device performs the steps of the above method.
In this embodiment, the Memory may include a Random Access Memory (RAM), and may also include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete gate or transistor logic device, or discrete hardware components.
The above description and drawings sufficiently illustrate embodiments of the disclosure to enable those skilled in the art to practice them. Other embodiments may incorporate structural, logical, electrical, process, and other changes. The examples merely typify possible variations. Individual components and functions are optional unless explicitly required, and the sequence of operations may vary. Portions and subsamples of some embodiments may be included in or substituted for portions and subsamples of other embodiments. Furthermore, the words used in the specification are words of description only and are not intended to limit the claims. As used in the description of the embodiments and the claims, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. Similarly, the term "and/or" as used in this application is meant to encompass any and all possible combinations of one or more of the associated listed. Furthermore, the terms "comprises," "comprising," and variations thereof, when used in this application, specify the presence of stated sub-samples, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other sub-samples, integers, steps, operations, elements, components, and/or groups thereof. Without further limitation, an element defined by the phrase "comprising one of 8230" does not exclude the presence of additional identical elements in the process, method or device comprising the element. In this document, each embodiment may be described with emphasis on differences from other embodiments, and the same and similar parts between the respective embodiments may be referred to each other. For methods, products, etc. of the embodiment disclosure, reference may be made to the description of the method section for relevance if it corresponds to the method section of the embodiment disclosure.
Those of skill in the art would appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software may depend upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the disclosed embodiments. It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the system, the apparatus and the unit described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments disclosed herein, the disclosed methods, products (including but not limited to devices, apparatuses, etc.) may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a unit may be only one type of logical function division, and there may be another division in actual implementation, for example, multiple units or components may be combined or may be integrated into another system, or some subsamples may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form. Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to implement the present embodiment. In addition, functional units in the embodiments of the present disclosure may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. In the description corresponding to the flowcharts and block diagrams in the figures, operations or steps corresponding to different blocks may also occur in different orders than disclosed in the description, and sometimes there is no specific order between the different operations or steps. For example, two sequential operations or steps may in fact be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved. Each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.

Claims (10)

1. A method for pushing data for a message queue, comprising:
acquiring a plurality of data pushing information, wherein the data pushing information comprises a message queue address, a data subject and a data number;
respectively establishing data push services corresponding to the message queue addresses according to the data topics, and receiving topic data pushed by the data push services, wherein the data push services are used for pushing topic data corresponding to the data topics in the message queue addresses;
matching data numbers corresponding to the subject data to obtain preset push addresses corresponding to the subject data, and performing data arrangement on the received subject data according to the sequence of the data numbers to obtain a subject data sequence;
and sequentially pushing the theme data in the theme data sequence to corresponding preset pushing addresses.
2. The method according to claim 1, wherein the data push service pushes topic data corresponding to the data topic in the message queue address by:
monitoring a message queue corresponding to the message queue address;
if theme data corresponding to the data theme exists in the message queue, extracting the theme data from the message queue;
and pushing the theme data.
3. The method according to claim 1, wherein sequentially pushing the theme data in the theme data sequence to corresponding preset push addresses comprises:
matching according to the data numbers corresponding to the theme data to obtain a preset pushing mode corresponding to each theme data;
packaging the subject data in the subject data sequence according to a corresponding preset pushing mode to obtain a data receiving request;
and sequentially pushing the data receiving requests corresponding to the theme data to the corresponding preset pushing addresses.
4. The method of claim 1, wherein after receiving the topic data pushed by the data push service, the method further comprises:
storing the theme data in a preset database;
after the theme data in the theme data sequence are sequentially pushed to the corresponding preset pushing addresses, pushing result information fed back by each preset pushing address is received;
if the pushing result information of the theme data comprises successful pushing, deleting the theme data from the preset database;
and if the pushing result information of the subject data comprises a pushing failure, obtaining a retry strategy corresponding to the subject data according to the data number matching corresponding to the subject data, and storing the subject data into a preset failure retry pool, wherein the failure retry pool is used for re-pushing the subject data in the failure retry pool to a corresponding preset pushing address according to the retry strategy.
5. The method of claim 1, wherein obtaining a plurality of data push information comprises:
the method comprises the steps of obtaining an encryption key and a client, wherein the client is provided with the encryption key and used for receiving a plurality of data push information input by a user;
receiving an access token sent by the client, wherein the access token is generated according to the encryption key;
performing key verification on the access token according to the encryption key, and generating a key verification result;
if the key verification result comprises successful verification, receiving each data push message sent by the client;
and if the key verification result comprises verification failure, sending verification failure information to the client.
6. The method of claim 1, further comprising at least one of:
sequentially pushing the subject data in the subject data sequence to the front of a corresponding preset pushing address, acquiring a data encryption rule, and encrypting each subject data according to the data encryption rule;
after a preset push address corresponding to each theme data is obtained according to the matching of the data number corresponding to the theme data, the theme data in the theme data sequence are sequentially pushed to the front of the corresponding preset push address, an address white list is obtained, matching is carried out on each preset push address according to the address white list, an illegal push address is obtained, and the illegal push address is deleted, wherein the address white list comprises at least one legal push address, and the illegal push address comprises a preset push address different from the legal push address.
7. The method according to claims 1 to 6, wherein after performing data arrangement on the received subject data according to the sequence of the data numbers to obtain a subject data sequence, and before sequentially pushing the subject data in the subject data sequence to a corresponding preset pushing address, the method further comprises:
determining the theme data corresponding to the same preset push address as the same group of data;
counting the number of the same group of data existing after each topic data to obtain the number of subsequent data, and adding the number of the subsequent data corresponding to the topic data into the topic data;
and after the theme data in the theme data sequence are sequentially pushed to the corresponding preset push address, the preset push address performs subsequent reminding according to the quantity of the received subsequent data.
8. A data push system for a message queue, comprising:
the system comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for acquiring a plurality of data push messages, and the data push messages comprise message queue addresses, data themes and data numbers;
the establishing module is used for respectively establishing data pushing services corresponding to the message queue addresses according to the data topics and receiving topic data pushed by the data pushing services, wherein the data pushing services are used for pushing the topic data corresponding to the data topics in the message queue addresses;
the arranging module is used for obtaining a preset push address corresponding to each topic data according to the data number matching corresponding to the topic data, and carrying out data arrangement on the received topic data according to the sequence of the data numbers to obtain a topic data sequence;
and the pushing module is used for sequentially pushing the theme data in the theme data sequence to the corresponding preset pushing addresses.
9. An electronic device, comprising: a processor and a memory;
the memory is configured to store a computer program and the processor is configured to execute the computer program stored by the memory to cause the electronic device to perform the method of any of claims 1 to 7.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that:
the computer program, when executed by a processor, implements the method of any one of claims 1 to 7.
CN202211295593.XA 2022-10-21 2022-10-21 Data pushing method and system for message queue, electronic device and medium Pending CN115665075A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211295593.XA CN115665075A (en) 2022-10-21 2022-10-21 Data pushing method and system for message queue, electronic device and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211295593.XA CN115665075A (en) 2022-10-21 2022-10-21 Data pushing method and system for message queue, electronic device and medium

Publications (1)

Publication Number Publication Date
CN115665075A true CN115665075A (en) 2023-01-31

Family

ID=84990222

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211295593.XA Pending CN115665075A (en) 2022-10-21 2022-10-21 Data pushing method and system for message queue, electronic device and medium

Country Status (1)

Country Link
CN (1) CN115665075A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109698799A (en) * 2019-01-14 2019-04-30 广州荔支网络技术有限公司 A kind of information push method, device and mobile terminal
CN110875935A (en) * 2018-08-30 2020-03-10 阿里巴巴集团控股有限公司 Message publishing, processing and subscribing method, device and system
CN111464598A (en) * 2020-03-19 2020-07-28 中国人民财产保险股份有限公司 Data pushing method and device
CN111917863A (en) * 2020-07-28 2020-11-10 中国平安财产保险股份有限公司 Message pushing method and device, television equipment and computer storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110875935A (en) * 2018-08-30 2020-03-10 阿里巴巴集团控股有限公司 Message publishing, processing and subscribing method, device and system
CN109698799A (en) * 2019-01-14 2019-04-30 广州荔支网络技术有限公司 A kind of information push method, device and mobile terminal
CN111464598A (en) * 2020-03-19 2020-07-28 中国人民财产保险股份有限公司 Data pushing method and device
CN111917863A (en) * 2020-07-28 2020-11-10 中国平安财产保险股份有限公司 Message pushing method and device, television equipment and computer storage medium

Similar Documents

Publication Publication Date Title
CN109032796B (en) Data processing method and device
CN112150141A (en) Block chain consensus method, device and system
CN106354795B (en) A kind of Distributed data exchange system
CN109154968B (en) System and method for secure and efficient communication within an organization
CN105320613A (en) Systems and methods for dynamic data storage
US10528708B2 (en) Prevention of unauthorized resource updates
CN111880948A (en) Data refreshing method and device, electronic equipment and computer readable storage medium
CN112329049A (en) Business data management method, device, electronic equipment and medium
CN108777685A (en) Method and apparatus for handling information
CN112784823A (en) Face image recognition method, face image recognition device, computing equipment and medium
CN102411511A (en) Data migration for service upgrades
CN114489954A (en) Tenant creation method based on virtualization platform, tenant access method and equipment
CN112486825B (en) Multi-lane environment architecture system, message consumption method, device, equipment and medium
CN112217639B (en) Data encryption sharing method and device, electronic equipment and computer storage medium
CN107277108B (en) Method, device and system for processing messages at nodes of block chain
CN115567596B (en) Cloud service resource deployment method, device, equipment and storage medium
CN115665075A (en) Data pushing method and system for message queue, electronic device and medium
CN116244751A (en) Data desensitization method, device, electronic equipment, storage medium and program product
CN114095200B (en) Resource access authority management method and device, electronic equipment and medium
CN110545296A (en) Log data acquisition method, device and equipment
CN113485731A (en) Intelligent contract upgrading method and system for block chain
CN111030930B (en) Decentralized network data fragment transmission method, device, equipment and medium
CN114449040A (en) Configuration issuing method and device based on cloud platform
CN107404538B (en) Cloud data transmission method and server thereof
CN111262776B (en) Method, device, electronic equipment and computer readable medium for sending notification message

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