CN111274047A - Information processing method, terminal, system, computer device and storage medium - Google Patents

Information processing method, terminal, system, computer device and storage medium Download PDF

Info

Publication number
CN111274047A
CN111274047A CN202010049302.3A CN202010049302A CN111274047A CN 111274047 A CN111274047 A CN 111274047A CN 202010049302 A CN202010049302 A CN 202010049302A CN 111274047 A CN111274047 A CN 111274047A
Authority
CN
China
Prior art keywords
information
consumed
identification number
unique identification
sending
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
CN202010049302.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 Property and Casualty Insurance Company of China Ltd
Original Assignee
Ping An Property and Casualty Insurance Company of China 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 Property and Casualty Insurance Company of China Ltd filed Critical Ping An Property and Casualty Insurance Company of China Ltd
Priority to CN202010049302.3A priority Critical patent/CN111274047A/en
Publication of CN111274047A publication Critical patent/CN111274047A/en
Pending legal-status Critical Current

Links

Images

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
    • 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/544Buffers; Shared memory; Pipes

Landscapes

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

Abstract

The application relates to the field of operation and maintenance, specifically uses system performance optimization, and discloses an information processing method, a terminal, an information processing system, computer equipment and a computer readable and storage medium, wherein the method comprises the following steps: generating information to be consumed, confirmation information corresponding to the information to be consumed and a unique identification number for identifying the information to be consumed and the confirmation information; sending the information to be consumed and the corresponding unique identification number to a prepared information queue for caching; and sending the confirmation information corresponding to the unique identification number to a RockettMQ service component so that the RockettMQ service component releases the information to be consumed corresponding to the unique identification number in the preparation information queue to a first target terminal for consumption. The method and the system adopt the RocktMQ to carry out system communication and adopt a global unique identification number to reduce the occurrence of message sending failure caused by id repetition.

Description

Information processing method, terminal, system, computer device and storage medium
Technical Field
The present application relates to the field of information interaction technologies, and in particular, to an information processing method, a terminal, an information processing system, a computer device, and a computer-readable storage medium.
Background
At present, with the development of microservices becoming prominent and the application of the emerging message queue becoming more popular, RabbitMQ is a message middleware based on the AMQP protocol, which can provide reliable message transmission between applications. The method has excellent performances in usability, expansibility and high availability, and is widely applied.
However, current RabbitMQ clients are designed for a single RabbitMQ server, and as the scope of service provision expands, clusters of RabbitMQ servers can now be deployed to increase the availability of RabbitMQ services, and a RabbitMQ client connected to any one server in the cluster can send and receive messages. The RabbitMQ is a reusable enterprise message system completed on the basis of the AMQP protocol, wherein MQ (message queue) is a communication method of an application program to the application program.
Each RabbitMQ client is designed for a single RabbitMQ server, that is, a fixedly connected RabbitMQ server is allocated to each RabbitMQ client in the initial period, and if one server in the cluster is down, all RabbitMQ clients connected to the server are disconnected. That is, although the RabbitMQ server cluster provides high available services, each RabbitMQ client establishes a fixed connection with only one of the RabbitMQ servers, and once a single-node failure occurs, the RabbitMQ service is interrupted as before.
If the RabbitMQ message queue is directly applied to the main service, the connection between the main service and the RabbitMQ service is interrupted due to various reasons such as unstable network, so that a false death phenomenon is caused, and even the service is crashed.
Therefore, when the RabbitMQ uses message service, mail, APP push or general asynchronous task inside an enterprise, smooth communication cannot be performed inside the enterprise due to one or more reasons, so that the use of the user is affected, and even unpredictable loss is brought, so that inconvenience is brought to the user.
Disclosure of Invention
The present application provides an information processing method, terminal, information processing system, computer device, and storage medium to effectively solve the above technical problems.
In a first aspect, the present application provides an information processing method, including:
generating information to be consumed, confirmation information corresponding to the information to be consumed and a unique identification number for identifying the information to be consumed and the confirmation information;
sending the information to be consumed and the corresponding unique identification number to a prepared information queue for caching;
and sending the confirmation information corresponding to the unique identification number to a RockettMQ service component so that the RockettMQ service component releases the information to be consumed corresponding to the unique identification number in the preparation information queue to a first target terminal for consumption.
In a second aspect, the present application further provides a terminal, including:
the information generating module is used for generating information to be consumed, confirmation information corresponding to the information to be consumed and a unique identification number for identifying the information to be consumed and the confirmation information;
the information sending module is used for sending the information to be consumed and the corresponding unique identification number to a prepared information queue for caching;
and the confirmation sending module is used for sending the confirmation information with the unique identification number to the RockettMQ service component so that the RockettMQ service component releases the information to be consumed corresponding to the unique identification number in the preparation information queue to a first target terminal for consumption.
In a third aspect, the present application further provides an information processing system, which includes a plurality of terminals as described in the second aspect.
In a fourth aspect, the present application further provides a computer device comprising a memory and a processor;
the memory is used for storing a computer program;
the processor is configured to execute the computer program and implement the information processing method as described above when executing the computer program.
In a fifth aspect, the present application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to implement the information processing method as described above.
The application discloses an information processing method, a terminal, an information processing system, a computer device and a storage medium, wherein the information to be consumed, confirmation information corresponding to the information to be consumed and a unique identification number for identifying the information to be consumed and the confirmation information are generated; and then sending the information to be consumed and the corresponding unique identification number to a prepared information queue for caching, and finally sending the confirmation information corresponding to the unique identification number to a RockketMQ service component so that the RockketMQ service component releases the cached information to be consumed corresponding to the unique identification number to a first target terminal for consumption. The method and the system adopt the RocktMQ to carry out system communication, adopt a global unique identification number, and achieve the situation that the id is repeated to cause message sending failure, and the method and the system can be suitable for message service, mails, APP push or general asynchronous tasks and the like.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic block diagram of an information handling system provided by an embodiment of the present application;
FIG. 2 is a flow chart illustrating steps of an information processing method according to an embodiment of the present application;
FIG. 3 is a flow chart illustrating steps of another information processing method provided by an embodiment of the present application;
fig. 4 is a schematic block diagram of a terminal that is also provided by an embodiment of the present application;
fig. 5 is a schematic block diagram of a structure of a computer device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The flow diagrams depicted in the figures are merely illustrative and do not necessarily include all of the elements and operations/steps, nor do they necessarily have to be performed in the order depicted. For example, some operations/steps may be decomposed, combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
Some embodiments of the present application will be described in detail below with reference to the accompanying drawings. The embodiments described below and the features of the embodiments can be combined with each other without conflict.
Referring to fig. 1, fig. 1 is a schematic block diagram of an information processing system according to an embodiment of the present disclosure. The information processing method provided by the application can be applied to the information processing system.
As shown in fig. 1, the information processing system 100 includes a transmitting terminal 101, a target terminal 102, and a rockmq service component 103. The transmitting terminal 101, the rockmq service component 103, and the target terminal 102 are connected in sequence. However, it should be noted that the information processing system may further include more than two terminals, and the number of terminals in the information processing system is not limited herein in the present application.
The sending terminal 101 is configured to generate information to be consumed, confirmation information corresponding to the information to be consumed, and a unique identification number for identifying the information to be consumed and the confirmation information.
The sending terminal 101 is further connected with a Zookeeper component 104, and the sending terminal 101 sends the generated information to be consumed and the unique identification number corresponding to the information to be consumed to a prepared information queue of the Zookeeper component 104 for caching.
The sending terminal 101 sends the confirmation information corresponding to the unique identification number to the RocketMQ service component 103, so that the RocketMQ service component 103 coordinates the Zookeeper component 104 to release the information to be consumed, which is cached in the prepared information queue and corresponds to the unique identification number, to the target terminal 102 for consumption.
The sending terminal 101 sends a message to the rockmq service component 103, if the message is sent successfully, the rockmq service component 103 sends acknowledgement information (ACK) to the target terminal 102, and the target terminal 102 executes a local task after receiving the acknowledgement information; if the message transmission fails, the rockmq service component 103 is notified to call back the transmission terminal 101, and whether to perform message rollback or resend the acknowledgement information is judged.
In some embodiments, the information processing system may further include a first database 105 for storing the confirmation information corresponding to the consumption information generated by the sending terminal and a second database 106 for storing the sequence indication information generated by the target terminal.
The information processing method provided by the present application will be described in detail below based on the information processing system.
Referring to fig. 2, fig. 2 is a schematic flowchart illustrating steps of an information processing method according to an embodiment of the present application, where the information processing method of the present application may be applied to short messages, emails, APP information push, third party payment platform service incoming and outgoing, asynchronous interaction tasks of various network online interaction systems, and the like, and specifically includes steps S201 to S203.
S201, generating information to be consumed, confirmation information corresponding to the information to be consumed and a unique identification number for identifying the information to be consumed and the confirmation information.
Specifically, the confirmation information is information for consuming some information to be consumed by the first target terminal.
The confirmation information corresponds to the information to be consumed one by one, namely each piece of information to be consumed corresponds to one confirmation information, and the information to be consumed and the corresponding confirmation information share the same unique identification number. In a specific implementation process, the unique identification number may be marked as a Message ID, and when the unique identification number is generated, the unique identification number may be generated in a distributed lock manner, so as to avoid existence of a duplicate ID, thereby avoiding a situation that Message transmission fails.
In some embodiments, a first database may be connected to the sending terminal, and the acknowledgement generated by the sending terminal may be stored in the first database connected to the sending terminal, and when a condition is reached, the acknowledgement may be automatically read from the first database and sent to the rockmq service component. By the method, the condition that the confirmation information of the sending terminal is lost due to system restart or network abnormity can be avoided, and the information to be consumed can be correspondingly consumed.
It is worth mentioning that when the confirmation information is stored in the first database, a sequential writing mode can be adopted, so that the addressing overhead of random reading and writing of the disk can be avoided.
S202, sending the information to be consumed and the corresponding unique identification number to a prepared information queue for caching.
Specifically, the prepared information queue refers to a prepared information queue of a Zookeeper component, the Zookeeper component is also a ZK component or a ZK, and the Zookeeper component can implement coordination work among distributed systems, for example, after a sending terminal sends a request, a listener can be registered for a value of a certain node on the Zookeeper component, once a first target terminal finishes processing, the value of the node is modified, and the sending terminal can receive notification feedback information immediately.
In some embodiments, after step S202, the method may further include:
setting the survival time of the information to be consumed; and if the information to be consumed is not consumed in the survival time, forwarding the information to be consumed to another prepared information queue.
Specifically, the dlx (dead client Extensions) of the rocktmq and the TTL (Time-To-Live Extensions) of the message may be utilized, the message To be consumed is firstly sent To the cache queue, then a TTL (Time To Live Time) is set, and if the message To be consumed is not consumed in the Live Time, the TTL is set To be forwarded To other cache queues; and then consuming and executing the task of the forwarded information to be consumed from the other queue, thereby achieving the effect of delaying consumption of one message.
It is not difficult to understand that, through this kind of mode, can avoid prior art every minute or every hour, go to run once and take out the condition that the order or other data that need handle were handled and are handled, raise the efficiency, can avoid moreover to sweep the storehouse when the data bulk greatly to move the extremely big pressure that causes to the database, this application is efficient, avoids appearing the result of repeated execution for the frequency of ageing and polling can balance the coordination processing.
And S203, sending the confirmation information corresponding to the unique identification number to a RockettMQ service component so that the RockettMQ service component releases the information to be consumed corresponding to the unique identification number in the prepared information queue to a first target terminal for consumption.
Specifically, the sending terminal sends the confirmation information corresponding to the unique identification number to the rocketMQ service component, so that the rocketMQ service component coordinates the Zookeeper component to release the information to be consumed, corresponding to the unique identification number, cached in the prepared information queue of the Zookeeper component to the first target terminal for consumption.
In the implementation, the first target terminal needs to maintain idempotency with the transmitting terminal. For example, the sending terminal sends a prepended message to the rockmq, and if the prepended message fails to be sent, the operation is directly cancelled; if the message is successfully sent, executing a local task, if the message is successfully sent, telling the RocktMQ to send an acknowledgement message (ACK), and if the message is failed, informing the RocktMQ to roll back the message and sending NACK; if the confirmation message is sent, the first target terminal receives the confirmation message at the moment and then executes the local task; the RocktMQ automatically polls all the prepended message callback interfaces at regular time, generally, whether a local task is executed before the database is downloaded can be checked, and if the local task is rolled back, the local task is rolled back; and if the first target terminal fails to consume, the first target terminal automatically and continuously retries until the first target terminal succeeds, or the rollback operation can be executed while the sending terminal also executes the rollback operation, or an alarm is sent to be manually rolled back and compensated by a human.
In the information processing method provided by this embodiment, information to be consumed, confirmation information corresponding to the information to be consumed, and a unique identification number for identifying the information to be consumed and the confirmation information are generated; and then sending the information to be consumed and the corresponding unique identification number to a prepared information queue for caching, and finally sending the confirmation information corresponding to the unique identification number to a RockketMQ service component so that the RockketMQ service component releases the cached information to be consumed corresponding to the unique identification number to a first target terminal for consumption. The method and the system adopt the RocktMQ to carry out system communication and adopt a global unique identification number to make the situation that the id is repeated to cause message sending failure absolutely impossible.
Referring to fig. 3, fig. 3 is a flowchart illustrating steps of another information processing method according to an embodiment of the present application.
S301, generating information to be consumed, confirmation information corresponding to the information to be consumed and a unique identification number for identifying the information to be consumed and the confirmation information.
Specifically, the confirmation information is information for consuming some information to be consumed by the first target terminal.
The confirmation information corresponds to the information to be consumed one by one, namely each piece of information to be consumed corresponds to one confirmation information, and the information to be consumed and the corresponding confirmation information share the same unique identification number. In a specific implementation process, the unique identification number may be marked as a Message ID, and when the unique identification number is generated, the unique identification number may be generated in a distributed lock manner, so as to avoid existence of a duplicate ID, thereby avoiding a situation that Message transmission fails.
S302, the information to be consumed and the corresponding unique identification number are sent to a prepared information queue for caching, and the sending countdown of the confirmation information is started.
Specifically, the confirmation information may automatically start a sending countdown when the sending terminal sends the information to be consumed and the corresponding unique identification number to the prepared information queue of the Zookeeper component for caching, so as to realize the timed consumption of the information to be consumed.
And S303, after the countdown of the sending of the confirmation information is finished, sending the confirmation information corresponding to the unique identification number to the RocketMQ service component, so that the RocketMQ service component releases the information to be consumed corresponding to the unique identification number in the preparation information queue to a first target terminal for consumption.
Specifically, after the countdown of the sending of the acknowledgement information is finished, the sending terminal automatically sends the acknowledgement information corresponding to the unique identification number to the RocketMQ service component, so that the rockemq service component coordinates the Zookeeper component to release the information to be consumed corresponding to the unique identification number, which is cached in the prepared information queue of the Zookeeper component, to the first target terminal for consumption. The first target terminal needs to maintain idempotency with the transmitting terminal. After the sending countdown of the confirmation information is finished, the sending terminal can automatically send the confirmation information to the RockettMQ service component so as to realize the timed consumption of the information to be consumed by the first target terminal.
S304, obtaining the returned sequence indication information when the information to be consumed is released.
Specifically, after the information to be consumed is released to the first target terminal, the first target terminal returns a sequence indication message to the sending terminal to prompt the sending terminal that the information to be consumed is consumed completely.
In some embodiments, how to confirm that the information to be consumed is consumed may be set by the second terminal, for example, an identifier may be recorded in Redis to indicate that the information to be consumed is consumed, or a node may be created in the Zookeeper component to represent that the information to be consumed has been processed, and at this time, if sending the repeated information to be consumed comes, the node creating the Zookeeper component may automatically report an error, thereby avoiding repeatedly consuming some information to be consumed.
Of course, on the side of the second terminal, a second database may also be provided for data storage.
It is understood that by recording an identifier, the application can monitor whether the information to be consumed is consumed or not by registering one listener, and the system performance is optimized.
S305, analyzing the sequence indication information to obtain a unique identification number of the sequence information to be consumed.
The sequence information to be consumed is the information to be consumed which is sequenced in the preparation information queue and is to be consumed, and it can be understood that the sequence information to be consumed is the same as the information to be consumed and has corresponding confirmation information and a unique identification number for identification. Specifically, after receiving the sequence indication information, the sending terminal parses the sequence indication information, thereby obtaining the unique identification number of the sequence information to be consumed, that is, the unique identification number of the next information to be consumed, which needs to be consumed.
S306, sending the confirmation information corresponding to the unique identification number to the RockettMQ service component, so that the RockettMQ service component obtains the sequence information to be consumed corresponding to the unique identification number from the prepared information queue, and releases the sequence information to be consumed to a second target terminal for consumption.
Specifically, the first target terminal and the second target terminal may be the same terminal or different terminals, and the information to be consumed in the sequence may be sent by the same sending terminal to the prepared information queue of the Zookeeper component for caching, or sent by different sending terminals to the prepared information queue of the Zookeeper component for caching.
It should be noted that two scenarios can be realized through steps S304 to S306, which are specifically as follows:
in a first scenario, it is assumed that A, B, C tasks of information to be consumed exist, a task B needs to wait for a task a to complete before execution, a task C needs to wait for a task B to complete before execution, at this time, the task a completes sending a sequence indication message to the task B, the task B receives the sequence indication message and then executes in sequence, and the task C executes in a similar manner in sequence, that is, the task C receives the sequence indication message returned by the task B and then executes, so that communication among a plurality of tasks is realized and the states of the tasks are intercommunicated.
Scenario two, many service contents involve mutual callbacks between the associated parties. After the opposite side system processes the result, the system only needs to monitor the topic of the specific type and then performs the program processing of the system, and does not need to add an interface modification gateway every time, which is beneficial to the decoupling and the expansion between the systems, such as the decoupling and the expansion between the user system and the short message system, and between the payment gateway and the processing system.
For example, a payment gateway may need to access payment functions, such as WeChat or Payment treasures, which typically inform the present system of the payment result in the form of a callback.
At this time, the payment gateway can be separated out, and the MQ informs the business system of the party to process.
If the system is assumed to set a score system, the user pays successfully, and adds the score to the user, at this time, the score system is only required to monitor the message topic and process the score as if, and the gateway layer code is not required to be modified.
It is worth noting that the method and the device for pushing the information can further set forwarding rules of the pushing information and the payment results so as to ensure that each interested queue can obtain the pushing information and the payment results.
In some embodiments, in order to ensure that the sending terminal is effectively connected to the rockmq service component, the following steps may be adopted to determine the validity of the connection:
receiving node return information from a service providing node of the connected RocktMQ service component; judging whether the time interval of receiving the information returned by the nodes of two adjacent times exceeds a preset time length or not; and if the time interval for receiving the information returned by the nodes at two adjacent times exceeds the preset time length, selecting another service providing node of the RockettMQ service component to establish connection.
The available node set comprises node identity information and connection establishment information of service providing nodes of all available RockettMQ service components in the cluster, and the available node set is stored in the MQ client locally in advance.
In addition, the method can also realize the automatic deployment of the RocktMQ service component: firstly, making a service installation package, such as installation files of components used or depended on in a service and configuration files of related scripts and components for installing, initializing, starting, stopping, restarting, updating, scaling and monitoring the components; in the process of defining the service installation package, performing personalized processing by using shell and freemarker languages; defining basic information of the service, and defining the basic information of the service on a service management platform; defining a service specification, defining the size of a service cluster, the role of nodes in the cluster and the configuration information of the nodes, and creating a corresponding virtual machine cluster by taking the specification as a template when a user applies for a service instance; defining multiple specifications for the same service to meet the requirements of different service application scenes; if the configured basic service information needs to be changed, the release state is converted into a recall state, editing is carried out again, and after the modification is finished, the service information is released again; and (3) installing a service instance, namely installing the service instance on a service management platform by a user, selecting a service specification and an access network when the instance is created, deleting the instance at any time in the creating process, and starting or stopping or managing the service instance by the user after the service instance is started.
In the information processing method provided by this embodiment, information to be consumed, confirmation information corresponding to the information to be consumed, and a unique identification number for identifying the information to be consumed and the confirmation information are generated; then sending the information to be consumed and the corresponding unique identification number to a prepared information queue for caching, and sending the confirmation information corresponding to the unique identification number to a RockketMQ service component so that the RockketMQ service component releases the cached information to be consumed corresponding to the unique identification number to a first target terminal for consumption; then, acquiring sequence indication information returned when the information to be consumed is released; analyzing the sequence indication information to obtain a unique identification number of another piece of information to be consumed; and finally, sending confirmation information corresponding to the unique identification number to the RockettMQ service component so that the RockettMQ service component acquires the information to be consumed corresponding to the unique identification number from the prepared information queue and releases the information to be consumed to a second target terminal for consumption. The system communication is carried out by adopting the RocktMQ, and a global unique identification number is adopted, so that the condition that the message sending fails due to the repeated id is absolutely impossible, the communication among a plurality of tasks can be realized, and the intercommunication of the states of the tasks is ensured.
Referring to fig. 4, fig. 4 is a schematic block diagram of a terminal, which is configured to execute the foregoing information processing method according to an embodiment of the present application. Wherein the terminal may be configured in a server or a terminal.
The server may be an independent server or a server cluster. The terminal can be an electronic device such as a mobile phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant and a wearable device.
As shown in fig. 4, the terminal 400 includes: an information generation module 401, an information transmission module 402 and an acknowledgement transmission module 403.
The information generating module 401 is configured to generate information to be consumed, confirmation information corresponding to the information to be consumed, and a unique identification number for identifying the information to be consumed and the confirmation information.
An information sending module 402, configured to send the information to be consumed and the corresponding unique identification number to a prepared information queue for caching.
A confirmation sending module 403, configured to send the confirmation information with the unique identification number to the RocketMQ service component, so that the RocketMQ service component releases the to-be-consumed information corresponding to the unique identification number in the preliminary information queue to the first target terminal for consumption.
Referring to fig. 5, fig. 5 is a schematic block diagram of a structure of a computer device according to an embodiment of the present disclosure. The computer device may be a server or a terminal.
Referring to fig. 5, the computer device includes a processor, a memory, and a network interface connected through a system bus, wherein the memory may include a nonvolatile storage medium and an internal memory.
The non-volatile storage medium may store an operating system and a computer program. The computer program includes program instructions that, when executed, cause a processor to perform any of the information processing methods.
The processor is used for providing calculation and control capability and supporting the operation of the whole computer equipment.
The internal memory provides an environment for running a computer program in the nonvolatile storage medium, which, when executed by the processor, causes the processor to execute any one of the information processing methods.
The network interface is used for network communication, such as sending assigned tasks and the like. Those skilled in the art will appreciate that the architecture shown in fig. 5 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
It should be understood that the Processor may be a Central Processing Unit (CPU), and the Processor may be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, etc. Wherein a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Wherein, in one embodiment, the processor is configured to execute a computer program stored in the memory to implement the steps of:
generating information to be consumed, confirmation information corresponding to the information to be consumed and a unique identification number for identifying the information to be consumed and the confirmation information; sending the information to be consumed and the corresponding unique identification number to a prepared information queue for caching; and sending the confirmation information corresponding to the unique identification number to a RockettMQ service component so that the RockettMQ service component releases the information to be consumed corresponding to the unique identification number in the preparation information queue to a first target terminal for consumption.
In one embodiment, after implementing that the rocktmq service component releases the information to be consumed corresponding to the unique identification number in the preliminary information queue to a first target terminal for consumption, the processor is further configured to implement:
acquiring sequence indication information returned when the information to be consumed is released; analyzing the sequence indication information to obtain a unique identification number of the sequence information to be consumed; and sending confirmation information corresponding to the unique identification number to the RockettMQ service component so that the RockettMQ service component acquires the sequence information to be consumed corresponding to the unique identification number from the prepared information queue and releases the sequence information to be consumed to a second target terminal for consumption.
In one embodiment, the processor, in effecting said generating a unique identification number for identifying the information to be consumed and the confirmation information, is adapted to effect:
and generating a unique identification number for identifying the information to be consumed and the confirmation information by adopting a distributed lock.
In one embodiment, the processor, in effecting said generating a unique identification number for identifying the information to be consumed and the confirmation information, is adapted to effect:
sending the information to be consumed and the corresponding unique identification number to a prepared information queue for caching, and starting the sending countdown of the confirmation information;
the processor is configured to implement, when sending the acknowledgement information with the unique identification number to the RocketMQ service component to enable the RocketMQ service component to release the to-be-consumed information corresponding to the unique identification number in the preliminary information queue to a first target terminal for consumption, that:
after the sending countdown of the confirmation information is finished, sending the confirmation information with the unique identification number to the RockettMQ service component, so that the RockettMQ service component releases the information to be consumed corresponding to the unique identification number in the preparation information queue to a first target terminal for consumption.
In one embodiment, after the sending of the information to be consumed and the corresponding unique identification number to a prepared information queue for buffering is implemented, the processor is further configured to implement:
setting the survival time of the information to be consumed; and if the information to be consumed is not consumed in the survival time, forwarding the information to be consumed to other prepared information queues.
In one embodiment, after implementing the sending of the acknowledgement information corresponding to the unique identification number to a RocketMQ service component, the processor is further configured to implement:
receiving node return information from a service providing node of the connected RocktMQ service component; judging whether the time interval of receiving the information returned by the nodes of two adjacent times exceeds a preset time length or not; and if the time interval for receiving the information returned by the nodes at two adjacent times exceeds the preset time length, selecting other service providing nodes of the RockettMQ service assembly to establish connection.
The embodiment of the application further provides a computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, the computer program comprises program instructions, and the processor executes the program instructions to realize any information processing method provided by the embodiment of the application.
The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiment, for example, a hard disk or a memory of the computer device. The computer readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the computer device.
While the invention has been described with reference to specific embodiments, the scope of the invention is not limited thereto, and those skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the invention. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. An information processing method characterized by comprising:
generating information to be consumed, confirmation information corresponding to the information to be consumed and a unique identification number for identifying the information to be consumed and the confirmation information;
sending the information to be consumed and the corresponding unique identification number to a prepared information queue for caching;
and sending the confirmation information corresponding to the unique identification number to a RockettMQ service component so that the RockettMQ service component releases the information to be consumed corresponding to the unique identification number in the preparation information queue to a first target terminal for consumption.
2. The information processing method according to claim 1, characterized in that: after the rocketMQ service component releases the information to be consumed corresponding to the unique identification number in the prepared information queue to a first target terminal for consumption, the method further comprises the following steps:
acquiring sequence indication information returned when the information to be consumed is released;
analyzing the sequence indication information to obtain a unique identification number of the sequence information to be consumed;
and sending confirmation information corresponding to the unique identification number to a RockettMQ service component so that the RockettMQ service component acquires the sequence information to be consumed corresponding to the unique identification number from the prepared information queue and releases the sequence information to be consumed to a second target terminal for consumption.
3. The information processing method according to claim 1, wherein the generating of the unique identification number for identifying the information to be consumed and the confirmation information includes:
and generating a unique identification number for identifying the information to be consumed and the confirmation information by adopting a distributed lock.
4. The information processing method according to claim 1, wherein said sending the information to be consumed and the corresponding unique identification number to a prepared information queue for buffering comprises,
sending the information to be consumed and the corresponding unique identification number to a prepared information queue for caching, and starting the sending countdown of the confirmation information;
sending the confirmation information with the unique identification number to a RockettMQ service component so that the RockettMQ service component releases the information to be consumed corresponding to the unique identification number in the preparation information queue to a first target terminal for consumption, wherein the consumption comprises the steps of,
after the sending countdown of the confirmation information is finished, sending the confirmation information with the unique identification number to the RockettMQ service component, so that the RockettMQ service component releases the information to be consumed corresponding to the unique identification number in the preparation information queue to a first target terminal for consumption.
5. The information processing method according to claim 1, wherein after sending the information to be consumed and the corresponding unique identification number to a prepared information queue for buffering, the method further comprises:
setting the survival time of the information to be consumed;
and if the information to be consumed is not consumed in the survival time, forwarding the information to be consumed to other prepared information queues.
6. The information processing method according to claim 1, wherein after said sending the acknowledgement information corresponding to the unique identification number to a RocketMQ service component, further comprising:
receiving node return information from a service providing node of the connected RocktMQ service component;
judging whether the time interval of receiving the information returned by the nodes of two adjacent times exceeds a preset time length or not;
and if the time interval for receiving the information returned by the nodes at two adjacent times exceeds the preset time length, selecting other service providing nodes of the RockettMQ service assembly to establish connection.
7. A terminal, characterized in that the terminal comprises:
the information generating module is used for generating information to be consumed, confirmation information corresponding to the information to be consumed and a unique identification number for identifying the information to be consumed and the confirmation information;
the information sending module is used for sending the information to be consumed and the corresponding unique identification number to a prepared information queue for caching;
and the confirmation sending module is used for sending the confirmation information with the unique identification number to the RockettMQ service component so that the RockettMQ service component releases the information to be consumed corresponding to the unique identification number in the preparation information queue to a first target terminal for consumption.
8. An information processing system, characterized in that it comprises a rockmq service component and several terminals according to claim 7.
9. A computer device, wherein the computer device comprises a memory and a processor;
the memory is used for storing a computer program;
the processor for executing the computer program and implementing the information processing method according to any one of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium, characterized in that a computer program is stored, which, when executed by a processor, causes the processor to implement the information processing method according to any one of claims 1 to 6.
CN202010049302.3A 2020-01-16 2020-01-16 Information processing method, terminal, system, computer device and storage medium Pending CN111274047A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010049302.3A CN111274047A (en) 2020-01-16 2020-01-16 Information processing method, terminal, system, computer device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010049302.3A CN111274047A (en) 2020-01-16 2020-01-16 Information processing method, terminal, system, computer device and storage medium

Publications (1)

Publication Number Publication Date
CN111274047A true CN111274047A (en) 2020-06-12

Family

ID=70997326

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010049302.3A Pending CN111274047A (en) 2020-01-16 2020-01-16 Information processing method, terminal, system, computer device and storage medium

Country Status (1)

Country Link
CN (1) CN111274047A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111901224A (en) * 2020-07-24 2020-11-06 中国平安财产保险股份有限公司 Method, device and equipment for loading delayed messages and computer readable storage medium
CN112187903A (en) * 2020-09-22 2021-01-05 华云数据控股集团有限公司 Message pushing method and device and message service system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111901224A (en) * 2020-07-24 2020-11-06 中国平安财产保险股份有限公司 Method, device and equipment for loading delayed messages and computer readable storage medium
CN112187903A (en) * 2020-09-22 2021-01-05 华云数据控股集团有限公司 Message pushing method and device and message service system

Similar Documents

Publication Publication Date Title
CN108449410B (en) Message management method, system and related device in cloud platform
CN108712501B (en) Information sending method and device, computing equipment and storage medium
WO2021104178A1 (en) Dynamic message pushing method and system and vehicle diagnosis server
CN109361525B (en) Method, device, control terminal and medium for restarting distributed deployment of multiple services
CN107577578B (en) Method, device and equipment for counting delay of NFS operation word and storage medium
CN112422497B (en) Message transmission method and device and computer equipment
CN112099935B (en) Task processing method and device
CN109783151B (en) Method and device for rule change
CN112667382A (en) Task scheduling method, device, equipment and storage medium
US11397632B2 (en) Safely recovering workloads within a finite timeframe from unhealthy cluster nodes
CN111274047A (en) Information processing method, terminal, system, computer device and storage medium
CN112187903B (en) Message pushing method and device and message service system
CN111200606A (en) Deep learning model task processing method, system, server and storage medium
CN103677988A (en) Multi-process communication method and system for software system
CN112328362A (en) Method for realizing function calculation service based on container technology
CN113468025A (en) Data warning method, system, device and storage medium
CN111988391A (en) Message sending method and device
CN108241616B (en) Message pushing method and device
CN117762652A (en) Distributed transaction processing method and device based on message middleware
CN116366634A (en) File downloading method, device, terminal, source server and medium
CN113645260A (en) Service retry method, device, storage medium and electronic equipment
US9450906B2 (en) Managing a messaging queue in an asynchronous messaging system
CN113535439B (en) Service request processing method, device, equipment and storage medium
CN112596761B (en) Service update release method and device and related equipment
CN112860449B (en) Method, system, equipment and medium for preventing restart caused by message overtime

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