[go: up one dir, main page]

CN109388504B - Method and device for processing informationized docking, computer equipment and storage medium - Google Patents

Method and device for processing informationized docking, computer equipment and storage medium Download PDF

Info

Publication number
CN109388504B
CN109388504B CN201811122032.3A CN201811122032A CN109388504B CN 109388504 B CN109388504 B CN 109388504B CN 201811122032 A CN201811122032 A CN 201811122032A CN 109388504 B CN109388504 B CN 109388504B
Authority
CN
China
Prior art keywords
message
event
events
processing
queue
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.)
Active
Application number
CN201811122032.3A
Other languages
Chinese (zh)
Other versions
CN109388504A (en
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 CN201811122032.3A priority Critical patent/CN109388504B/en
Publication of CN109388504A publication Critical patent/CN109388504A/en
Application granted granted Critical
Publication of CN109388504B publication Critical patent/CN109388504B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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 OR CALCULATING; 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/542Event management; Broadcasting; Multicasting; Notifications
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/547Messaging middleware
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/548Queue

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Telephonic Communication Services (AREA)
  • Computer And Data Communications (AREA)

Abstract

The embodiment of the invention discloses a method, a device, a computer device and a storage medium for processing informationized docking, wherein the method comprises the steps of generating a corresponding message sending request according to a message sending instruction; reading all message events in the message sending request to determine the mark information associated with each message event; classifying all message events according to the mark information, sequentially sending the message events to corresponding message queues in the message middleware for storage, wherein the message events with the same mark information are the same type of message events, and each message queue only comprises the same type of message events; and sequentially reading the message event positioned at the first position in each message queue according to a preset rule, and sending the message event to a processing server corresponding to the mark information of the message event in the server cluster for processing. The invention can realize timely processing of the message and improve the response rate and the working efficiency of the message processing system.

Description

Method and device for processing informationized docking, computer equipment and storage medium
Technical Field
The present invention relates to the field of data processing, and in particular, to a method and apparatus for processing a message, a computer device, and a storage medium.
Background
When the general insurance business processing system processes the high-rise period of insurance business, the external system interface is required to be called at high frequency, and the corresponding processing server is determined to process related business requests through the external system interface, so that the external system is subjected to larger pressure at the moment, response delay phenomena and inconsistent data can possibly occur; furthermore, the existing service processing system has strong coupling with the external system, the number of interfaces of the external system is relatively fixed, whether the service processing system sends the message successfully depends on a message receiver or not, and the user cannot flexibly use the service processing system, so that the calling pressure of the external system is increased, and the corresponding working efficiency is reduced.
Disclosure of Invention
The embodiment of the invention provides a method, a device, computer equipment and a storage medium for processing information in a messaging manner, which can realize timely processing of information and improve the response rate and the working efficiency of an information processing system.
In a first aspect, an embodiment of the present invention provides a method for processing a messaging docking, where the method includes:
generating corresponding message sending requests according to the message sending instructions, wherein each message sending request comprises at least one message event;
Reading all message events in the message sending request to determine the mark information associated with each message event;
Classifying all message events according to the mark information, and sequentially sending the message events to corresponding message queues in the message middleware for storage, wherein the message events with the same mark information are the same type of message events, and each message queue only comprises the same type of message events;
and sequentially reading the message event positioned at the first position in each message queue according to a preset rule, and sending the message event to a processing server corresponding to the mark information of the message event in the server cluster for processing.
In a second aspect, an embodiment of the present invention further provides a messaging docking processing apparatus, where the apparatus includes:
A request generating unit, configured to generate corresponding message sending requests according to the message sending instructions, where each message sending request includes at least one message event;
A reading unit for reading all the message events in the message sending request to determine the mark information associated with each message event;
The classifying unit is used for classifying all the message events according to the mark information and sequentially sending the message events to corresponding message queues in the message middleware for storage, wherein the message events with the same mark information are the same type of message events, and each message queue only comprises the same type of message events;
And the processing unit is used for sequentially reading the message event positioned at the first position in each message queue according to a preset rule, and sending the message event to a processing server corresponding to the mark information of the message event in the server cluster for processing.
In a third aspect, an embodiment of the present invention further provides a computer device, which includes a memory and a processor, where the memory stores a computer program, and the processor implements the method when executing the computer program.
In a fourth aspect, embodiments of the present invention also provide a computer readable storage medium storing a computer program comprising program instructions which, when executed by a processor, implement the above-described method.
The embodiment of the invention provides a method and a device for processing informationized docking, computer equipment and a storage medium. Wherein the method comprises the following steps: generating corresponding message sending requests according to the message sending instructions, wherein each message sending request comprises at least one message event; reading all message events in the message sending request to determine the mark information associated with each message event; classifying all message events according to the mark information, and sequentially sending the message events to corresponding message queues in the message middleware for storage, wherein the message events with the same mark information are the same type of message events, and each message queue only comprises the same type of message events; and sequentially reading the message event positioned at the first position in each message queue according to a preset rule, and sending the message event to a processing server corresponding to the mark information of the message event in the server cluster for processing. The embodiment of the invention can effectively realize timely processing of the message according to the characteristics of the message sending request, and improves the response rate and the working efficiency of the message processing system.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a method for processing a messaging docking according to an embodiment of the present invention;
Fig. 1a is a schematic diagram of an application scenario of a messaging docking processing method according to an embodiment of the present invention;
FIG. 2 is a schematic sub-flowchart of a method for processing a messaging docking according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart of a messaging docking method according to another embodiment of the present invention;
FIG. 4 is a schematic block diagram of a messaging docking processing apparatus provided by an embodiment of the present invention;
FIG. 5 is a schematic block diagram of a processing unit of a messaging docking processing apparatus provided in an embodiment of the present invention;
FIG. 6 is a schematic block diagram of a messaging docking processing apparatus provided in accordance with another embodiment of the present invention;
fig. 7 is a schematic diagram of a computer device structure according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be understood that the terms "comprises" and "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
Referring to fig. 1 and fig. 1a, fig. 1 is a schematic flow chart of a messaging docking processing method according to an embodiment of the present application, and fig. 1a is a schematic view of a messaging docking processing method according to an embodiment of the present application. The messaging docking processing method is applied to the terminal system 10. The terminal system 10 can effectively process the message in time according to the characteristics of the message sending request. Specifically, the terminal system 10 can distribute the message event to the processing servers 20 corresponding to the characteristics in the server cluster according to the characteristics. In this implementation, the server cluster may include a plurality of processor servers 20. The individual steps of the messaging docking processing method will be described in detail below in terms of the terminal system 10.
Fig. 1 is a schematic flow chart of a messaging docking processing method according to an embodiment of the present invention. The method can be operated in terminals such as smart phones (such as Android mobile phones and IOS mobile phones), tablet computers, notebook computers and intelligent devices. As shown in fig. 1, the steps of the method include steps S101 to S104.
S101, corresponding message sending requests are generated according to the message sending instructions, and each message sending request comprises at least one message event.
In this embodiment, after the service person adjusts the policy data in the terminal system, the service person submits the adjusted data, that is, issues a message sending instruction. According to the message sending instruction, a corresponding message sending request can be generated, if a plurality of insurance policies are adjusted when a service person adjusts the insurance policies, the generated message sending request can correspondingly comprise a plurality of message events. In general, the operations of adjusting the policy data by the service personnel may include operations such as modifying the whole policy, canceling the policy, returning and modifying the policy, for example, modifying the policy of the Hunan road association, modifying the policy of the Beijing security production liability insurance, modifying the policy of the campus liability insurance, and the like.
Meanwhile, different message events can be classified according to different insurance product major classes or the types of technical products under each major class, namely, the message events in the message sending request are classified. Moreover, the whole bill correction mainly can be to change and adjust the data of a plurality of sub-insurance policies under the same batch of insurance policies, for example, the campus responsibility insurance can be divided into the Guangdong campus responsibility insurance and the Hunan campus responsibility insurance, at this time, the related insurance policies of the Guangdong campus responsibility insurance are used as the same class, the related insurance policies of the Hunan campus responsibility insurance are also used as the same class, when the Guangdong campus responsibility insurance is adjusted, one or more insurance policies can be selected to be adjusted, and at this time, the generated message sending request can include a plurality of message events, and each message event corresponds to the adjustment of one insurance policy.
S102, reading all message events in the message sending request to determine the mark information associated with each message event.
In this embodiment, the message sending request may include a plurality of message events, where all the message events in the message sending request need to be read. Each message event is preset with corresponding identification information, and the message events with the same identification information are of the same type.
The sign information may be a name or a number code, a letter code, or the like with a sign such as the risk of the policy, the user name of the policy, the geographic location of the insurance company that accepts the policy, or the like. For example, the message event may be identified and classified according to the risk of the policy, where the policy related to creating the insurance is the same type of policy, and the identification information of the message event generated when the created insurance is adjusted for the corresponding policy is created; the insurance policy related to the campus responsibility insurance is the same type of insurance policy, wherein the campus responsibility insurance is the mark information of the message event generated when the corresponding insurance policy is adjusted. Further, when the campus liability risk is divided into the campus liability risk of different regions such as the Guangdong campus liability risk and the Hunan campus liability risk, at this time, the Guangdong campus liability risk is the identification information of the message event generated when the corresponding policy is adjusted, and the Hunan campus liability risk is the identification information of the message event generated when the corresponding policy is adjusted.
S103, classifying all message events according to the mark information, and sequentially sending the message events to corresponding message queues in the message middleware for storage, wherein the message events with the same mark information are the same type of message events, and each message queue only comprises the same type of message events.
In this embodiment, the message middleware can extend inter-process communications in a distributed environment by providing a messaging and message queuing model. The message middleware is suitable for a distributed environment requiring reliable data transmission, generally, in a system adopting a message middleware mechanism, a terminal of the system and a processing server activate each other through transmitting a message, so that corresponding operation is completed, specifically, the user terminal sends the message to the message middleware, the message middleware stores the message in a plurality of queues, and the message is forwarded to the processing server serving as a receiver when appropriate.
The message middleware comprises a plurality of message queues, wherein each message queue is correspondingly associated with a preset mark information, and message events which are generally associated with the mark information identical to the preset mark information can be sequentially stored in the corresponding message queues according to time sequence, namely, the message events equivalent to the same type of message events are stored in the same message queue and are read according to a first-in first-out rule.
S104, reading the first message event in each message queue in turn according to the preset rule, and sending the first message event to a processing server corresponding to the mark information of the message event in the server cluster for processing.
In this embodiment, the server cluster includes a plurality of processor servers, each including a plurality of threads; the processing servers are used for processing different types of message events, one thread can process one message event at a time, and each processing server can only process the message event associated with the corresponding identification information, so that the message event processed by one processing server is in the same message queue.
As shown in fig. 2, in an embodiment, the server cluster includes a plurality of processor servers, and the step S104 may specifically include steps S201 to S203.
S201, ordering the message events in each list of message queues according to the storage time of the message events.
In this embodiment, the message middleware includes a plurality of message queues, so that the message events in each message queue need to be ordered according to the storage time of the message time, so as to sequentially read the message events in each message queue in turn.
S202, reading the first message event in each message queue in turn.
In this embodiment, after all the message queues are ordered, the first message event in each message queue may be read in turn. The message events in each message queue are stored according to time sequence, when the first message event is read, the arrangement sequence of the message events in the message queue needs to be adjusted, namely, the message event positioned at the second position is stored at the first position, the message event positioned at the third position is stored at the second position, and so on, so that the dynamic storage of the message queue is realized.
And S203, the read message event is sent to a processing server corresponding to the mark information of the message event for processing.
In this embodiment, the read message event is associated with identification information corresponding to the read message event, and a message queue in which the message event is located and a type of the message event can be determined according to the identification information, so as to determine a processing server capable of processing the message event of the type.
Further, the step S202 includes the following steps:
S202a, if there is a message queue with the number of message events being greater than a first preset value, the message queue is used as a first message queue.
In this embodiment, the first preset value may be set according to the actual situation of the user. In order to further improve the working efficiency of the server cluster, it is necessary to determine a message queue when the number of message events is greater than a first preset value, and the message queue may be used as the first message queue so as to facilitate the subsequent operation.
S202b, judging whether the server cluster comprises a processing server with idle threads or not.
In this embodiment, if the number of the message events in the first message queue is greater than the first preset value, it is indicated that there are enough message events in the first message queue at this time, but the processing server corresponding to the type of the message event stored in the first message queue does not have enough threads to process the message event at this time, and at this time, corresponding thread adjustment is required, so that the processing efficiency of the message event is improved.
S202c, if the server cluster comprises processing servers with idle threads, determining the number of the idle threads.
In this embodiment, in order to improve the processing efficiency of the message event and reduce the idle threads, the number of processing servers with idle threads and corresponding idle threads needs to be counted to perform the next operation.
S202d, reading message events matched with the number of the idle threads from the first message queue, and sending the message events to a corresponding processing server with the idle threads for processing.
In this embodiment, in order to make full use of the current idle thread and simultaneously alleviate the phenomenon of message blocking in the first message queue, at this time, a message event matching with the number of idle threads may be read from the first message queue and sent to a corresponding processing server with idle threads for processing. For example, when the number of idle threads is 4, the first preset value is 5, and the number of message events in the first message queue is 6, then 4 message events are sequentially read from the first message queue to the idle threads for processing; if the first preset value is 2 and the number of message events in the first message queue is 3, then 3 message events are read from the first message queue and are sent to the idle thread for processing.
As a further step, the method may further comprise the steps of:
s202e, if the server cluster does not include a processing server with idle threads, determining another message queue with the number of message events smaller than a second preset value as a second message queue, wherein the second preset value is smaller than the first preset value.
In this embodiment, if the server cluster does not include a processing server with an idle thread, it indicates that there is no idle thread to process excessive message events in the first message queue, and at this time, it needs to determine a message queue with a smaller number of message events, that is, determine a second message queue with a number of message events smaller than a second preset value, and in order to ensure that the number of message events in the first message queue is greater than the number of message events in the second message queue, the second preset value is smaller than the first preset value.
And S202f, when the first message event in the second message queue is read, the first message event in the first message queue is read to replace the first message event in the second message queue, and the first message event is sent to a processing server corresponding to the second message queue.
In this embodiment, the processing server corresponding to the second message queue processes the message event in the first message queue, so that excessive message events in the first message queue can be effectively and timely processed, the overall working efficiency and the processing capability balance of the terminal system are improved, and the use experience of a service operator is improved.
In summary, the embodiment of the invention can effectively realize timely processing of the message according to the characteristics of the message sending request, and improve the response rate and the working efficiency of the message processing system.
Referring to fig. 3, fig. 3 is a schematic flow chart of a messaging docking processing method according to another embodiment of the invention. The method can be operated in terminals such as smart phones (such as Android mobile phones and IOS mobile phones), tablet computers, notebook computers and intelligent devices. As shown in fig. 3, the steps of the method include steps S301 to S304. The explanation and detailed explanation of the steps similar to steps S101 to S104 in the above embodiment are omitted herein, and the following detailed explanation is added to the steps in this embodiment.
S301, corresponding message sending requests are generated according to the message sending instructions, and each message sending request comprises at least one message event.
S302, reading all message events in the message sending request to determine the mark information associated with each message event.
S303, classifying all message events according to the mark information, and sequentially sending the message events to corresponding message queues in the message middleware for storage, wherein the message events with the same mark information are the same type of message events, and each message queue only comprises the same type of message events.
S304a, judging whether the message event comprises priority information.
In this embodiment, in order to enable the message event to be processed more timely according to the actual situation, it needs to determine whether the message event includes priority information, where the priority information may be preset priority information marked on the message event when a service person issues a message sending instruction, so as to correspondingly adjust the ordering of the message event in the message queue.
And S304b, if the message event comprises priority information, adjusting the position of the existing message event in the corresponding message queue so that the message event comprising the priority information is stored in the first position of the message queue.
In this embodiment, if the message event includes priority information, the message event should be placed at the first position in the corresponding message queue at this time, so as to ensure that the message event with priority information can be timely processed, ensure timeliness and stability of message event processing, and improve efficiency of the whole message event processing system.
S304, the message event at the first position in each message queue is sequentially read according to a preset rule, and is sent to a processing server corresponding to the mark information of the message event in the server cluster for processing.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in accordance with the embodiments may be accomplished by way of a computer program stored on a computer readable storage medium, which when executed may comprise the steps of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), or the like.
Referring to fig. 4, in response to the above-mentioned method for processing messaging docking, an embodiment of the present invention further provides a device for processing messaging docking, where the device 100 includes: a request generation unit 101, a reading unit 102, a classification unit 103, and a processing unit 104.
The request generating unit 101 is configured to generate corresponding message sending requests according to the message sending instructions, where each message sending request includes at least one message event.
The reading unit 102 is configured to read all the message events in the message sending request, so as to determine the flag information associated with each message event.
The classifying unit 103 is configured to classify all the message events according to the flag information, and sequentially send the classified message events to corresponding message queues in the message middleware for storage, where the message events with the same flag information are the same type of message event, and each message queue only includes the same type of message event.
The processing unit 104 is configured to sequentially read the first message event in each message queue according to a preset rule, so as to send the first message event to a processing server corresponding to the flag information of the message event in the server cluster for processing.
As shown in fig. 5, in an embodiment, the server cluster includes a plurality of processor servers, and the processing unit 104 may specifically include an ordering unit 201, an event reading unit 202, and a sending unit 203.
The sorting unit 201 is configured to sort the message events in each of the message queues according to the storage time of the message events.
The event reading unit 202 is configured to read the first message event in each message queue in turn.
The sending unit 203 is configured to send the read message event to a processing server corresponding to the flag information of the message event for processing.
Further, the event reading unit 202 may further include the following units:
the first judging unit 202a is configured to take the message queue as the first message queue if there is a message queue with the number of message events being greater than the first preset value.
A second determining unit 202b is configured to determine whether the server cluster includes a processing server with an idle thread.
The first determining unit 202c is configured to determine, if the server cluster includes a processing server with idle threads, the number of idle threads.
And the adjusting unit 202d is configured to read a message event matching the number of idle threads from the first message queue, and send the message event to a corresponding processing server with idle threads for processing.
As a further step, the method may further comprise the steps of:
A second determining unit 202e, configured to determine, if the server cluster does not include a processing server with an idle thread, another message queue with a number of message events smaller than a second preset value as a second message queue, where the second preset value is smaller than the first preset value.
And the replacing unit 202f is configured to, when reading the message event located at the first position in the second message queue, read the message event located at the first position in the first message queue to replace the message event located at the first position in the second message queue, and send the message event to a processing server corresponding to the second message queue.
Referring to fig. 6, in response to the above-mentioned method for processing messaging docking, another embodiment of the present invention further provides a device for processing messaging docking, where the device 300 includes: a request generation unit 301, a reading unit 302, a classification unit 303, an information judgment unit 304a, an adjustment unit 304b, and a processing unit 304.
The request generating unit 301 is configured to generate corresponding message sending requests according to the message sending instructions, where each message sending request includes at least one message event.
The reading unit 302 is configured to read all the message events in the message sending request, so as to determine the flag information associated with each message event.
The classifying unit 303 is configured to classify all the message events according to the flag information, and sequentially send the classified message events to corresponding message queues in the message middleware for storage, where the message events with the same flag information are the same type of message event, and each message queue only includes the same type of message event.
The information determining unit 304a is configured to determine whether the message event includes priority information.
The adjusting unit 304b is configured to adjust the location of the existing message event in the corresponding message queue if the message event includes priority information, so that the message event including the priority information is stored in the first bit of the message queue.
The processing unit 304 is configured to sequentially read, according to a preset rule, a message event located at the first position in each message queue, so as to send the message event to a processing server corresponding to the flag information of the message event in the server cluster for processing.
It should be noted that, as will be clearly understood by those skilled in the art, the specific implementation process of the messaging docking processing apparatus 100 and each unit may refer to the corresponding description in the foregoing method embodiments, and for convenience and brevity of description, the description is omitted here.
As can be seen from the above, in terms of hardware implementation, the above request generating unit 101, the reading unit 102, the classifying unit 103, the processing unit 104, and the like may be embedded in hardware or may be independent from the device for messaging docking processing, or may be stored in software in a memory of the messaging docking processing device, so that the processor invokes and executes the operations corresponding to the above units. The processor may be a Central Processing Unit (CPU), microprocessor, single-chip microcomputer, etc.
The above-described messaging docking processing apparatus may be implemented in the form of a computer program that is executable on a computer device as shown in fig. 7.
Fig. 7 is a schematic structural diagram of a computer device according to the present invention. The device can be a terminal or a server, wherein the terminal can be an electronic device with a communication function, such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant, a wearable device and the like. The server may be an independent server or a server cluster formed by a plurality of servers.
With reference to FIG. 7, the computer device 400 includes a processor 402, memory, internal memory 404, and a network interface 405 connected by a system bus 401, where the memory may include a non-volatile storage medium 403 and internal memory 404.
The non-volatile storage medium 403 may store an operating system 4031 and a computer program 4032, the computer program 4032 comprising program instructions that, when executed, cause the processor 402 to perform a messaging docking process.
The processor 402 is used to provide computing and control capabilities, supporting the operation of the overall computer device 400.
The internal memory 404 provides an environment for the execution of a computer program 4032 in the non-volatile storage medium 403, which computer program 4032, when executed by the processor 402, causes the processor 402 to perform a messaging docking process.
The network interface 405 is used for network communication with other devices. It will be appreciated by those skilled in the art that the architecture shown in fig. 7 is merely a block diagram of some of the architecture relevant to the present inventive arrangements and is not limiting of the computer device 400 to which the present inventive arrangements may be implemented, and that a particular computer device 400 may include more or less components than those shown, or may combine some of the components, or have a different arrangement of components.
Wherein the processor 402 is configured to execute a computer program 4032 stored in the memory to implement the steps of: generating corresponding message sending requests according to the message sending instructions, wherein each message sending request comprises at least one message event; reading all message events in the message sending request to determine the mark information associated with each message event; classifying all message events according to the mark information, and sequentially sending the message events to corresponding message queues in the message middleware for storage, wherein the message events with the same mark information are the same type of message events, and each message queue only comprises the same type of message events; and sequentially reading the message event positioned at the first position in each message queue according to a preset rule, and sending the message event to a processing server corresponding to the mark information of the message event in the server cluster for processing.
In an embodiment, the server cluster includes a plurality of processor servers, and when the processor 402 is implemented to sequentially read the message event located at the first position in each message queue according to a preset rule, to send the message event to a processing server corresponding to the flag information of the message event in the server cluster for processing, the following steps are specifically implemented: ordering the message events in each list of message queues according to the storage time of the message events; reading the first message event in each message queue in turn; and sending the read message event to a processing server corresponding to the mark information of the message event for processing.
In one embodiment, before implementing the step of reading the first message event in each message queue in turn, the processor 402 specifically implements the following steps: if there are message queues with the number of the message events being larger than a first preset value, taking the message queues as first message queues; judging whether the server cluster comprises a processing server with idle threads or not; if the server cluster comprises processing servers with idle threads, determining the number of the idle threads; and reading message events matched with the number of the idle threads from the first message queue, and sending the message events to a corresponding processing server with the idle threads for processing.
In one embodiment, the processor 402 further implements the steps of: if the server cluster does not comprise a processing server of an idle thread, determining another message queue with the number of message events smaller than a second preset value as a second message queue, wherein the second preset value is smaller than the first preset value; when the first message event in the second message queue is read, the first message event in the first message queue is read to replace the first message event in the second message queue, and the first message event is sent to a processing server corresponding to the second message queue.
In one embodiment, before implementing the step of reading, according to a preset rule, the message event located at the first position in each message queue in sequence, so as to send the message event to a processing server corresponding to the flag information of the message event in the server cluster, the processor 402 specifically implements the following steps: judging whether the message event comprises priority information or not; and if the message event comprises the priority information, adjusting the position of the existing message event in the corresponding message queue so that the message event comprising the priority information is stored in the first position of the message queue.
It should be appreciated that in embodiments of the present application, the Processor 402 may be a central processing unit (Central Processing Unit, CPU), the Processor 402 may also be other general purpose processors, digital signal processors (DIGITAL SIGNAL processors, DSPs), application SPECIFIC INTEGRATED Circuits (ASICs), off-the-shelf Programmable gate arrays (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. Wherein the general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Those skilled in the art will appreciate that all or part of the flow in a method embodying the above described embodiments may be accomplished by computer programs instructing the relevant hardware. The computer program comprises program instructions, and the computer program can be stored in a storage medium, which is a computer readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the flow steps of the embodiments of the method described above.
Accordingly, the present invention also provides a storage medium. The storage medium may be a computer readable storage medium. The storage medium stores a computer program, wherein the computer program includes program instructions. The program instructions, when executed by the processor, cause the processor to perform the steps of: generating corresponding message sending requests according to the message sending instructions, wherein each message sending request comprises at least one message event; reading all message events in the message sending request to determine the mark information associated with each message event; classifying all message events according to the mark information, and sequentially sending the message events to corresponding message queues in the message middleware for storage, wherein the message events with the same mark information are the same type of message events, and each message queue only comprises the same type of message events; and sequentially reading the message event positioned at the first position in each message queue according to a preset rule, and sending the message event to a processing server corresponding to the mark information of the message event in the server cluster for processing.
In an embodiment, the server cluster includes a plurality of processor servers, and when executing the program instruction to implement the step of sequentially reading, according to a preset rule, a message event located at a first position in each message queue, so as to send the message event to a processing server corresponding to flag information of the message event in the server cluster for processing, the specific implementation steps include: ordering the message events in each list of message queues according to the storage time of the message events; reading the first message event in each message queue in turn; and sending the read message event to a processing server corresponding to the mark information of the message event for processing.
In one embodiment, before executing the program instructions to implement the step of reading the first message event in each message queue in turn, the processor further implements the following steps: if there are message queues with the number of the message events being larger than a first preset value, taking the message queues as first message queues; judging whether the server cluster comprises a processing server with idle threads or not; if the server cluster comprises processing servers with idle threads, determining the number of the idle threads; and reading message events matched with the number of the idle threads from the first message queue, and sending the message events to a corresponding processing server with the idle threads for processing.
In one embodiment, the processor further performs the steps of: if the server cluster does not comprise a processing server of an idle thread, determining another message queue with the number of message events smaller than a second preset value as a second message queue, wherein the second preset value is smaller than the first preset value; when the first message event in the second message queue is read, the first message event in the first message queue is read to replace the first message event in the second message queue, and the first message event is sent to a processing server corresponding to the second message queue.
In an embodiment, before executing the program instruction to implement the step of sequentially reading the first message event in each message queue according to a preset rule, to send the first message event to a processing server corresponding to the flag information of the message event in the server cluster for processing, the processor further implements the following steps: judging whether the message event comprises priority information or not; and if the message event comprises the priority information, adjusting the position of the existing message event in the corresponding message queue so that the message event comprising the priority information is stored in the first position of the message queue.
The storage medium may be a U-disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disk, or other various computer-readable storage media that can store program codes.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps described in connection with the embodiments disclosed herein may be embodied in electronic hardware, in computer software, or in a combination of the two, and that the elements and steps of the examples have been generally described in terms of function in the foregoing description to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the several embodiments provided by the present invention, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the device embodiments described above are merely illustrative. For example, the division of each unit is only one logic function division, and there may be another division manner in actual implementation. For example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed.
The steps in the method of the embodiment of the invention can be sequentially adjusted, combined and deleted according to actual needs. The units in the device of the embodiment of the invention can be combined, divided and deleted according to actual needs. In addition, each functional unit in the embodiments of the present invention 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 unit may be stored in a storage medium if implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, the technical solution of the present invention is essentially or a part contributing to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a terminal, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention.
While the invention has been described with reference to certain preferred embodiments, it will be understood by those skilled in the art that various changes and substitutions of equivalents may be made and equivalents will be apparent to those skilled in the art without departing from the scope of the invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.

Claims (5)

1. A method of messaging docking processing, the method comprising:
generating corresponding message sending requests according to the message sending instructions, wherein each message sending request comprises at least one message event;
Reading all message events in the message sending request to determine mark information associated with each message event, wherein the mark information comprises a name and/or a numerical code and/or a letter code with mark;
Classifying all message events according to the mark information, and sequentially sending the message events to corresponding message queues in the message middleware for storage, wherein the message events with the same mark information are the same type of message events, and each message queue only comprises the same type of message events;
sequentially reading the first message event in each message queue according to a preset rule, and sending the first message event to a processing server corresponding to the mark information of the message event in the server cluster for processing;
the server cluster includes a plurality of processor servers, and the first message event in each message queue is sequentially read according to a preset rule, so as to be sent to a processing server corresponding to the sign information of the message event in the server cluster for processing, including:
ordering the message events in each list of message queues according to the storage time of the message events;
If there are message queues with the number of the message events being larger than a first preset value, taking the message queues as first message queues;
Judging whether the server cluster comprises a processing server with idle threads or not;
If the server cluster comprises processing servers with idle threads, determining the number of the idle threads;
Reading message events matched with the number of the idle threads from the first message queue, and sending the message events to a corresponding processing server with the idle threads for processing;
If the server cluster does not comprise a processing server of an idle thread, determining another message queue with the number of message events smaller than a second preset value as a second message queue, wherein the second preset value is smaller than the first preset value;
When the first message event in the second message queue is read, the first message event in the first message queue is read to replace the first message event in the second message queue, and the first message event is sent to a processing server corresponding to the second message queue;
Reading the first message event in each message queue in turn;
And sending the read message event to a processing server corresponding to the mark information of the message event for processing.
2. The method of claim 1, wherein the step of sequentially reading the first message event in each message queue according to a preset rule, before sending the first message event to a processing server corresponding to the flag information of the message event in the server cluster for processing, further comprises:
Judging whether the message event comprises priority information or not;
And if the message event comprises the priority information, adjusting the position of the existing message event in the corresponding message queue so that the message event comprising the priority information is stored in the first position of the message queue.
3. A messaging docking processing apparatus, the apparatus comprising:
A request generating unit, configured to generate corresponding message sending requests according to the message sending instructions, where each message sending request includes at least one message event;
A reading unit, configured to read all message events in the message sending request, so as to determine flag information associated with each message event, where the flag information includes a name and/or a numerical code and/or an alphabetic code with a flag;
The classifying unit is used for classifying all the message events according to the mark information and sequentially sending the message events to corresponding message queues in the message middleware for storage, wherein the message events with the same mark information are the same type of message events, and each message queue only comprises the same type of message events;
The processing unit is used for sequentially reading the first message event in each message queue according to a preset rule, and sending the first message event to a processing server corresponding to the mark information of the message event in the server cluster for processing;
Wherein, the server cluster includes a plurality of processor servers, the processing unit includes:
the ordering unit is used for ordering the message events in each list of message queues according to the storage time of the message events;
the first judging unit is used for taking the message queue as a first message queue if the message queue with the number of the message events being larger than a first preset value exists;
A second judging unit, configured to judge whether the server cluster includes a processing server with an idle thread;
a first determining unit, configured to determine, if the server cluster includes a processing server that is an idle thread, the number of idle threads;
the adjusting unit is used for reading message events matched with the number of the idle threads from the first message queue and sending the message events to a corresponding processing server with the idle threads for processing;
a second determining unit, configured to determine, if the server cluster does not include a processing server with an idle thread, another message queue with a number of message events smaller than a second preset value as a second message queue, where the second preset value is smaller than the first preset value;
A replacing unit, configured to, when a message event located at the first position in the second message queue is read, read the message event located at the first position in the first message queue to replace the message event located at the first position in the second message queue, and send the message event to a processing server corresponding to the second message queue;
the event reading unit is used for reading the first message event in each message queue in turn;
and the sending unit is used for sending the read message event to a processing server corresponding to the mark information of the message event for processing.
4. A computer device, characterized in that it comprises a memory on which a computer program is stored and a processor which, when executing the computer program, implements the method according to any of claims 1-2.
5. A computer readable storage medium, characterized in that the storage medium stores a computer program comprising program instructions which, when executed by a processor, can implement the method of any of claims 1-2.
CN201811122032.3A 2018-09-26 2018-09-26 Method and device for processing informationized docking, computer equipment and storage medium Active CN109388504B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811122032.3A CN109388504B (en) 2018-09-26 2018-09-26 Method and device for processing informationized docking, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811122032.3A CN109388504B (en) 2018-09-26 2018-09-26 Method and device for processing informationized docking, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109388504A CN109388504A (en) 2019-02-26
CN109388504B true CN109388504B (en) 2024-07-02

Family

ID=65419133

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811122032.3A Active CN109388504B (en) 2018-09-26 2018-09-26 Method and device for processing informationized docking, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109388504B (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110347520A (en) * 2019-06-28 2019-10-18 北京大米科技有限公司 Method, apparatus, electronic equipment and the medium of message distribution
CN110413696A (en) * 2019-08-02 2019-11-05 中国工商银行股份有限公司 A kind of data processing method and device
CN110648046A (en) * 2019-08-16 2020-01-03 中国平安财产保险股份有限公司 Service processing scheduling method and device, computer equipment and storage medium
CN110505315A (en) * 2019-09-27 2019-11-26 北京锐安科技有限公司 Data processing method, device, equipment and storage medium
CN110765167B (en) * 2019-10-23 2022-07-22 泰康保险集团股份有限公司 Policy data processing method, policy data processing device and policy data processing equipment
CN111491015B (en) * 2020-03-31 2022-11-11 北京金山云网络技术有限公司 Preheating task processing method and system, proxy server and service center
CN111723190A (en) * 2020-06-29 2020-09-29 深圳壹账通智能科技有限公司 Information interaction method, electronic device and storage medium
CN112256421B (en) * 2020-11-12 2024-06-18 Oppo广东移动通信有限公司 Communication processing method, device, storage medium and electronic equipment
CN112559211B (en) * 2020-12-16 2025-07-29 中国平安人寿保险股份有限公司 Method, device, computer equipment and storage medium for updating message data
CN112702227B (en) * 2020-12-17 2022-07-08 广州虎牙科技有限公司 Heartbeat event detection method, device, equipment and computer readable storage medium
CN113687956A (en) * 2021-07-23 2021-11-23 上海浦东发展银行股份有限公司 Message routing distribution method and device, computer equipment and storage medium
CN116048828B (en) * 2022-05-26 2023-10-20 荣耀终端有限公司 Method for processing drawing message, electronic device and storage medium
CN115834663A (en) * 2022-11-29 2023-03-21 中国建设银行股份有限公司 Message processing method, device, equipment and medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102215177A (en) * 2011-05-31 2011-10-12 广州华多网络科技有限公司 Method and device for processing system message of instant communication software
CN102915254A (en) * 2011-08-02 2013-02-06 中兴通讯股份有限公司 Task management method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9224111B2 (en) * 2011-02-25 2015-12-29 Red Hat, Inc. Message queue based product asset management auditing system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102215177A (en) * 2011-05-31 2011-10-12 广州华多网络科技有限公司 Method and device for processing system message of instant communication software
CN102915254A (en) * 2011-08-02 2013-02-06 中兴通讯股份有限公司 Task management method and device

Also Published As

Publication number Publication date
CN109388504A (en) 2019-02-26

Similar Documents

Publication Publication Date Title
CN109388504B (en) Method and device for processing informationized docking, computer equipment and storage medium
US11750444B2 (en) Implementation of compliance settings by a mobile device for compliance with a configuration scenario
CN109271265B (en) Request processing method, device, equipment and storage medium based on message queue
CN108776934B (en) Distributed data calculation method and device, computer equipment and readable storage medium
US9338309B2 (en) Operating system supporting cost aware applications
US8352546B1 (en) Contextual and location awareness for device interaction
CN112653618B (en) Gateway registration method and device of micro-service application API (application program interface) endpoint
US11089007B2 (en) Role-based resource access control
CN110222107B (en) Data transmission method and related equipment
US20120158947A1 (en) Operating system supporting cost aware applications
CN109388657B (en) Data processing method, device, computer equipment and storage medium
CN107943854A (en) Reference service inquiry method, apparatus and computer-readable recording medium
JP7474273B2 (en) Using a client computer for document processing
JPWO2012127987A1 (en) Information monitoring apparatus and information monitoring method
WO2025124273A1 (en) Security audit method for distributed database and related device
CN109600250B (en) Service system fault notification method, device, electronic device and storage medium
CN109818920B (en) Mail auditing method and device, computer equipment and computer readable storage medium
CN115134328B (en) Corner mark configuration method and device, computer equipment and readable storage medium
CN115510427B (en) Cross-platform process running credible monitoring method and system
CN107333286B (en) Wifi hotspot connection management method and device and terminal equipment
CN107678928B (en) Application program processing method and server
US20180123866A1 (en) Method and apparatus for determining event level of monitoring result
CN109272218B (en) Method, device, computer equipment and storage medium for batch rating bonds
US8775541B2 (en) Mail manufacturing virtualization
CN104811391B (en) Data packet processing method and device and server

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
GR01 Patent grant