CN116662034A - Message queue processing method, device, computer equipment and storage medium - Google Patents

Message queue processing method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN116662034A
CN116662034A CN202310716608.3A CN202310716608A CN116662034A CN 116662034 A CN116662034 A CN 116662034A CN 202310716608 A CN202310716608 A CN 202310716608A CN 116662034 A CN116662034 A CN 116662034A
Authority
CN
China
Prior art keywords
message queue
producer
target
information
cluster
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
CN202310716608.3A
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN202310716608.3A priority Critical patent/CN116662034A/en
Publication of CN116662034A publication Critical patent/CN116662034A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The application relates to a data processing technology, and provides a message queue processing method, a device, a computer device and a storage medium, wherein the method comprises the following steps: acquiring a message queue configuration parameter set; analyzing each message queue configuration parameter in the message queue configuration parameter set to obtain producer information, consumer information and message queue information; constructing a message queue integration center according to producer information, consumer information and message queue information; when receiving the service demand, matching a target producer cluster, a target message queue and a target consumer cluster corresponding to the service demand from the message queue integration center; and calling the target producer cluster to receive the service requirement, outputting the service requirement to a target message queue by the target producer cluster, and outputting the service requirement to the target consumer cluster by the target message queue to realize service processing. The application can improve the accuracy of message queue processing and promote the rapid development of smart cities.

Description

Message queue processing method, device, computer equipment and storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a method and apparatus for processing a message queue, a computer device, and a storage medium.
Background
In the development process of the distributed application, a message queue is often used, and the performance can be asynchronously improved, the coupling degree is reduced, and the flow peak clipping is realized through the message queue.
In carrying out the present application, the applicant has found that the prior art has the following problems: different application functions may use different message queue servers to construct their own topics, producers, and consumers according to business needs. Taking the medical field application scenario as an example, the application functions may include a disease auxiliary diagnosis function, a health management function, and a remote consultation function. Typically different application functions are performed by different developers, each configuring a producer cluster, consumer cluster for its own responsible functions. Because of the different familiarity of different developers with message queues, functional errors may be caused by configuration problems. Thus, the accuracy of message queue processing is poor.
Therefore, it is necessary to provide a message queue processing method capable of improving accuracy of message queue processing.
Disclosure of Invention
In view of the foregoing, there is a need for a message queue processing method, a message queue processing apparatus, a computer device, and a storage medium that can improve the accuracy of message queue processing.
An embodiment of the present application provides a method for processing a message queue, where the method for processing a message queue includes:
acquiring a message queue configuration parameter set;
analyzing each message queue configuration parameter in the message queue configuration parameter set to obtain producer information, consumer information and message queue information;
constructing a message queue integration center according to the producer information, the consumer information and the message queue information;
when a business requirement is received, matching a target producer cluster, a target message queue and a target consumer cluster corresponding to the business requirement from the message queue integration center;
and calling the target producer cluster to receive the service requirement, outputting the service requirement to the target message queue by the target producer cluster, and outputting the service requirement to the target consumer cluster by the target message queue to realize service processing.
Further, in the above method for processing a message queue provided by the embodiment of the present application, the obtaining a message queue configuration parameter set includes:
acquiring a preset service configuration file;
analyzing the service configuration file to obtain a plurality of target message subscription information;
Acquiring a preset message queue configuration parameter template;
filling each target message subscription information into the message queue configuration parameter template to obtain message queue configuration parameters;
and combining the message queue configuration parameters to obtain a message queue configuration parameter set.
Further, in the above method for processing a message queue provided by the embodiment of the present application, the parsing each message queue configuration parameter in the message queue configuration parameter set to obtain producer information, consumer information and message queue information includes:
acquiring preset producer keywords, preset consumer keywords and preset message queue keywords in each message queue configuration parameter;
acquiring a first preset data format of preset producer keywords and producer information, a second preset data format of preset consumer keywords and consumer information and a third preset data format of preset message queue keywords and message queue information;
and determining producer information, consumer information and message queue information according to the first preset data format, the second preset data format and the third preset data format respectively.
Further, in the above method for processing a message queue provided by the embodiment of the present application, the constructing a message queue integration center according to the producer information, the consumer information, and the message queue information includes:
clustering the producer information to obtain a plurality of producer clusters;
combining the plurality of producer clusters to obtain a producer integration center;
clustering the consumer information to obtain a plurality of consumer clusters;
combining the plurality of consumer clusters to obtain a consumer integration center;
analyzing the information of the message queues to obtain a plurality of message queues;
combining the message queues to obtain a message queue group;
and combining the producer integrated center, the consumer integrated center and the message queue group to obtain a message queue integrated center.
Further, in the above method for processing a message queue provided by the embodiment of the present application, the matching, from the message queue integration center, a target producer cluster, a target message queue, and a target consumer cluster corresponding to the service requirement includes:
acquiring a service code corresponding to the service requirement;
acquiring a producer code set corresponding to the producer integrated center in the message queue integrated center;
Selecting a target producer code which is the same as the business code from the producer code set, and determining a producer cluster corresponding to the target producer code as a target producer cluster;
and acquiring a target message queue corresponding to the target producer cluster and a target consumer cluster.
Further, in the above method for processing a message queue provided by the embodiment of the present application, the obtaining the target message queue corresponding to the target producer cluster and the target consumer cluster includes:
acquiring a preset first mapping relation between the target producer cluster and a message queue and a preset second mapping relation between the target producer cluster and a consumer cluster;
traversing the first mapping relation to obtain a target message queue;
and traversing the second mapping relation to obtain a target consumer cluster.
Further, in the above method for processing a message queue provided by the embodiment of the present application, the obtaining, in the message queue integration center, a producer code set corresponding to the producer integration center includes:
acquiring a preset coding keyword corresponding to each producer cluster in the producer integrated center;
Acquiring producer codes corresponding to the preset code keywords;
and combining the producer codes corresponding to each producer cluster to obtain a producer code set.
The second aspect of the embodiment of the present application further provides a message queue processing device, where the message queue processing device includes:
the parameter acquisition module is used for acquiring a message queue configuration parameter set;
the parameter analysis module is used for analyzing each message queue configuration parameter in the message queue configuration parameter set to obtain producer information, consumer information and message queue information;
the center construction module is used for constructing a message queue integration center according to the producer information, the consumer information and the message queue information;
the cluster matching module is used for matching a target producer cluster, a target message queue and a target consumer cluster corresponding to the service requirement from the message queue integration center when the service requirement is received;
and the business processing module is used for calling the target producer cluster to receive the business requirement, outputting the business requirement to the target message queue by the target producer cluster, and outputting the business requirement to the target consumer cluster by the target message queue to realize business processing.
A third aspect of an embodiment of the present application further provides a computer device, the computer device including a processor configured to implement a message queue processing method according to any one of the preceding claims when executing a computer program stored in a memory.
A fourth aspect of an embodiment of the present application further provides a computer readable storage medium, where a computer program is stored, where the computer program when executed by a processor implements a message queue processing method according to any one of the above.
The message queue processing method, the message queue processing device, the computer equipment and the computer readable storage medium provided by the embodiment of the application obtain producer information, consumer information and message queue information by analyzing each message queue configuration parameter in the message queue configuration parameter set; and constructing a message queue integration center according to the producer information, the consumer information and the message queue information, and then matching a target producer cluster, a target message queue and a target consumer cluster corresponding to the service requirement in the message queue integration center to finish service processing. The intelligent city intelligent management system can be applied to various functional modules of intelligent cities such as intelligent government affairs, intelligent transportation, intelligent medical treatment and the like, such as an intelligent medical treatment message queue processing module and the like, and can promote the rapid development of the intelligent cities.
Drawings
Fig. 1 is a flowchart of a message queue processing method according to an embodiment of the present application.
Fig. 2 is a flowchart of acquiring a message queue configuration parameter set provided in the present embodiment.
Fig. 3 is a flow chart illustrating the parsing of message queue configuration parameters according to an embodiment of the present application.
Fig. 4 is a flow chart of the construction of a message queue integration center according to an embodiment of the application.
Fig. 5 is a schematic diagram of a message queue integration center according to an embodiment of the application.
FIG. 6 is a flow chart of matching clusters provided by an embodiment of the present application.
Fig. 7 is a block diagram of a message queue processing apparatus according to an embodiment of the present application.
Fig. 8 is a schematic structural diagram of a computer device according to an embodiment of the present application.
The application will be further described in the following detailed description in conjunction with the above-described figures.
Detailed Description
In order that the above-recited objects, features and advantages of the present application will be more clearly understood, a more particular description of the application will be rendered by reference to specific embodiments thereof which are illustrated in the appended drawings. It should be noted that, without conflict, the embodiments of the present application and features in the embodiments may be combined with each other.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application, the described embodiments are examples of some, but not all, embodiments of the application.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein in the description of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application.
The embodiment of the application can acquire and process the related data based on the artificial intelligence technology. Among these, artificial intelligence (Artificial Intelligence, AI) is the theory, method, technique and application system that uses a digital computer or a digital computer-controlled machine to simulate, extend and extend human intelligence, sense the environment, acquire knowledge and use knowledge to obtain optimal results.
Artificial intelligence infrastructure technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a robot technology, a biological recognition technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and other directions.
The message queue processing method provided by the embodiment of the application is executed by the computer equipment, and correspondingly, the message queue processing device is operated in the computer equipment. Fig. 1 is a flowchart of a message queue processing method according to an embodiment of the present application. As shown in fig. 1, the message queue processing method may include the following steps, and the order of the steps in the flowchart may be changed according to different requirements, and some may be omitted.
S11, obtaining a message queue configuration parameter set.
In at least one embodiment of the present application, the message queue configuration parameter set includes a plurality of message queue configuration parameters, and illustratively, the message queue configuration parameter set includes a B message queue configuration parameter, a C message queue configuration parameter, and a D message queue configuration parameter. The number of message queue configuration parameters in the message queue configuration parameter set may be set according to actual requirements, and is not limited herein. The message queue configuration parameters can be preset by system personnel or can be obtained by performing related processing according to a message queue configuration parameter template. The message queue configuration parameters comprise producer information, consumer information and message queue information, wherein the producer information and the consumer information are provided with corresponding cluster codes, and the cluster codes are used for uniquely identifying the parameter information. Illustratively, the cluster corresponding to producer B is encoded as producer B and the cluster corresponding to consumer B is encoded as consumer B.
The process of obtaining the message queue configuration parameter set according to the embodiment of the present application is described with reference to fig. 2. Optionally, the obtaining the message queue configuration parameter set includes:
S111, obtaining a preset service configuration file.
In an embodiment, the service configuration file refers to a preset file for identifying service processing logic, where the service processing logic may refer to a subscription relationship among a service requirement, a producer, and a consumer. The service profile may be stored in a preset database, which may be a target node in the blockchain, considering the reliability and privacy of data storage.
Taking application system a as an example, application system a establishes communication connection with application system B, application system C, and application system D, respectively, for sharing service information. The application system A comprises order service requirements, customer service requirements and warehouse service requirements, and correspondingly, the application system A comprises order data, customer data and warehouse data. The service processing logic may include an application system B for receiving order data in the application system a to implement order service processing, an application system C for receiving customer data in the application system a to implement customer service processing, and an application system D for receiving warehouse data in the application system a to implement warehouse service processing.
Also, taking the application system a as an example of a medical system, the application system a may support functions of disease auxiliary diagnosis, health management, remote consultation, and the like, and the application system a establishes communication connection with the application system B, the application system C, and the application system D, respectively, for sharing service information. The application system A comprises disease auxiliary diagnosis data, health management data and remote consultation data. The business processing logic may include an application system B for receiving the disease-assisted diagnostic data in the application system a to implement the disease-assisted diagnostic process, an application system C for receiving the health management data in the application system a to implement the health management process, and an application system D for receiving the remote consultation data in the application system a to implement the remote consultation process.
S112, analyzing the service configuration file to obtain a plurality of target message subscription information.
In an embodiment, the target message subscription information may refer to information composed of a producer, a consumer and a message queue under different service requirements. The service requirements, the producer, the consumer and the message queue in the service configuration file all have corresponding keywords, and the information can be obtained by inquiring the keywords. And combining the information of the service requirement, the producer, the consumer and the message queue to obtain target message subscription information. The combination mode can be set according to actual requirements, and is not limited herein.
S113, acquiring a preset message queue configuration parameter template.
In an embodiment, the preset message queue configuration parameter template is a preset parameter template for storing related information in the target message subscription information. The preset message queue configuration parameter template comprises a service requirement item corresponding to the service requirement, a producer item corresponding to the producer, a consumer item corresponding to the consumer and a message queue item corresponding to the message queue. The business requirement item is used for filling in business requirements, the producer item is used for filling in producers, the consumer item is used for filling in consumers, and the message queue item is used for filling in message queues.
S114, filling each target message subscription information into the message queue configuration parameter template to obtain the message queue configuration parameters.
For example, when the application system a establishes communication connection with the application system B, the application system C, and the application system D, the number of the target message subscription information is 3, which are the target message subscription information B corresponding to the application system B, the target message subscription information C corresponding to the application system C, and the target message subscription information D corresponding to the application system D, respectively. Filling the target message subscription information B into the message queue configuration parameter template to obtain a message queue configuration parameter B; filling the target message subscription information C into the message queue configuration parameter template to obtain a message queue configuration parameter C; and filling the target message subscription information D into the message queue configuration parameter template to obtain a D message queue configuration parameter.
S115, combining the message queue configuration parameters to obtain a message queue configuration parameter set.
S12, analyzing each message queue configuration parameter in the message queue configuration parameter set to obtain producer information, consumer information and message queue information.
In at least one embodiment of the present application, each message queue configuration parameter in the message queue configuration parameter set has corresponding producer information, consumer information, and message queue information, where the producer information, the consumer information, and the message queue information can be identified by related keywords, and the producer information, the consumer information, and the message queue information can be obtained by querying the related keywords. Illustratively, the producer information and the consumer information are provided with corresponding cluster codes, and the producer information and the consumer information can be obtained by querying the cluster codes. The message queue information can be provided with message queue keywords, and can be obtained by inquiring the message queue keywords.
The flow of parsing the message queue configuration parameters provided by the embodiment of the application is described with reference to fig. 3. Optionally, the parsing each message queue configuration parameter in the message queue configuration parameter set to obtain producer information, consumer information, and message queue information includes:
S121, obtaining preset producer keywords, preset consumer keywords and preset message queue keywords in the configuration parameters of each message queue.
In an embodiment, the preset producer keyword may be producer, the preset consumer keyword may be consumer, and the preset message queue keyword may be message queue, which is not limited herein.
S122, a first preset data format of preset producer keywords and producer information, a second preset data format of preset consumer keywords and consumer information and a third preset data format of preset message queue keywords and message queue information which are preset are obtained.
In an embodiment, the first preset data format may be { preset producer keywords, producer information }, the second preset data format may be { preset consumer keywords, consumer information }, and the third preset data format may be { preset message queue keywords, message queue information }.
S123, determining producer information, consumer information and message queue information according to the first preset data format, the second preset data format and the third preset data format respectively.
S13, constructing a message queue integration center according to the producer information, the consumer information and the message queue information.
In at least one embodiment of the present application, a schematic diagram of a message queue integration center provided in an embodiment of the present application is described with reference to fig. 5. The message queue integrated center comprises a producer integrated center, a consumer integrated center and a message queue group, wherein the producer integrated center is in communication connection with the message queue group, and the message queue group is in communication connection with the consumer integrated center. The producer integrated center includes a number of producer clusters therein, such as producer cluster B, producer cluster C, and producer cluster D. Consumer integration center includes consumer clusters therein, for example consumer cluster B, consumer cluster C, and consumer cluster D. The message queue group may include a B message queue, a C message queue, and a D message queue.
The construction flow of the message queue integration center provided by the embodiment of the application is described with reference to fig. 4. Optionally, the constructing a message queue integration center according to the producer information, the consumer information and the message queue information includes:
S131, clustering the producer information to obtain a plurality of producer clusters.
In one embodiment, the information belonging to the producers is clustered to obtain a plurality of producer clusters. Illustratively, the producer cluster may include a producer cluster B, a producer cluster C, and a producer cluster D. Wherein 1 or more producers may be contained within the cluster B, C, D.
S132, combining the plurality of producer clusters to obtain a producer integration center.
S133, clustering the consumer information to obtain a plurality of consumer clusters.
In one embodiment, information belonging to the same consumer is clustered to obtain a plurality of consumer clusters. Illustratively, the consumer clusters may include consumer cluster B, consumer cluster C, and consumer cluster D. Wherein 1 or more consumers may be contained within the consumer cluster B, C, D.
S134, combining the consumer clusters to obtain a consumer integration center.
S135, analyzing the information of the message queues to obtain a plurality of message queues.
S136, combining the message queues to obtain a message queue group.
Illustratively, the message queue group includes a B message queue, a C message queue, and a D message queue.
S137, combining the producer integrated center, the consumer integrated center and the message queue group to obtain a message queue integrated center.
S14, when the business requirement is received, matching a target producer cluster, a target message queue and a target consumer cluster corresponding to the business requirement from the message queue integration center.
In at least one embodiment of the present application, the service requirement refers to a requirement of calling a consumer cluster to perform service processing, and before calling a target consumer cluster to perform service processing, the target producer cluster, the target message queue and the target consumer cluster corresponding to the service requirement need to be matched from the message queue integration center to ensure that related services are accurately processed.
The matching flow of the cluster provided by the embodiment of the application is described with reference to fig. 6. Optionally, the matching, from within the message queue integration center, the target producer cluster, the target message queue, and the target consumer cluster corresponding to the service requirement includes:
s141, acquiring the service codes corresponding to the service demands.
In an embodiment, the service requirement carries a service code, which is used for determining to invoke a target producer cluster corresponding to the service code to send the service requirement. The service codes may be digital codes, letter codes, or color codes, without limitation.
S142, acquiring a producer code set corresponding to the producer integrated center in the message queue integrated center.
In one embodiment, the producer integration center includes a plurality of producer clusters therein, for each producer cluster there being a corresponding producer code.
S143, selecting a target producer code which is the same as the business code from the producer code set, and determining a producer cluster corresponding to the target producer code as a target producer cluster.
S144, a target message queue corresponding to the target producer cluster and the target consumer cluster are obtained.
Optionally, the obtaining the target message queue corresponding to the target producer cluster and the target consumer cluster includes:
s1441, a preset first mapping relation between the target producer cluster and the message queue and a preset second mapping relation between the target producer cluster and the consumer cluster are obtained.
S1442, traversing the first mapping relation to obtain a target message queue.
S1443, traversing the second mapping relation to obtain a target consumer cluster.
Optionally, the obtaining the producer code set corresponding to the producer integration center in the message queue integration center includes:
S1421, obtaining preset coding keywords corresponding to each producer cluster in the producer integrated center.
S1422, obtaining the producer codes corresponding to the preset code keywords.
S1423, combining the producer codes corresponding to each producer cluster to obtain a producer code set.
S15, calling the target producer cluster to receive the service requirement, outputting the service requirement to the target message queue by the target producer cluster, and outputting the service requirement to the target consumer cluster by the target message queue to realize service processing.
According to the message queue processing method provided by the embodiment of the application, the producer information, the consumer information and the message queue information are obtained by analyzing each message queue configuration parameter in the message queue configuration parameter set; and constructing a message queue integration center according to the producer information, the consumer information and the message queue information, and then matching a target producer cluster, a target message queue and a target consumer cluster corresponding to the service requirement in the message queue integration center to finish service processing. The intelligent city intelligent management system can be applied to various functional modules of intelligent cities such as intelligent government affairs, intelligent transportation, intelligent medical treatment and the like, such as an intelligent medical treatment message queue processing module and the like, and can promote the rapid development of the intelligent cities.
Referring to fig. 7, fig. 7 is a block diagram of a message queue processing apparatus according to an embodiment of the application.
In some embodiments, the message queue processing apparatus 20 may comprise a plurality of functional modules consisting of computer program segments. The computer program of the individual program segments in the message queue processing means 20 may be stored in a memory of a computer device and executed by at least one processor to perform the functions of message queue processing (see fig. 1 for details).
In this embodiment, the message queue processing apparatus 20 may be divided into a plurality of functional modules according to the functions performed by the message queue processing apparatus. The functional module may include: a parameter acquisition module 201, a parameter analysis module 202, a center construction module 203, a cluster matching module 204 and a service processing module 205. The module referred to in the present application refers to a series of computer program segments capable of being executed by at least one processor and of performing a fixed function, stored in a memory. In the present embodiment, the functions of the respective modules will be described in detail in the following embodiments.
The parameter acquisition module 201 may be configured to acquire a message queue configuration parameter set.
The parameter parsing module 202 may be configured to parse each message queue configuration parameter in the message queue configuration parameter set to obtain producer information, consumer information, and message queue information.
The center construction module 203 may be configured to construct a message queue integration center based on the producer information, the consumer information, and the message queue information.
The cluster matching module 204 may be configured to match a target producer cluster, a target message queue, and a target consumer cluster corresponding to a business requirement from within the message queue integration center when the business requirement is received.
The service processing module 205 may be configured to invoke the target producer cluster to receive the service requirement, output the service requirement to the target message queue by the target producer cluster, and output the service requirement to the target consumer cluster by the target message queue to implement service processing.
In at least one embodiment of the present application, the parameter obtaining module 201 may be further configured to obtain a preset service configuration file; analyzing the service configuration file to obtain a plurality of target message subscription information; acquiring a preset message queue configuration parameter template; filling each target message subscription information into the message queue configuration parameter template to obtain message queue configuration parameters; and combining the message queue configuration parameters to obtain a message queue configuration parameter set.
In at least one embodiment of the present application, the parameter parsing module 202 may be further configured to obtain a preset producer keyword, a preset consumer keyword, and a preset message queue keyword in each message queue configuration parameter; acquiring a first preset data format of preset producer keywords and producer information, a second preset data format of preset consumer keywords and consumer information and a third preset data format of preset message queue keywords and message queue information; and determining producer information, consumer information and message queue information according to the first preset data format, the second preset data format and the third preset data format respectively.
In at least one embodiment of the present application, the center building module 203 may be further configured to cluster the producer information to obtain a plurality of producer clusters; combining the plurality of producer clusters to obtain a producer integration center; clustering the consumer information to obtain a plurality of consumer clusters; combining the plurality of consumer clusters to obtain a consumer integration center; analyzing the information of the message queues to obtain a plurality of message queues; combining the message queues to obtain a message queue group; and combining the producer integrated center, the consumer integrated center and the message queue group to obtain a message queue integrated center.
In at least one embodiment of the present application, the cluster matching module 204 may be further configured to obtain a service code corresponding to the service requirement; acquiring a producer code set corresponding to the producer integrated center in the message queue integrated center; selecting a target producer code which is the same as the business code from the producer code set, and determining a producer cluster corresponding to the target producer code as a target producer cluster; and acquiring a target message queue corresponding to the target producer cluster and a target consumer cluster.
In at least one embodiment of the present application, the cluster matching module 204 may be further configured to obtain a preset first mapping relationship between the target producer cluster and the message queue and a preset second mapping relationship between the target producer cluster and the consumer cluster; traversing the first mapping relation to obtain a target message queue; and traversing the second mapping relation to obtain a target consumer cluster.
In at least one embodiment of the present application, the cluster matching module 204 may be further configured to obtain a preset encoding keyword corresponding to each producer cluster in the producer integrated center; acquiring producer codes corresponding to the preset code keywords; and combining the producer codes corresponding to each producer cluster to obtain a producer code set.
Fig. 8 is a schematic structural diagram of a computer device according to an embodiment of the application. In the preferred embodiment of the present application, the computer device 3 includes a memory 31, at least one processor 32, at least one communication bus 33, and a transceiver 34.
It will be appreciated by those skilled in the art that the configuration of the computer device shown in fig. 7 is not limiting of the embodiments of the present application, and that either a bus-type configuration or a star-type configuration is possible, and that the computer device 3 may include more or less other hardware or software than that shown, or a different arrangement of components.
In some embodiments, the computer device 3 is a device capable of automatically performing numerical calculation and/or information processing according to preset or stored instructions, and its hardware includes, but is not limited to, a microprocessor, an application specific integrated circuit, a programmable gate array, a digital processor, an embedded device, and the like. The computer device 3 may also include a client device, which includes, but is not limited to, any electronic product that can interact with a client by way of a keyboard, mouse, remote control, touch pad, or voice control device, such as a personal computer, tablet, smart phone, digital camera, etc.
It should be noted that the computer device 3 is only used as an example, and other electronic products that may be present in the present application or may be present in the future are also included in the scope of the present application by way of reference.
In some embodiments, the memory 31 has stored therein a computer program which, when executed by the at least one processor 32, performs all or part of the steps in a message queue processing method as described. The Memory 31 includes Read-Only Memory (ROM), programmable Read-Only Memory (PROM), erasable programmable Read-Only Memory (EPROM), one-time programmable Read-Only Memory (One-time Programmable Read-Only Memory, OTPROM), electrically erasable rewritable Read-Only Memory (EEPROM), compact disc Read-Only Memory (Compact Disc Read-Only Memory, CD-ROM) or other optical disc Memory, magnetic tape Memory, or any other medium that can be used for computer-readable carrying or storing data.
Further, the computer-readable storage medium may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created from the use of blockchain nodes, and the like.
The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm and the like. The Blockchain (Blockchain), which is essentially a decentralised database, is a string of data blocks that are generated by cryptographic means in association, each data block containing a batch of information of network transactions for verifying the validity of the information (anti-counterfeiting) and generating the next block. The blockchain may include a blockchain underlying platform, a platform product services layer, an application services layer, and the like.
In some embodiments, the at least one processor 32 is a Control Unit (Control Unit) of the computer device 3, connects the various components of the entire computer device 3 using various interfaces and lines, and performs various functions and processes of the computer device 3 by running or executing programs or modules stored in the memory 31, and invoking data stored in the memory 31. For example, the at least one processor 32, when executing the computer programs stored in the memory, implements all or part of the steps of the message queue processing method described in embodiments of the application; or to implement all or part of the functionality of the message queue handling means. The at least one processor 32 may be comprised of integrated circuits, such as a single packaged integrated circuit, or may be comprised of multiple integrated circuits packaged with the same or different functionality, including one or more central processing units (Central Processing unit, CPU), microprocessors, digital processing chips, graphics processors, combinations of various control chips, and the like.
In some embodiments, the at least one communication bus 33 is arranged to enable connected communication between the memory 31 and the at least one processor 32 or the like.
Although not shown, the computer device 3 may further comprise a power source (such as a battery) for powering the various components, preferably the power source is logically connected to the at least one processor 32 via a power management means, whereby the functions of managing charging, discharging, and power consumption are performed by the power management means. The power supply may also include one or more of any of a direct current or alternating current power supply, recharging device, power failure detection circuit, power converter or inverter, power status indicator, etc. The computer device 3 may further include various sensors, bluetooth modules, wi-Fi modules, etc., which will not be described in detail herein.
The integrated units implemented in the form of software functional modules described above may be stored in a computer readable storage medium. The software functional modules described above are stored in a storage medium and include instructions for causing a computer device (which may be a personal computer, a computer device, or a network device, etc.) or processor (processor) to perform portions of the methods described in the various embodiments of the application.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical function division, and there may be other manners of division when actually implemented.
The modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, may be located in one place, or may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional module in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units can be realized in a form of hardware or a form of hardware and a form of software functional modules.
It will be evident to those skilled in the art that the application is not limited to the details of the foregoing illustrative embodiments, and that the present application may be embodied in other specific forms without departing from the spirit or essential characteristics thereof. The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the application being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned. Furthermore, it will be obvious that the term "comprising" does not exclude other elements or that the singular does not exclude a plurality. Several of the elements or devices recited in the specification may be embodied by one and the same item of software or hardware. The terms first, second, etc. are used to denote a name, but not any particular order.
Finally, it should be noted that the above-mentioned embodiments are merely for illustrating the technical solution of the present application and not for limiting the same, and although the present application has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications and equivalents may be made to the technical solution of the present application without departing from the spirit and scope of the technical solution of the present application.

Claims (10)

1. A message queue processing method, characterized in that the message queue processing method comprises:
acquiring a message queue configuration parameter set;
analyzing each message queue configuration parameter in the message queue configuration parameter set to obtain producer information, consumer information and message queue information;
constructing a message queue integration center according to the producer information, the consumer information and the message queue information;
when a business requirement is received, matching a target producer cluster, a target message queue and a target consumer cluster corresponding to the business requirement from the message queue integration center;
and calling the target producer cluster to receive the service requirement, outputting the service requirement to the target message queue by the target producer cluster, and outputting the service requirement to the target consumer cluster by the target message queue to realize service processing.
2. The message queue processing method of claim 1, wherein the obtaining a message queue configuration parameter set comprises:
acquiring a preset service configuration file;
analyzing the service configuration file to obtain a plurality of target message subscription information;
acquiring a preset message queue configuration parameter template;
filling each target message subscription information into the message queue configuration parameter template to obtain message queue configuration parameters;
and combining the message queue configuration parameters to obtain a message queue configuration parameter set.
3. The method for processing the message queue according to claim 1, wherein said parsing each message queue configuration parameter in the message queue configuration parameter set to obtain producer information, consumer information, and message queue information comprises:
acquiring preset producer keywords, preset consumer keywords and preset message queue keywords in each message queue configuration parameter;
acquiring a first preset data format of preset producer keywords and producer information, a second preset data format of preset consumer keywords and consumer information and a third preset data format of preset message queue keywords and message queue information;
And determining producer information, consumer information and message queue information according to the first preset data format, the second preset data format and the third preset data format respectively.
4. The message queue processing method of claim 1, wherein the constructing a message queue integration center from the producer information, the consumer information, and the message queue information comprises:
clustering the producer information to obtain a plurality of producer clusters;
combining the plurality of producer clusters to obtain a producer integration center;
clustering the consumer information to obtain a plurality of consumer clusters;
combining the plurality of consumer clusters to obtain a consumer integration center;
analyzing the information of the message queues to obtain a plurality of message queues;
combining the message queues to obtain a message queue group;
and combining the producer integrated center, the consumer integrated center and the message queue group to obtain a message queue integrated center.
5. The message queue processing method of claim 4, wherein the matching of the target producer cluster, the target message queue, and the target consumer cluster corresponding to the business requirement from within the message queue integration center comprises:
Acquiring a service code corresponding to the service requirement;
acquiring a producer code set corresponding to the producer integrated center in the message queue integrated center;
selecting a target producer code which is the same as the business code from the producer code set, and determining a producer cluster corresponding to the target producer code as a target producer cluster;
and acquiring a target message queue corresponding to the target producer cluster and a target consumer cluster.
6. The method for processing a message queue according to claim 5, wherein the obtaining the target message queue corresponding to the target producer cluster and the target consumer cluster includes:
acquiring a preset first mapping relation between the target producer cluster and a message queue and a preset second mapping relation between the target producer cluster and a consumer cluster;
traversing the first mapping relation to obtain a target message queue;
and traversing the second mapping relation to obtain a target consumer cluster.
7. The method for processing a message queue according to claim 5, wherein the obtaining a producer code set corresponding to the producer integrated center in the message queue integrated center comprises:
Acquiring a preset coding keyword corresponding to each producer cluster in the producer integrated center;
acquiring producer codes corresponding to the preset code keywords;
and combining the producer codes corresponding to each producer cluster to obtain a producer code set.
8. A message queue processing apparatus, the message queue processing apparatus comprising:
the parameter acquisition module is used for acquiring a message queue configuration parameter set;
the parameter analysis module is used for analyzing each message queue configuration parameter in the message queue configuration parameter set to obtain producer information, consumer information and message queue information;
the center construction module is used for constructing a message queue integration center according to the producer information, the consumer information and the message queue information;
the cluster matching module is used for matching a target producer cluster, a target message queue and a target consumer cluster corresponding to the service requirement from the message queue integration center when the service requirement is received;
and the business processing module is used for calling the target producer cluster to receive the business requirement, outputting the business requirement to the target message queue by the target producer cluster, and outputting the business requirement to the target consumer cluster by the target message queue to realize business processing.
9. A computer device comprising a processor for implementing a message queue processing method according to any one of claims 1 to 7 when executing a computer program stored in a memory.
10. A computer readable storage medium having a computer program stored thereon, wherein the computer program when executed by a processor implements the message queue processing method according to any one of claims 1 to 7.
CN202310716608.3A 2023-06-15 2023-06-15 Message queue processing method, device, computer equipment and storage medium Pending CN116662034A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310716608.3A CN116662034A (en) 2023-06-15 2023-06-15 Message queue processing method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310716608.3A CN116662034A (en) 2023-06-15 2023-06-15 Message queue processing method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116662034A true CN116662034A (en) 2023-08-29

Family

ID=87726031

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310716608.3A Pending CN116662034A (en) 2023-06-15 2023-06-15 Message queue processing method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116662034A (en)

Similar Documents

Publication Publication Date Title
CN112698971B (en) Parameter conversion method, device, equipment and medium based on rule engine
CN113435582B (en) Text processing method and related equipment based on sentence vector pre-training model
CN114201212A (en) Configuration file processing method and device, computer equipment and storage medium
CN112598135A (en) Model training processing method and device, computer equipment and medium
CN112541640A (en) Resource authority management method and device, electronic equipment and computer storage medium
CN116108276A (en) Information recommendation method and device based on artificial intelligence and related equipment
CN116737378A (en) Dynamic resource allocation method and device, electronic equipment and storage medium
CN111651452A (en) Data storage method and device, computer equipment and storage medium
CN116662034A (en) Message queue processing method, device, computer equipment and storage medium
CN116434934A (en) Message queue-based patient waiting method and device, electronic equipment and medium
CN113722324B (en) Report generation method and device based on artificial intelligence, electronic equipment and medium
CN114239538A (en) Assertion processing method and device, computer equipment and storage medium
CN116095007A (en) Load scheduling method, device, computer equipment and storage medium
CN115658858A (en) Dialog recommendation method based on artificial intelligence and related equipment
CN114881313A (en) Behavior prediction method and device based on artificial intelligence and related equipment
CN115458148A (en) Intelligent selection method and intelligent selection device for triage method
CN114331661A (en) Data verification method and device, electronic equipment and storage medium
CN113722590B (en) Medical information recommendation method, device, equipment and medium based on artificial intelligence
CN112489746A (en) Task pushing method and device for data management, electronic equipment and storage medium
CN116306512A (en) Channel information processing method, channel information processing device, computer equipment and storage medium
CN115037481B (en) Electronic signature method and device based on artificial intelligence, electronic equipment and medium
CN116755987A (en) Buried point index processing method, buried point index processing device, computer equipment and storage medium
CN116662138A (en) Buried data processing method, buried data processing device, computer equipment and storage medium
CN113449037B (en) AI-based SQL engine calling method, device, equipment and medium
CN116401123A (en) Log processing method and device based on artificial intelligence and related equipment

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