Data push method, system, electronic device and medium for message queue
By introducing data consumption logic into the message queue, establishing data push services and performing data orchestration, the data push sequence and stability problems in the message queue are solved, and the stability and data security of business execution are improved.
Patent Information
- Application Number
- CN202211295593.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-21
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2042-10-21
AI Technical Summary
In the message queue, due to the lack of data consumption logic, business correlation problems between projects are caused, resulting in poor stability of business execution and the integrity and order of data push cannot be guaranteed.
By obtaining multiple data push information, establishing a data push service corresponding to the message queue address, data orchestration and sorting are carried out according to the data topic and number, ensuring the correct push and consumption order of data, realizing asynchronous push, and retrying and Encryption processing.
It improves the stability of business execution, avoids the inability to close the project business or the lack of business integrity, and ensures the correctness and security of data push.
Smart Images

Figure CN115665075B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data push technology, and in particular to a data push method, system, electronic device and medium for a message queue. Background Art
[0002] Currently, there is information interaction between projects. In order not to affect the user's main process during the information interaction, the information interaction is usually pushed asynchronously through MQ (Message Queue) message docking.
[0003] However, in actual business scenarios, different MQ messages may have business associations. For example, the product module and the workbench are two independent projects, but they belong to the same system in terms of business division. When creating applications and menus, the product module will send the creation data to the workbench through MQ messages. However, due to the lack of data consumption logic, if the creation data of the menu is consumed before the creation data of the application, the business of the product module will not be closed, resulting in a lack of business integrity and poor stability of business execution. Summary of the invention
[0004] In order to provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. The summary is not an extensive review, nor is it intended to identify key / critical components or delineate the scope of protection of these embodiments, but rather serves as a prelude to the detailed description that follows.
[0005] In view of the above-mentioned shortcomings of the prior art, the present invention discloses a data push method, system, electronic device and medium for a message queue, so as to weave data consumption logic into the message queue and improve the stability of business execution.
[0006] The present invention discloses a data push method for a message queue, comprising: obtaining multiple data push information, wherein the data push information includes a message queue address, a data subject and a data number; establishing data push services corresponding to each of the message queue addresses according to the data subjects, and receiving subject data pushed by the data push service, wherein the data push service is used to push subject data corresponding to the data subject in the message queue address; obtaining a preset push address corresponding to each of the subject data according to the data number corresponding to the subject data, and arranging the received subject data according to the order of the data numbers to obtain a subject data sequence; and pushing the subject data in the subject data sequence to the corresponding preset push addresses in sequence.
[0007] Optionally, the data push service pushes the subject data corresponding to the data subject in the message queue address in the following manner: monitoring the message queue corresponding to the message queue address; if the subject data corresponding to the data subject exists in the message queue, extracting the subject data from the message queue; and pushing the subject data.
[0008] Optionally, the subject data in the subject data sequence are pushed to the corresponding preset push addresses in sequence, including: obtaining the preset push method corresponding to each subject data according to the data number corresponding to the subject data; encapsulating the subject data in the subject data sequence according to the corresponding preset push method to obtain a data receiving request; and pushing the data receiving request corresponding to each subject data to the corresponding preset push address in sequence.
[0009] Optionally, after receiving the subject data pushed by the data push service, the method also includes: storing the subject data in a preset database; after pushing the subject data in the subject data sequence to the corresponding preset push addresses in sequence, receiving push result information fed back by each of the preset push addresses; if the push result information of the subject data includes a successful push, deleting the subject data from the preset database; if the push result information of the subject data includes a push failure, obtaining a retry strategy corresponding to the subject data according to the data number corresponding to the subject data, and storing the subject data in a preset failure retry pool, wherein the failure retry pool is used to re-push the subject data in the failure retry pool to the corresponding preset push address according to the retry strategy.
[0010] Optionally, obtaining multiple data push information includes: obtaining an encryption key and a client, wherein the client is provided with an encryption key, and the client is used to receive multiple 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 a key verification on the access token according to the encryption key, and generating a key verification result; if the key verification result includes a verification success, receiving each of the data push information sent by the client; if the key verification result includes a verification failure, sending a verification failure message to the client.
[0011] Optionally, the method also includes at least one of the following: before pushing the subject data in the subject data sequence to the corresponding preset push address in sequence, obtaining a data encryption rule and encrypting each subject data according to the data encryption rule; after obtaining the preset push address corresponding to each subject data according to the data number corresponding to the subject data, before pushing the subject data in the subject data sequence to the corresponding preset push address in sequence, obtaining an address whitelist, matching each preset push address according to the address whitelist to obtain an illegal push address, and deleting the illegal push address, wherein the address whitelist includes at least one legal push address, and the illegal push address includes a preset push address different from the legal push address.
[0012] Optionally, after the received subject data is arranged in the order of the data numbers to obtain a subject data sequence, the subject data in the subject data sequence are pushed in sequence to the corresponding preset push address. The method also includes: determining the subject 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 of the subject data to obtain the number of subsequent data, and adding the number of subsequent data corresponding to the subject data to the subject data; after the subject data in the subject data sequence are pushed in sequence to the corresponding preset push address, the preset push address makes subsequent reminders according to the number of subsequent data received.
[0013] The present invention discloses a data push system for a message queue, comprising: an acquisition module, used for acquiring multiple data push information, wherein the data push information includes a message queue address, a data subject and a data number; an establishment module, used for establishing data push services corresponding to each of the message queue addresses according to the data subject, and receiving the subject data pushed by the data push service, wherein the data push service is used to push the subject data corresponding to the data subject in the message queue address; an arrangement module, used for matching the preset push address corresponding to each of the subject data according to the data number corresponding to the subject data, and arranging the received subject data according to the order of the data numbers to obtain a subject data sequence; and a push module, used for pushing the subject data in the subject data sequence to the corresponding preset push address in sequence.
[0014] The present invention discloses an electronic device, comprising: a processor and a memory; the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the electronic device executes the above method.
[0015] The present invention discloses a computer-readable storage medium, on which a computer program is stored: when the computer program is executed by a processor, the above method is implemented.
[0016] Beneficial effects of the present invention:
[0017] Through the data topic, a data push service corresponding to the message queue address is established to push the subject data corresponding to the data topic through the data push service, and then the preset push address is obtained according to the data number, and the obtained subject data is sorted, so that the subject data is pushed to the corresponding preset push address in sequence according to the obtained subject data sequence. In this way, the subject data is pushed specifically through the data push module, and the correct push and consumption order of the data is ensured through the data number, realizing the asynchronous push of the data in the message queue, avoiding the inability to close the project business or the loss of business integrity, thereby improving the stability of business execution.
[0018] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present application, and together with the specification, are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0020] Figure 1 It is a flow chart of a message queue pushing method in an embodiment of the present invention;
[0021] Figure 2 It is a flowchart of another message queue push method in an embodiment of the present invention
[0022] Figure 3 It is a flowchart of another message queue pushing method in an embodiment of the present invention;
[0023] Figure 4 It is a structural diagram of a message queue push system in an embodiment of the present invention;
[0024] Figure 5 It is a schematic diagram of the structure of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION
[0025] The following describes the embodiments of the present invention through specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and sub-samples in the embodiments can be combined with each other without conflict.
[0026] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and thus the drawings only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.
[0027] In the following description, numerous details are discussed to provide a more thorough explanation of the embodiments of the present invention. However, it is obvious to those skilled in the art that the embodiments of the present invention can be implemented without these specific details. In other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present invention difficult to understand.
[0028] The terms "first", "second", etc. in the specification and claims of the embodiments of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchanged where appropriate, so that the embodiments of the embodiments of the present disclosure described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions.
[0029] Unless otherwise stated, the term "plurality" means two or more.
[0030] 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 indicates: A or B.
[0031] The term "and / or" is a description of the association relationship between objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or, A and B.
[0032] Combination Figure 1 As shown, the embodiment of the present disclosure provides a data push method for a message queue, including:
[0033] Step S101, obtaining multiple data push information;
[0034] The data push information includes the message queue address, data subject and data number;
[0035] Step S102, establishing data push services corresponding to each message queue address according to the data subject, and receiving subject data pushed by the data push service;
[0036] Among them, the data push service is used to push the subject data corresponding to the data subject in the message queue address;
[0037] Step S103, obtaining a preset push address corresponding to each theme data according to the data number corresponding to the theme data, and arranging the received theme data according to the order of the data numbers to obtain a theme data sequence;
[0038] Step S104, pushing the subject data in the subject data sequence to the corresponding preset push address in sequence.
[0039] The data push method for message queue provided by the embodiment of the present disclosure is adopted, and a data push service corresponding to the message queue address is established through the data subject, so as to push the subject data corresponding to the data subject through the data push service, and then obtain the preset push address according to the data number, and sort the obtained subject data, so as to push the subject data to the corresponding preset push address in sequence according to the obtained subject data sequence. In this way, the subject data is specially pushed through the data push module, and the correct push and consumption order of the data is ensured through the data number, so as to realize the asynchronous push of the data in the message queue, avoid the project business from being unable to be closed or the business integrity is lost, thereby improving the stability of business execution.
[0040] Optionally, obtaining multiple data push information includes: obtaining an encryption key and a client, wherein the client is provided with an encryption key, and the client is used to receive multiple 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 a key verification on the access token according to the encryption key, and generating a key verification result; if the key verification result includes a verification success, receiving each data push information sent by the client; if the key verification result includes a verification failure, sending a verification failure message to the client.
[0041] In some embodiments, the data push information also includes a preset push address corresponding to the data number.
[0042] In some embodiments, before using the data push service, the data push information needs to be key-verified using a secret key.
[0043] Optionally, the data push service pushes the subject data corresponding to the data subject in the message queue address in the following manner: monitoring the message queue corresponding to the message queue address; if the subject data corresponding to the data subject exists in the message queue, extracting the subject data from the message queue; and pushing the subject data.
[0044] In some embodiments, a database (eg, MySQL) is used as a data storage solution to periodically back up subject data to avoid data loss.
[0045] In some embodiments, a configured data push service is loaded when a project starts; the message queue address is monitored based on the topic configuration by configuring the data push service, and the monitored data is stored in a database; wherein each data push service has a unique data number (KEY), and each data number is used to represent a type of business data.
[0046] Optionally, the subject data in the subject data sequence are pushed to the corresponding preset push addresses in sequence, including: obtaining the preset push method corresponding to each subject data according to the data number corresponding to the subject data; encapsulating the subject data in the subject data sequence according to the corresponding preset push method to obtain a data receiving request; and pushing the data receiving request corresponding to each subject data to the corresponding preset push address in sequence.
[0047] In some embodiments, business data A, B, and C need to be pushed in sequence, and the key consumption order of the three business data is sorted to ensure the order of the data from the push logic.
[0048] In some embodiments, the preset push method includes HTTP (Hyper Text Transfer Protocol) protocol or MQ message, wherein the HTTP protocol needs to be configured with the corresponding data number, HTTP push address, data push time, push retry number and associated person communication method, etc., and the MQ message requires the corresponding data number, MQ address, data topic, data push time and push retry number, etc.
[0049] In some embodiments, the subject data to be pushed is scanned and packaged, wherein different requests are assembled according to the type configuration of each message type.
[0050] Optionally, after receiving the subject data pushed by the data push service, the method also includes: storing the subject data in a preset database; after pushing the subject data in the subject data sequence to the corresponding preset push addresses in sequence, receiving push result information fed back by each preset push address; if the push result information of the subject data includes a successful push, deleting the subject data from the preset database; if the push result information of the subject data includes a push failure, obtaining a retry strategy corresponding to the subject data according to the data number corresponding to the subject data, and storing the subject data in a preset failure retry pool, wherein the failure retry pool is used to re-push the subject data in the failure retry pool to the corresponding preset push address according to the retry strategy.
[0051] In some embodiments, the push data obtains the return information, modifies the status if successful, and adopts the retry strategy if failed to ensure complete success.
[0052] Optionally, the method also includes at least one of the following: before pushing the subject data in the subject data sequence to the corresponding preset push address in sequence, obtaining the data encryption rule and encrypting each subject data according to the data encryption rule; after obtaining the preset push address corresponding to each subject data according to the data number corresponding to the subject data, before pushing the subject data in the subject data sequence to the corresponding preset push address in sequence, obtaining the address whitelist, matching each preset push address according to the address whitelist to obtain an illegal push address, and deleting the illegal push address, wherein the address whitelist includes at least one legal push address, and the illegal push address includes a preset push address different from the legal push address.
[0053] In some embodiments, a data transmission encryption algorithm is provided to encrypt data according to encryption and decryption rules fixed by the platform.
[0054] In some embodiments, an IP whitelist is configured, and a whitelist needs to be configured in both the data push service and the preset push address for interception processing.
[0055] In some embodiments, cluster deployment is used to provide high availability of services and prevent business congestion.
[0056] In some embodiments, dynamic capacity expansion is used to ensure availability when the amount of data is large.
[0057] In this way, key verification is performed before obtaining data push information, data encryption is performed during data transmission, and a whitelist is added during data push, thereby improving the security of data push.
[0058] Optionally, after the received subject data is arranged in order of data numbers and a subject data sequence is obtained, the subject data in the subject data sequence are pushed in sequence to the corresponding preset push address. The method also includes: determining the subject 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 subject data to obtain the number of subsequent data, and adding the number of subsequent data corresponding to the subject data to the subject data; after the subject data in the subject data sequence is pushed in sequence to the corresponding preset push address, the preset push address makes subsequent reminders according to the number of subsequent data received.
[0059] In some embodiments, the subsequent reminder is used to remind the manager corresponding to the pushed data to receive the reminder, and is also used to manage the thread when the memory usage is large to provide memory space for subsequent data.
[0060] In this way, by making subsequent reminders to the preset push address, the preset push address can perform administrator reminders, memory thread management, etc. according to the subsequent reminders, thereby improving the flexibility of data use and improving user experience.
[0061] Combination Figure 2 As shown, the embodiment of the present disclosure provides a data push method for a message queue, including:
[0062] Step S201, receiving multiple data push information;
[0063] The data push information includes the message queue address, data subject and data number;
[0064] Step S202, establishing data push services corresponding to each message queue address according to the data subject;
[0065] Step S203, receiving the subject data pushed by the data push service;
[0066] Step S204, determine whether data push arrangement is required, if yes, jump to step S205, if no, jump to step S206;
[0067] Step S205, arranging the received subject data according to the order of the data numbers to obtain a subject data sequence, and then jumping to step S206;
[0068] Step S206, obtaining a preset push address corresponding to each theme data according to the data number corresponding to the theme data;
[0069] Step S207, pushing the subject data in the subject data sequence to the corresponding preset push address in sequence;
[0070] Step S208, determine whether the theme data is pushed successfully, if yes, jump to step S209, if no, jump to step S207;
[0071] Step S209, end.
[0072] The data push method for message queue provided by the embodiment of the present disclosure is adopted, and a data push service corresponding to the message queue address is established through the data subject, so as to push the subject data corresponding to the data subject through the data push service, and then obtain the preset push address according to the data number, and sort the obtained subject data, so as to push the subject data to the corresponding preset push address in sequence according to the obtained subject data sequence. In this way, the subject data is specially pushed through the data push module, and the correct push and consumption order of the data is ensured through the data number, so as to realize the asynchronous push of the data in the message queue, avoid the project business from being unable to be closed or the business integrity is lost, thereby improving the stability of business execution.
[0073] Combination Figure 3 As shown, the embodiment of the present disclosure provides a data push method for a message queue, including:
[0074] Step S301, the distribution service obtains multiple data push information;
[0075] The data push information includes the message queue address, data subject and data number;
[0076] Step S302, the distribution service establishes a data push service to the message queue;
[0077] Step S303, the message queue sends the subject data corresponding to the data subject to the server through the data push service;
[0078] Step S304, the distribution service arranges the received subject data according to the order of the data numbers to obtain a subject data sequence;
[0079] Step S305, the distribution service obtains the preset push address corresponding to each subject data according to the data number corresponding to the subject data;
[0080] Step S306: the distribution service pushes the subject data in the subject data sequence to the corresponding preset push addresses in sequence.
[0081] The data push method for a message queue provided by the embodiment of the present disclosure is adopted to establish a data push service corresponding to the message queue address through a data topic, so as to push the subject data corresponding to the data topic through the data push service, and then obtain the preset push address according to the data number, and sort the obtained subject data, so as to push the subject data to the corresponding preset push address in sequence according to the obtained subject data sequence, which has the following advantages:
[0082] First, the data push module is used to push subject data, and the correct order of data push and consumption is ensured through data numbering, which realizes asynchronous push of data in the message queue, avoids the inability to close project business or loss of business integrity, and thus improves the stability of business execution;
[0083] Second, key verification is performed before obtaining data push information, data encryption is performed during data transmission, and a whitelist is added during data push, which improves the security of data push;
[0084] Third, by making subsequent reminders to the preset push address, the preset push address can be reminded by the administrator, memory thread management, etc. according to the subsequent reminders, thereby improving the flexibility of data use and improving the user experience.
[0085] Combination Figure 4 As shown, the embodiment of the present disclosure provides a data push system for a message queue, including: an acquisition module 401 for acquiring multiple data push information, wherein the data push information includes a message queue address, a data subject and a data number; an establishment module 402 for establishing data push services corresponding to each message queue address according to the data subject, and receiving the subject data pushed by the data push service, wherein the data push service is used to push the subject data corresponding to the data subject in the message queue address; an arrangement module 403 for obtaining a preset push address corresponding to each subject data according to the data number corresponding to the subject data, and performing data arrangement on the received subject data according to the order of the data numbers to obtain a subject data sequence; a push module 404 for pushing the subject data in the subject data sequence to the corresponding preset push address in sequence.
[0086] The data push system for message queue provided by the embodiment of the present disclosure is adopted, and a data push service corresponding to the message queue address is established through the data subject, so as to push the subject data corresponding to the data subject through the data push service, and then obtain the preset push address according to the data number, and sort the obtained subject data, so as to push the subject data to the corresponding preset push address in sequence according to the obtained subject data sequence. In this way, the subject data is specially pushed through the data push module, and the correct push and consumption order of the data is ensured through the data number, so as to realize the asynchronous push of the data in the message queue, avoid the project business from being unable to be closed or the business integrity is lost, thereby improving the stability of business execution.
[0087] Figure 5 The structure diagram of the computer system suitable for implementing the electronic device of the embodiment of the present application is shown. It should be noted that: Figure 5The computer system 500 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0088] like Figure 5 As shown, the computer system 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 502 or the program loaded from the storage part 508 to the random access memory (RAM) 503, such as executing the method in the above embodiment. In RAM503, various programs and data required for system operation are also stored. CPU501, ROM502 and RAM503 are connected to each other through a bus 504. Input / output (I / O) interface 505 is also connected to bus 504.
[0089] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed so that a computer program read therefrom is installed into the storage section 508 as needed.
[0090] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication section 509, and / or installed from a removable medium 511. When the computer program is executed by a central processing unit (CPU) 501, various functions defined in the system of the present application are executed.
[0091] It should be noted that the computer-readable medium shown in the embodiment of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a computer-readable computer program is carried. This propagated data signal can take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. A computer program contained on a computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0092] The embodiments of the present disclosure further provide a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, any one of the methods in the embodiments is implemented.
[0093] The computer-readable storage medium in the embodiments of the present disclosure can be understood by ordinary technicians in the field: all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to the computer program. The aforementioned computer program can be stored in a computer-readable storage medium. When the program is executed, the execution includes the steps of the above-mentioned method embodiments; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other media that can store program codes.
[0094] The electronic device disclosed in this embodiment includes a processor, a memory, a transceiver and a communication interface. The memory and the communication interface are connected to the processor and the transceiver and complete communication with each other. The memory is used to store computer programs, the communication interface is used to communicate, and the processor and the transceiver are used to run the computer program so that the electronic device executes each step of the above method.
[0095] 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.
[0096] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a graphics processing unit (GPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0097] The above description and accompanying drawings fully illustrate the embodiments of the present disclosure so that those skilled in the art can practice them. Other embodiments may include structural, logical, electrical, process and other changes. The embodiments represent possible changes only. Unless explicitly required, separate components and functions are optional, and the order of operation may vary. Parts and subsamples of some embodiments may be included in or replace parts and subsamples of other embodiments. Moreover, the words used in this application are only used to describe the embodiments and are not used to limit the claims. As used in the description of the embodiments and claims, unless the context clearly indicates, the singular forms of "a", "an" and "the" are intended to include plural forms as well. Similarly, the term "and / or" as used in this application refers to any and all possible combinations of listings containing one or more associated ones. In addition, when used in the present application, the term "comprise" and its variants "comprises" and / or comprising refer to the presence of a stated sub-sample, whole, step, operation, element, and / or component, but do not exclude the presence or addition of one or more other sub-samples, wholes, steps, operations, elements, components and / or groups of these. In the absence of further restrictions, the elements defined by the sentence "comprising a ..." do not exclude the presence of other identical elements in the process, method or device comprising the elements. In this article, each embodiment may focus on the differences from other embodiments, and the same and similar parts between the various embodiments may refer to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method part disclosed in the embodiments, then the relevant parts can refer to the description of the method part.
[0098] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software may depend on the specific application and design constraints of the technical solution. Technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of the present disclosure. Technicians can clearly understand that for the convenience and simplicity of description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0099] In the embodiments disclosed herein, the disclosed methods and products (including but not limited to devices, equipment, etc.) can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units can be only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some sub-samples can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to implement this embodiment. In addition, each functional unit in the embodiment of the present disclosure may be integrated in a processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit.
[0100] The flowchart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to the embodiment of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. In the description corresponding to the flowchart and the block diagram in the accompanying drawings, the operations or steps corresponding to different boxes can also occur in a different order from the order disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. Each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified functions or actions, or may be implemented by a combination of dedicated hardware and computer instructions.
Claims
1. A data push method for a message queue, characterized in that: include: Acquire multiple data push information, wherein the data push information includes a message queue address, a data subject, and a data number; Establishing data push services corresponding to each of the message queue addresses according to the data topics, and receiving the topic data pushed by the data push services, wherein the data push services are used to push the topic data corresponding to the data topics in the message queue addresses; According to the data numbers corresponding to the subject data, the preset push addresses corresponding to the subject data are obtained, and the received subject data are arranged according to the order of the data numbers to obtain a subject data sequence; Pushing the subject data in the subject data sequence to the corresponding preset push addresses in sequence; The received subject data is arranged in the order of the data numbers to obtain a subject data sequence, and before the subject data in the subject data sequence is pushed in sequence to the corresponding preset push address, the method also includes: determining the subject 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 of the subject data to obtain the number of subsequent data, and adding the number of subsequent data corresponding to the subject data to the subject data; after the subject data in the subject data sequence is pushed in sequence to the corresponding preset push address, the preset push address makes a subsequent reminder according to the number of subsequent data received.
2. The method according to claim 1, characterized in that The data push service pushes the subject data corresponding to the data subject in the message queue address in the following manner: Monitoring the message queue corresponding to the message queue address; If the message queue contains subject data corresponding to the data subject, extracting the subject data from the message queue; Push the subject data.
3. The method according to claim 1, characterized in that The subject data in the subject data sequence are pushed to the corresponding preset push addresses in sequence, including: According to the data numbers corresponding to the subject data, the preset push modes corresponding to the subject data are obtained; Encapsulating the subject data in the subject data sequence according to the corresponding preset push mode to obtain a data receiving request; The data receiving requests corresponding to the subject data are pushed to the corresponding preset push addresses in sequence.
4. The method according to claim 1, characterized in that: After receiving the subject data pushed by the data push service, the method further includes: Storing the subject data in a preset database; After pushing the subject data in the subject data sequence to the corresponding preset push addresses in sequence, receiving push result information fed back by each of the preset push addresses; If the push result information of the subject data includes push success, deleting the subject data from the preset database; If the push result information of the subject data includes push failure, the retry strategy corresponding to the subject data is obtained according to the data number corresponding to the subject data, and the subject data is stored in a preset failure retry pool, wherein the failure retry pool is used to re-push the subject data in the failure retry pool to the corresponding preset push address according to the retry strategy.
5. The method according to claim 1, characterized in that Get multiple data push information, including: Acquire an encryption key and a client, wherein the client is provided with the encryption key, and the client is used to receive 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 includes successful verification, receiving each of the data push information sent by the client; If the key verification result includes verification failure, verification failure information is sent to the client.
6. The method according to claim 1, characterized in that The method further comprises at least one of the following: Before pushing the subject data in the subject data sequence to the corresponding preset push addresses in sequence, obtaining a data encryption rule, and encrypting each subject data according to the data encryption rule; After obtaining the preset push addresses corresponding to each of the subject data according to the data numbers corresponding to the subject data, before pushing the subject data in the subject data sequence to the corresponding preset push addresses in sequence, obtain an address whitelist, and match each of the preset push addresses according to the address whitelist to obtain illegal push addresses, and delete the illegal push addresses, wherein the address whitelist includes at least one legal push address, and the illegal push addresses include preset push addresses different from the legal push addresses.
7. A data push system for a message queue, characterized in that: include: An acquisition module, used to acquire multiple data push information, wherein the data push information includes a message queue address, a data subject and a data number; An establishment module, used to establish data push services corresponding to each of the message queue addresses according to the data topics, and receive the topic data pushed by the data push service, wherein the data push service is used to push the topic data corresponding to the data topic in the message queue address; An arrangement module, used to obtain a preset push address corresponding to each of the subject data according to the data numbers corresponding to the subject data, and to arrange the received subject data according to the order of the data numbers to obtain a subject data sequence; A push module, used to push the subject data in the subject data sequence to the corresponding preset push address in sequence; The received subject data are arranged in the order of the data numbers to obtain a subject data sequence, and before the subject data in the subject data sequence are pushed in sequence to the corresponding preset push address, the push module is also used to determine the subject data corresponding to the same preset push address as the same group of data; count the number of the same group of data that exist after each of the subject data to obtain the number of subsequent data, and add the number of subsequent data corresponding to the subject data to the subject data; after the subject data in the subject data sequence are pushed in sequence to the corresponding preset push address, the preset push address makes subsequent reminders according to the number of subsequent data received.
8. An electronic device, characterized in that: include: Processor and memory; The memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the electronic device executes the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
