Information processing method and device, electronic equipment and storage medium

By obtaining the attribute information of the messages to be processed and using traffic segmentation rules to determine the target task processing center, the problem of low efficiency of the task processing center when processing multiple types of messages is solved, and load balancing and resource optimization are achieved.

CN114265715BActive Publication Date: 2025-12-16BEIJING JINGDONG ZHENSHI INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111580396.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-22
Publication Date
2025-12-16
Estimated Expiration
2041-12-22

AI Technical Summary

Technical Problem

In existing technologies, task processing centers suffer from low message processing efficiency when handling large volumes and diverse types of messages.

Method used

By obtaining the target attribute information of the message to be processed, the target task processing center is determined from multiple task processing centers using pre-set traffic splitting rules, and the message is processed by that center, thus achieving message splitting and load balancing.

Benefits of technology

It improves message processing efficiency, expands the scenarios for handling multiple message types, enhances the applicability of the solution, and avoids resource waste.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114265715B_ABST
    Figure CN114265715B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose an information processing method and device, electronic equipment and a storage medium. The method comprises: when a to-be-processed message sent based on a task processing message queue is received, target attribute information of the to-be-processed message is acquired; wherein the task processing message queue comprises at least one to-be-processed message, and each to-be-processed message is generated based on a to-be-processed task; according to a pre-set traffic segmentation rule, a target task processing center matching the target attribute information is determined from at least one task processing center; and the to-be-processed message is processed based on the target task processing center to obtain a target processing result. The technical solution of the embodiments of the present application enables the target task processing center to process the corresponding to-be-processed message, thereby improving the order processing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the technical field of Internet of Things, and particularly relate to an information processing method and device, an electronic device and a storage medium. BACKGROUND

[0002] At present, with the rapid development of e-commerce, the processing efficiency of order tasks has become a key concern.

[0003] The existing processing of order tasks mainly adopts the following measures: after obtaining a business flow order task, a to-be-processed message corresponding to the order task is generated and added to a message sending queue, so that the business flow order is sent to a task processing center based on the message sending queue, and then the order is processed one by one by the task processing center.

[0004] The inventor found the following problems when implementing the technical solution based on the above-mentioned manner.

[0005] In actual application process, there are many to-be-processed messages in the message sending queue, and the types of to-be-processed messages are also various, for example, the message types include task cancellation messages and task sending messages, therefore, when the number and types of to-be-processed messages are both relatively large, the processing efficiency of messages is relatively low due to the processing capacity of the task processing center. SUMMARY

[0006] The present application provides an information processing method, device, electronic device and storage medium, so that the target task processing center can process the corresponding to-be-processed message, thereby improving the processing efficiency of the to-be-processed task corresponding to the to-be-processed message.

[0007] In a first aspect, the embodiments of the present application provide an information processing method, which comprises:

[0008] When receiving a to-be-processed message sent based on a task processing message queue, obtaining target attribute information of the to-be-processed message; wherein the task processing message queue comprises at least one to-be-processed message, and each to-be-processed message is generated based on a to-be-processed task;

[0009] According to a pre-set flow division rule, determining a target task processing center matched with the target attribute information from at least one task processing center;

[0010] Processing the to-be-processed message based on the target task processing center to obtain a target processing result.

[0011] In a second aspect, the embodiments of the present application further provide an information processing device, which comprises:

[0012] The target attribute information acquisition module is configured to acquire target attribute information of the to-be-processed message when receiving the to-be-processed message sent based on the task processing message queue; wherein the task processing message queue comprises at least one to-be-processed message, and each to-be-processed message is generated based on a to-be-processed task;

[0013] The target task processing center determination module is configured to determine a target task processing center matched with the target attribute information from the at least one task processing center according to a preset traffic splitting rule.

[0014] The to-be-processed message processing module is configured to process the to-be-processed message based on the target task processing center to obtain a target processing result.

[0015] In a third aspect, an electronic device is also provided, and the electronic device comprises:

[0016] one or more processors;

[0017] a storage device configured to store one or more programs,

[0018] When the one or more programs are executed by the one or more processors, the one or more processors implement the information processing method according to any of the embodiments of the present application.

[0019] In a fourth aspect, a storage medium containing computer executable instructions is also provided, and the computer executable instructions are used to execute the information processing method according to any of the embodiments of the present application when executed by a computer processor.

[0020] According to the technical scheme of the embodiments of the present application, when a to-be-processed message is received, the target attribute information of the message is acquired to determine the type of the message; according to a preset traffic splitting rule, a target task processing center matched with the target attribute information can be determined, and the to-be-processed task corresponding to the message is processed by the target task processing center to obtain a target processing result, thereby realizing the splitting of the message, upgrading the old message processing system to a new message processing system, balancing the load of each task processing center, improving the processing efficiency of the message, further expanding the scenario of processing multiple types of messages, and improving the applicability of the scheme. BRIEF DESCRIPTION OF DRAWINGS

[0021] In order to more clearly illustrate the technical scheme of the exemplary embodiments of the present application, the drawings needed in the description of the embodiments are briefly introduced as follows. Obviously, the drawings introduced are only a part of the drawings of the embodiments to be described by the present application, and not all the drawings. Those skilled in the art can obtain other drawings according to these drawings without creating creative labor.

[0022] Figure 1 A flowchart of an information processing method provided by the embodiment one of the present application;

[0023] Figure 2 A flowchart of an information processing method provided by the embodiment two of the present application;

[0024] Figure 3 A flowchart of an information processing method provided by the embodiment three of the present application;

[0025] Figure 4 A flowchart of an information processing method provided by the embodiment four of the present application;

[0026] Figure 5 A flowchart of an information processing method provided by the embodiment five of the present application;

[0027] Figure 6 A block diagram of an information processing device provided by the embodiment six of the present application;

[0028] Figure 7 A structural diagram of an electronic device provided by the embodiment seven of the present application. DETAILED DESCRIPTION

[0029] The present application will be further described below in conjunction with the accompanying drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application. In addition, it should be noted that, for the convenience of description, only the parts related to the present application are shown in the drawings, but not all the structures.

[0030] Embodiment one

[0031] Figure 1 A flowchart of an information processing method provided by the embodiment one of the present application, the embodiment can be applied to the case that each to-be-processed message sent by at least one task processing center to a message queue is processed, the method can be executed by an information processing device, the device can be realized in the form of software and / or hardware, and the hardware can be an electronic device, such as a mobile terminal, a PC terminal or a server, etc.

[0032] To clearly understand the technical solution of this embodiment, an exemplary application scenario can be provided first. After detecting a user's order, a task corresponding to the order can be generated and designated as a pending task. Simultaneously, to process this pending task later, a pending message corresponding to it can be generated and added to a message queue. The pending message is then sent to the task processing center based on the message queue, allowing the task processing center to process the pending task corresponding to the pending message. When the number of pending tasks is large, the number of pending messages generated and added to the task processing message queue is also large. The technical solution of this embodiment is implemented based on the above scenario. It can be understood that the task processing center in this embodiment can be defined as a center for processing logistics orders.

[0033] like Figure 1 As shown, the method specifically includes the following steps:

[0034] S110. When a message to be processed is received from the task processing message queue, obtain the target attribute information of the message to be processed.

[0035] When an order is detected, a corresponding pending task (such as the task corresponding to the placed order) can be created. For example, if a user obtains an electronic product on a platform, the system can create a task corresponding to that electronic product, and this task can be designated as a pending task. Those skilled in the art should understand that there are various ways to create tasks. It can be based on a specific application within the system to generate a corresponding project or program, or it can be based on generating a record corresponding to the task in a database. The specific method of task creation is selected according to the actual situation, and this embodiment does not impose specific limitations.

[0036] In this embodiment, after creating a corresponding pending task based on the task, a message corresponding to the pending task can also be generated and added to the message queue. It can be understood that each pending message is generated based on the pending task. Continuing with the above example, after creating a pending task for an electronic product ordered by a user, a pending message corresponding to that electronic product can be generated. Simultaneously, the task processing message queue can contain one or more pending messages. In practical applications, the number of pending messages is often quite large; therefore, multiple messages are sent through the task processing message queue.

[0037] From the perspective of a computer, a message queue (MQ) can be a first-in first-out data structure, which is a container for storing messages, and the messages are enqueued from the tail and dequeued from the head. For example, after user A places an order for an electronic product, user B places an order for a piece of clothing, and thus the electronic product-related pending message and the clothing-related pending message enter the message queue in turn, which is the enqueuing process. Correspondingly, the message queue sends the above two pending messages one by one according to the first-in first-out rule, which is the dequeuing process. Therefore, the task processing message queue can also be used as a forwarder in the message passing process.

[0038] When receiving the pending message, the target attribute information of the pending message can also be obtained. From the perspective of a computer, attribute information can be a descriptive property or characteristic of a pending message, which has properties such as data type, domain, and default value. In actual applications, attribute information can be information in the form of a field representing the type of a pending message, such as information representing whether the item ordered by a user is an electronic product or clothing. It can also be information representing the weight of a pending message, such as a first-level target attribute information corresponding to a pending message based on a relatively important order, and second-level target attribute information corresponding to a pending message based on an ordinary order. It should be noted that the corresponding attribute information can be adaptively generated when a pending message is generated based on a pending task, and each generated attribute information (such as multiple fields) is associated with the corresponding pending message and stored in a database in the form of a mapping table. When a pending message is received, the corresponding target attribute information can be determined by looking up the table.

[0039] S120, determining a target task processing center matching the target attribute information from at least one task processing center according to a pre-set flow splitting rule.

[0040] The task processing center can be a data processing center for processing tasks corresponding to each pending message, for example, an order center. Since the number of received pending messages is usually large and the types are diverse in actual applications, in order to solve the problem of bottleneck in data processing capacity of a single task processing center and achieve the technical effect of processing different pending messages with corresponding processing logic, at least one task processing center can be deployed. When there are multiple task processing centers, each center can be matched with the target attribute information of the pending message to determine whether it has the qualification or ability to process the pending message.

[0041] Before matching the attribute information of the to-be-processed message with the task processing center, a data flow splitting rule needs to be preset, and a data flow composed of multiple to-be-processed messages is split according to the rule, that is, the flow splitting rule is used to determine the task processing center to which the to-be-processed message belongs. For example, the data flow can be preliminarily analyzed and evaluated, and then the multiple to-be-processed messages are split in a vertical or horizontal manner. By presetting the flow splitting rule and determining the target task processing center matched with the target attribute information, the burden of each task processing center is reduced, and different businesses can be easily expanded, and the corresponding processing logic is set for different businesses.

[0042] For example, the task processing center is an order center A and B, which can process the to-be-processed message corresponding to an electronic product order and the to-be-processed message corresponding to a clothing order. Further, by matching the attribute information of the above two to-be-processed messages with the two order centers respectively, it can be determined that the order center A is the target task processing center of the to-be-processed message corresponding to the electronic product, and the order center B is the target task processing center of the to-be-processed message corresponding to the clothing.

[0043] It should be noted that the middleware can be deployed in the system to perform the above steps. In the middleware, the following can be set: when receiving a to-be-processed message, the target task processing center corresponding to the task is determined according to the pre-set flow splitting rule (such as a rule expression); when receiving a task cancellation message, the message splitting routing is queried based on the splitting module to determine the target task processing center for processing the task. At the same time, for the same to-be-processed task, if the task cancellation message arrives first, that is, the to-be-processed message corresponding to the task is not received, but the task cancellation message corresponding to the task is received first, the middleware can also cancel the to-be-processed task with complete processing logic.

[0044] S130, processing the to-be-processed message based on the target task processing center to obtain a target processing result.

[0045] Specifically, after the target task processing center processes the to-be-processed message based on a specific processing logic, the to-be-processed task can be marked as processed.

[0046] Continuing the above example, the order center A as the task processing center of the electronic product order can perform normal delivery processing on the to-be-processed message corresponding to the electronic product order; the order center B as the task processing center of the clothing order can perform no-stock feedback processing on the to-be-processed message corresponding to the clothing order, that is, the user's client receives the current no-stock feedback message.

[0047] The technical scheme of the embodiment, when receiving a to-be-processed message, acquires target attribute information of the message to explicitly determine the nature type of the message; according to a preset traffic segmentation rule, a target task processing center that matches the target attribute information can be determined, and the target task processing center processes a to-be-processed task corresponding to the message, and then a target processing result is obtained, the segmentation of the message is realized, and the old message processing system is upgraded to the new message processing system, that is, the segmentation of the to-be-processed task balances the load of each task processing center, improves the processing efficiency of the message, further expands the scene of processing multiple types of messages, and improves the applicability of the scheme.

[0048] Embodiment Two

[0049] Figure 2 The flowchart of the information processing method provided in Embodiment Two of the application, on the basis of the foregoing embodiment, through the determination of the existence of the target task cancellation message, the integrity of the processing logic is ensured in the process of processing the task, the system is avoided from issuing an article allocation instruction of a task that has been cancelled, and then the waste of human and logistics resources is avoided; when the cancellation message corresponding to the to-be-processed message is determined in the set, the task cancellation message is eliminated in the set, the search range of the subsequent to-be-processed message for searching the corresponding task cancellation message is reduced, and the processing efficiency of the task is improved. The specific implementation manner can be referred to the technical scheme of the embodiment. The same or corresponding technical terms as the foregoing embodiment are not described herein.

[0050] As shown in Figure 2 , the method specifically includes the following steps:

[0051] S210, when receiving a to-be-processed message sent based on a task processing message queue, acquiring data volume information and adaptive interface information carried in the to-be-processed message.

[0052] The attribute information of the to-be-processed message can include the data volume information and the adaptive interface information, therefore, in the process of generating the to-be-processed message based on the to-be-processed task, the data volume information and the adaptive interface information corresponding to the message are also adaptively generated and carried in the to-be-processed message in a specific manner. The data volume information can be detailed information of each to-be-processed task, for example, the source of the task or the type of the article involved in the task. The adaptive interface information is used to represent the interface protocol to which the to-be-processed message is adapted, that is, to determine whether the message complies with or meets the transmission requirements of the information exchange interface. It can be understood that different interfaces can lead to corresponding task processing centers. Therefore, in this step, the target attribute information of the to-be-processed message is determined by acquiring the data volume information and the adaptive interface information.

[0053] S220, determining a target task processing center matched with the target attribute information according to the data amount information, the adaptive interface information and the pre-set traffic splitting rule.

[0054] For example, when receiving a plurality of to-be-processed messages, the traffic is split according to the traffic splitting rule, and two to-be-processed messages associated with electronic product orders and clothing orders are determined, and the data amount information and the adaptive interface information of the two messages are obtained respectively, so that the system identifies which interface protocol the two messages are adapted to, and then determines the corresponding order center as the target task processing center of the to-be-processed message.

[0055] S230, receiving the to-be-processed message based on the target task processing center, and determining that there is a target task cancellation message corresponding to the to-be-processed message, then marking the to-be-processed task corresponding to the to-be-processed message as a cancellation state, and obtaining a task cancellation result.

[0056] In this embodiment, since the to-be-processed message is generated based on the to-be-processed task, it represents a received order, and correspondingly, when the user cancels the order, the system may also receive a task cancellation message for the order. Therefore, when the target task processing center receives the to-be-processed message, it also needs to determine the existence of the task cancellation message. If it is determined that there is a task cancellation message, the to-be-processed task is marked as a cancellation state, indicating that the order will not be processed.

[0057] For example, in the process of creating a to-be-processed task for an electronic product, label information (such as an order number) can be set for the task corresponding to the electronic product in the database. Since the to-be-processed message and the task cancellation message are both generated based on the to-be-processed task, the corresponding label information is also carried in these messages. When the target task processing center receives the to-be-processed message corresponding to the electronic product, the label information of other messages is traversed, and it can be determined whether there is a corresponding target task cancellation message. It can be understood that in addition to the to-be-processed message, other messages can be in a message queue or other task processing centers. When it is determined that there is a task cancellation message for the electronic product, the state information in the record corresponding to the electronic product in the database can be marked as a cancellation state, and a prompt of successful task cancellation is fed back to the client belonging to the user.

[0058] Through the determination of the existence of the target task cancellation message, the system avoids issuing an article allocation instruction for a task that has been cancelled, thereby avoiding the waste of human and logistics resources.

[0059] Optionally, when it is determined that the target task cancellation message corresponding to the to-be-processed message exists in the set of cached task cancellation messages, the to-be-processed task corresponding to the to-be-processed message is marked as a cancellation state, and the target task cancellation message is removed from the set of task cancellation messages, to obtain a task cancellation result.

[0060] In the above embodiment, the task processing center may have received a task cancellation message before processing the to-be-processed message. Therefore, for the task cancellation messages corresponding to multiple orders, a set can be constructed as a set of task cancellation messages, and the set is cached. When the cancellation message corresponding to the to-be-processed message is determined in the cached set, the task is not only marked as a cancellation state, but also the task cancellation message is removed from the set, which narrows the search range of the to-be-processed message for searching the corresponding task cancellation message in the subsequent process, and improves the processing efficiency of the task.

[0061] For example, in the set of cached task cancellation messages, there are three task cancellation messages corresponding to to-be-processed tasks A, B and C. When the target task processing center corresponding to A processes the to-be-processed message corresponding thereto, it is detected that the task cancellation message of the to-be-processed task A exists in the set, and therefore the task cancellation message is removed from the set. In the subsequent process, when other to-be-processed messages are processed, only the set including the task cancellation messages corresponding to to-be-processed tasks B and C needs to be searched.

[0062] Optionally, based on the target task processing center receiving the to-be-processed message and determining that no task cancellation message corresponding to the to-be-processed message exists, a target task corresponding to the to-be-processed message is generated, and the target task is taken as a target processing result.

[0063] In the embodiment, the target task can be understood as follows: when it is determined that no task cancellation message corresponding to the to-be-processed message exists, it indicates that the goods corresponding to the task need to be normally shipped.

[0064] The technical scheme of the embodiment ensures the integrity of the processing logic in the process of processing the task, avoids the system from issuing an order allocation instruction for goods of a task that has been cancelled, and further avoids the waste of human and logistics resources. When the cancellation message corresponding to the to-be-processed message is determined in the cached set, the task cancellation message is removed from the set, which narrows the search range of the to-be-processed message for searching the corresponding task cancellation message in the subsequent process, and improves the processing efficiency of the task.

[0065] Embodiment Three

[0066] As an optional embodiment of the above embodiment, Figure 3The flow chart of the information processing method provided in Embodiment Three of the present application can be introduced by taking a specific order receiving process as an example for the purpose of clear introduction of the technical solution, at this time, the messages in the task processing message queue are order receiving messages corresponding to various to-be-processed task orders.

[0067] Referring to Figure 3 When a user places an order, a corresponding to-be-processed task can be created according to the order, and a to-be-processed message MQ_Topic:X corresponding to the order can be generated according to the to-be-processed task. The message is issued by the task processing message queue. In the task processing message queue, there can be one or more to-be-processed messages. It can be understood that each to-be-processed message in the queue has a corresponding to-be-processed task (i.e. order).

[0068] Continuing to refer to Figure 3 In order to prevent the situation that a to-be-processed message and a task cancellation message are sent to a corresponding target task processing center at the same time, a concurrency prevention lock is set for the task processing message queue and the task cancellation message queue containing order cancellation messages.

[0069] Continuing to refer to Figure 3 When the to-be-processed message is in the task processing message queue, the target attribute information carried in the message is acquired. In actual application process, the data amount information and the adaptation interface information carried in the message can be acquired. The data amount information can be the detail information of the order, for example, the source of the order or the type of goods involved in the order. The adaptation interface information is used to represent the interface protocol adapted by the to-be-processed message, i.e. to determine whether the message complies with or meets the transmission requirements of the information exchange interface. It can be understood that different interfaces can lead to corresponding order centers. At the same time, each order center can be matched with the target attribute information of the message. Therefore, according to the pre-set traffic splitting rule, the traffic can be split, and after the target attribute information of the to-be-processed message is acquired, the order center matched with the target attribute information of the order receiving message can be determined.

[0070] Continuing to refer to Figure 3 When the to-be-processed message is processed by the order center A, the existence of the task cancellation message needs to be determined. When it is determined that there is no task cancellation message corresponding to the to-be-processed message, it indicates that the goods corresponding to the task need to be normally shipped.

[0071] Continuing to refer to Figure 3If it is determined that the task cancellation message exists, the to-be-processed task is marked as a cancellation state, indicating that the order is no longer processed and the corresponding goods are not allocated. At this time, from the computer point of view, the status parameter status corresponding to the task in the program is assigned a value of 1, representing that the order cancellation is successful. Alternatively, a cancellation result message MQ_Topic:Z is returned to the client to which the user belongs through the message queue. At this time, from the computer point of view, the status parameter status corresponding to the order in the program is assigned a value of -2, representing that the order does not exist.

[0072] Continuing to refer to Figure 3 When the to-be-processed message is processed by the order center B, it is also necessary to determine the existence of the task cancellation message. When it is determined that the task cancellation message corresponding to the to-be-processed message does not exist, the processing manner is the same as that of the order center A, which will not be described herein. Meanwhile, for the task cancellation messages corresponding to multiple orders, a set can be constructed as a task cancellation message set, and the set is cached. If it is determined that the corresponding task cancellation message exists in the set, not only the task is marked as a cancellation state, but also the task cancellation message is removed from the set.

[0073] The technical scheme of the embodiment determines that the target task corresponding to the order can be generated when it is determined that the task cancellation message does not exist, indicating that the order can be produced and delivered. When it is determined that the task cancellation message exists, not only the task is marked as a cancellation state and the result is fed back to the user client, but also the task cancellation message is removed from the set, ensuring the integrity of the processing logic in the task processing process and improving the order processing efficiency.

[0074] Embodiment Four

[0075] Figure 4 The flowchart of the information processing method provided in Embodiment Four of the application is based on the foregoing embodiments and includes not only a task processing message queue but also a task cancellation message queue. Compared with a large number of to-be-processed messages in the task processing message queue, the number of task cancellation messages in the task cancellation message queue is smaller. Therefore, the situation that the task cancellation message corresponding to the to-be-processed task is received first when the to-be-processed message corresponding to the to-be-processed task is not received can occur. The technical scheme disclosed in the embodiment can be used based on the above situation. The same or corresponding technical terms as those in the foregoing embodiments will not be described herein.

[0076] It should be noted that the task processing message queue and the task cancellation message queue can both include corresponding messages, or only one of the message queues can include messages. Regardless of which situation, the message transmission needs to be performed in a one-to-one message sending manner.

[0077] It should also be noted that the following specific implementation methods are not in any particular order. That is, messages in the pending message queue can be processed first, messages in the task cancellation message queue can be processed first, or messages in the two message queues can be processed intermittently.

[0078] like Figure 4 As shown, the method specifically includes the following steps:

[0079] S310. When a message to be processed is received from the task processing message queue, obtain the target attribute information of the message to be processed.

[0080] S320. Based on the pre-set traffic segmentation rules, determine the target task processing center that matches the target attribute information from at least one task processing center.

[0081] S330. The target task processing center processes the message to be processed to obtain the target processing result.

[0082] S340. When a task cancellation message is received based on the task cancellation message queue, determine whether a target task to be processed corresponding to the task cancellation message has been generated.

[0083] When a user cancels an order, the system receives a task cancellation message. Similar to pending messages, task cancellation messages are also sent from a corresponding message queue, which can serve as the task cancellation message queue. Upon receiving a task cancellation message, the system can determine whether a pending task for that order has already been generated using the tag information carried in the message.

[0084] Optionally, when a task cancellation message is received based on the task cancellation message queue, the message routing is queried based on the routing module to determine the target task processing center for processing the pending message corresponding to the task cancellation message, and to determine whether the target task processing center includes the pending target task.

[0085] In this embodiment, determining the target task processing center corresponding to the task cancellation message requires the use of a traffic splitting module to query the message traffic routing. In this embodiment, message traffic routing can be understood as a process within the network that determines the path from the task cancellation message to the corresponding target task processing center, and it has at least one physical port. In practical applications, when a task cancellation message is received, the message can be parsed to obtain the corresponding data packet. Based on the traffic splitting module, the message traffic routing corresponding to that data packet can be queried, and then, according to the queried path, it can be determined which task processing center the task corresponding to the task cancellation message belongs to. It can be understood that this process also achieves the determination of the business identity of the task corresponding to the message.

[0086] Further, if a to-be-processed target task corresponding to the task cancellation message has been generated, the to-be-processed target task is eliminated based on the target task processing center corresponding to the to-be-processed target task. If no to-be-processed target task corresponding to the task cancellation message has been generated, the task cancellation message is updated to the task cancellation message set of the corresponding to-be-selected target task processing center, so as to cancel the to-be-processed message in the task processing message queue based on the cancellation message in the task cancellation message set.

[0087] For example, when a task cancellation message for an order of an electronic product is received, if a to-be-processed target task corresponding to the electronic product has been generated in order center A for processing the to-be-processed message, the task is directly eliminated, so as to avoid the system processing the cancelled order. If no to-be-processed target task related to the order exists in any order center, it indicates that the to-be-processed message is not received, and the task cancellation message arrives first, thus, the task cancellation message indicating cancellation of the order of the electronic product needs to be updated to a specific task cancellation message set, and when the to-be-processed message corresponding to the order is detected in the task processing message queue, the to-be-processed message is cancelled.

[0088] Optionally, at least one to-be-selected target task processing center is determined according to the message attribute information of the task cancellation message; and the task cancellation message is updated to a task cancellation message set of the at least one to-be-selected target task processing center.

[0089] In this embodiment, in order to cancel the to-be-processed message in the task processing message queue, when the task cancellation message arrives first, the corresponding task processing center also needs to be determined, and the cancellation message needs to be updated to the task cancellation message set in the center, thus, the determined task processing center can be used as the to-be-selected target task processing center. The to-be-selected target task processing center is determined in a similar manner to the manner of determining the corresponding task processing center of the to-be-processed message, that is, the message attribute information is used as the matching basis, which will not be described herein again.

[0090] In this embodiment, the determined task processing center corresponding to the task cancellation message can be one or more. In the process of updating the task cancellation message to the corresponding set, the at least one to-be-selected target task processing center is a non-return target task processing center.

[0091] Optionally, the to-be-processed message in the task processing message queue that matches the cancellation message in the task cancellation message set is eliminated.

[0092] In the embodiment, if the task cancellation message arrives first and is cached in the corresponding task cancellation message set, and then a to-be-processed message appears in the task processing message queue in the subsequent process, the to-be-processed message is removed to avoid the system processing an order that has been cancelled.

[0093] When the task cancellation message is received, the existence of the to-be-processed target task is determined, the task is removed if the corresponding task exists, and the corresponding to-be-processed message in the task processing message queue is cancelled if the corresponding task does not exist. It can be understood that whether the task cancellation message arrives first or not, the system avoids processing a task that has been cancelled.

[0094] S350, a concurrency lock is set for the task cancellation message queue and the task processing message queue, so that the messages in the task message queue and the task processing message queue are not sent at the same time.

[0095] In the embodiment, the task cancellation message queue is used to send the task cancellation message, the task processing message queue is used to send the to-be-processed message, and for the same task, if the to-be-processed message and the task cancellation message are sent to the corresponding target task processing center at the same time, the system may create a related task according to the to-be-processed message and determine whether the to-be-processed target task has been generated according to the task cancellation message, thereby causing logical errors and wasting computing resources. Therefore, the concurrency lock is set for the task cancellation message queue and the task processing message queue to prevent the two kinds of messages from being sent to the corresponding target task processing center at the same time.

[0096] It should be noted that the above steps do not have an obvious sequence, for example, the concurrency lock can be added to the message queue first, and the messages in the message queue are executed in the locked state. The advantage of this setting is that the occurrence rate of the cancellation first is further reduced.

[0097] The technical scheme of the embodiment determines the existence of the to-be-processed target task when the task cancellation message is received, removes the task if the corresponding task exists, and cancels the corresponding to-be-processed message in the task processing message queue if the corresponding task does not exist. Whether the task cancellation message arrives first or not, the system avoids processing a task that has been cancelled. The concurrency lock is set for the task cancellation message queue and the task processing message queue to prevent the two kinds of messages from being sent to the corresponding target task processing center at the same time.

[0098] Embodiment Five

[0099] As an optional embodiment of the above embodiment, Figure 5The flow chart of the information processing method provided in Embodiment Five of the present application can be introduced by taking a specific order cancellation process as an example for the purpose of clarity, in which case the messages in the task cancellation message queue are order cancellation messages corresponding to various to-be-processed task orders.

[0100] Referring to Figure 5 When the user cancels the order, the system can receive the task cancellation message MQ_Topic:Y corresponding to the order and delivered through the message queue, which is issued by the task cancellation message queue. In the task cancellation message queue, there can be one or more task cancellation messages, and it can be understood that each task cancellation message corresponds to an order. Similarly, in order to prevent the situation in which the to-be-processed message and the task cancellation message are sent to the corresponding target task processing center at the same time, the anti-concurrent lock is set for the task processing message queue and the task cancellation message queue containing the order cancellation message.

[0101] Referring to Figure 5 When determining the target task processing center corresponding to the task cancellation message, the shunting module needs to be used to query the message shunting route. Specifically, when the system receives the task cancellation message, the message can be parsed to obtain the corresponding data packet, the shunting module is queried based on the data packet to obtain the message shunting route corresponding to the data packet, and then the path obtained by the query is used to determine which task processing center the task cancellation message corresponds to. It can be understood that the business identity of the task corresponding to the message is also determined in this process.

[0102] Referring to Figure 5 When the system determines that the order center B is the target task processing center for processing the to-be-processed message corresponding to the task cancellation message based on the shunting module, it is also necessary to determine whether the target task processing center has generated the to-be-processed target task corresponding to the order. When it is determined that the order center has generated the to-be-processed target task corresponding to the task cancellation message, the to-be-processed target task is removed based on the target task processing center corresponding to the to-be-processed target task. If the to-be-processed target task corresponding to the task cancellation message has not been generated, the task cancellation message is updated to the task cancellation message set of the corresponding to-be-selected target task processing center, so as to cancel the to-be-processed message in the task processing message queue based on the cancellation message in the task cancellation message set.

[0103] The technical scheme of the embodiment determines the existence of the target task to be processed when the task cancellation message is received, and in the case that the corresponding task exists, the task is eliminated, and in the case that the corresponding task does not exist, the corresponding to-be-processed message in the task processing message queue is cancelled, thus avoiding the system processing of the task that has been cancelled, whether the task cancellation message arrives first or not. The anti-concurrent lock is set for the task cancellation message queue and the task processing message queue, thus preventing the case of the two kinds of messages being simultaneously sent to the corresponding target task processing center.

[0104] Embodiment six

[0105] Figure 6 The structural block diagram of the information processing device provided in the embodiment six of the application can execute the information processing method provided in any embodiment of the application, has the function modules and beneficial effects corresponding to the execution method. As shown in the figure, the device specifically includes: a target attribute information acquisition module 410, a target task processing center determination module 420, and a to-be-processed message processing module 430. Figure 6

[0106] The target attribute information acquisition module 410 is used for acquiring target attribute information of a to-be-processed message when receiving the to-be-processed message sent based on a task processing message queue; wherein the task processing message queue includes at least one to-be-processed message, and each to-be-processed message is generated based on a to-be-processed task.

[0107] The target task processing center determination module 420 is used for determining a target task processing center matched with the target attribute information from at least one task processing center according to a pre-set traffic splitting rule.

[0108] The to-be-processed message processing module 430 is used for processing the to-be-processed message based on the target task processing center to obtain a target processing result.

[0109] On the basis of the above technical schemes, the target attribute information acquisition module 410 includes an information extraction unit and a target task processing center determination unit.

[0110] The information extraction unit is used for acquiring data amount information and adaptive interface information carried in the to-be-processed message.

[0111] The target task processing center determination unit is used for determining a target task processing center matched with the target attribute information according to the data amount information, the adaptive interface information, and a pre-set traffic splitting rule.

[0112] ​Optionally, the to-be-processed message processing module 430 is further configured to receive the to-be-processed message based on the target task processing center, and determine that there is a target task cancellation message corresponding to the to-be-processed message, and then mark a to-be-processed task corresponding to the to-be-processed message as a cancellation state to obtain a task cancellation result.

[0113] Optionally, the to-be-processed message processing module 430 is further configured to determine, based on the cached task cancellation message set, that there is a target task cancellation message corresponding to the to-be-processed message, mark a to-be-processed task corresponding to the to-be-processed message as a cancellation state, and remove the target task cancellation message from the task cancellation message set to obtain the task cancellation result.

[0114] Optionally, the to-be-processed message processing module 430 is further configured to receive the to-be-processed message based on the target task processing center, and determine that there is a target task cancellation message corresponding to the to-be-processed message, and then mark a to-be-processed task corresponding to the to-be-processed message as a cancellation state to obtain a task cancellation result.

[0115] Optionally, the information processing apparatus further comprises a to-be-processed target task determination module.

[0116] The to-be-processed target task determination module is configured to, when receiving a task cancellation message sent based on a task cancellation message queue, determine whether a to-be-processed target task corresponding to the task cancellation message has been generated, remove the to-be-processed target task based on a target task processing center corresponding to the to-be-processed target task if the to-be-processed target task has been generated, and update the task cancellation message to a task cancellation message set of a corresponding to-be-selected target task processing center if the to-be-processed target task has not been generated, to cancel a to-be-processed message in the task processing message queue based on a cancellation message in the task cancellation message set, wherein the to-be-selected target task processing center comprises the target task processing center.

[0117] Optionally, the to-be-processed target task determination module is further configured to, when receiving a task cancellation message sent based on a task cancellation message queue, query a message distribution route based on a distribution module, determine a target task processing center for processing a to-be-processed message corresponding to the task cancellation message, and determine whether the target task processing center comprises the to-be-processed target task.

[0118] Optionally, the to-be-processed target task determination module is further configured to determine at least one to-be-selected target task processing center according to message attribute information of the task cancellation information, and update the task cancellation message to a task cancellation message set of the at least one to-be-selected target task processing center, wherein the at least one to-be-selected target task processing center is a cancellation non-return target task processing center.

[0119] Optionally, the information processing device further comprises a message elimination module.

[0120] The message elimination module is configured to eliminate the to-be-processed message in the task processing message queue that matches the cancellation message in the task cancellation message set.

[0121] Optionally, the information processing device further comprises an anti-concurrent lock setting module.

[0122] The anti-concurrent lock setting module is configured to set anti-concurrent locks for the task cancellation message queue and the task processing message queue, so that the messages in the task message queue and the task processing message queue are not processed at the same time.

[0123] The technical scheme provided by the embodiment can obtain target attribute information of a message when receiving the to-be-processed message, so as to determine the nature type of the message; according to a preset flow division rule, a target task processing center that matches the target attribute information can be determined, and the target task processing center processes a to-be-processed task corresponding to the message, so as to obtain a target processing result, which realizes the division of the message, upgrades the old message processing system to a new message processing system, balances the load of each task processing center, improves the processing efficiency of the message, further expands the scenario of processing multiple types of messages, and improves the applicability of the scheme.

[0124] The information processing device provided by the embodiment of the application can execute the information processing method provided by any embodiment of the application, and has the corresponding function modules and beneficial effects of the execution method.

[0125] It should be noted that each unit and module included in the above device is only divided according to the function logic, but is not limited to the above division, as long as the corresponding function can be realized; in addition, the specific name of each functional unit is only for convenient mutual distinction, and does not limit the protection scope of the embodiment of the application.

[0126] Embodiment Seven

[0127] Figure 7 A structural schematic diagram of an electronic device provided by the embodiment seven of the application. Figure 7 A block diagram of an exemplary electronic device 50 suitable for use in implementing embodiments of the application is shown. Figure 7 The electronic device 50 shown is merely an example and should not be taken as limiting the functionality or applicability of embodiments of the application.

[0128] As Figure 7As shown, the electronic device 50 is in the form of a general- purpose computer. The components of the electronic device 50 can include, but are not limited to, one or more processors or processing units 501, a system memory 502, and a bus 503 that couples various system components including the system memory 502 to the processing unit 501.

[0129] The bus 503 represents one or more of any of several bus structures, including a memory bus or memory controller, a peripheral bus, a graphics accelerator bus, a processor or local bus using any of a variety of bus architectures. By way of example, these architectures include Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.

[0130] The electronic device 50 typically includes a variety of computer system readable media. Such media can be any available media that is located either internally or externally to the electronic device 50, including both volatile and nonvolatile media, removable and non-removable media.

[0131] The system memory 502 can include computer system readable media in the form of volatile memory, such as random access memory (RAM) 504 and / or cache memory 505. The electronic device 50 can further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, a storage system 506 can be provided for reading from and writing to non-removable, non-volatile magnetic media (e.g., a "hard drive"). Figure 7 Not shown, a removable / non-removable interface can also be provided and can include interface to one or more devices allowing the electronic device 50 to read from or write to such devices. The storage system 506 can include a number of storage devices including magnetic disk storage media, memory storage devices, and / or optical storage devices. In one embodiment, the storage system 506 can be implemented as a database management system appropriate for the electronic device 50. Figure 7 In one embodiment, the storage system 506 can be implemented as a database management system appropriate for the electronic device 50. Although the exemplary embodiment describes the use of a database management system, the electronic device 50 is not limited to such implementations. Any data storage system can be utilized. In one embodiment, the storage system 506 can be implemented as a database management system appropriate for the electronic device 50. Although the exemplary embodiment describes the use of a database management system, the electronic device 50 is not limited to such implementations. Any data storage system can be utilized.

[0132] Program / utility 508 having a set (at least one) of program modules 507 can be stored in, for example, memory 502 by way of example, such program modules 507 include an operating system, one or more application programs, other program modules, and program data, each of which or a combination can include implementation of the network environment. Program modules 507 generally carry out the functions and / or methodologies of embodiments described herein.

[0133] The electronic device 50 can also communicate with one or more external devices 509 such as a keyboard or pointing device, a display 510, etc.; one or more devices that enable a user to interact with the electronic device 50; and / or one or more devices (e.g., a networking module, a Figure 7 Other hardware and / or software modules that can be used in conjunction with the electronic device 50 but are not shown in FIG. 5 include, but are not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data archival storage systems, etc.

[0134] The processing unit 501 performs various functional applications and data processing by running programs stored in the system memory 502, such as the information processing method provided by the embodiments of the present application.

[0135] Embodiment Eight

[0136] The embodiment seven of the present application further provides a storage medium containing computer executable instructions, which, when executed by a computer processor, are used to perform an information processing method.

[0137] The method comprises:

[0138] When receiving a to-be-processed message sent based on a task processing message queue, target attribute information of the to-be-processed message is acquired; wherein the task processing message queue comprises at least one to-be-processed message, and each to-be-processed message is generated based on a to-be-processed task;

[0139] According to a pre-set flow splitting rule, a target task processing center matching the target attribute information is determined from at least one task processing center;

[0140] The to-be-processed message is processed based on the target task processing center, and a target processing result is obtained.

[0141] The computer storage medium of the embodiments of the present application can adopt any combination of one or more computer readable media. The computer readable medium can be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium may, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any combination thereof. More specific examples (non-exhaustive list) of the computer readable storage medium include an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, the computer readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus or device.

[0142] The computer readable signal medium can include a data signal propagated in baseband or propagated as a carrier wave, in which computer readable program code is embodied. Such propagated data signals can take a wide variety of forms, including but not limited to electro-magnetic signals, optical signals, or any suitable combination thereof. The computer readable signal medium can also be any computer readable medium that is not a storage medium, that is capable of storing the program for use by or in connection with the instruction execution system, apparatus or device.

[0143] The program code embodied on the computer readable medium can be transmitted using any appropriate medium, including but not limited to wireless, wire line, optical fiber cable, RF, etc., or any suitable combination of the above.

[0144] The computer program code for carrying out operations of the embodiments of the present application can be written in one or more programming languages or combinations of languages including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages such as "C" or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).

[0145] Note that the above merely describes preferred embodiments of the present application and the principles of the technology applied. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and that various obvious changes, modifications and substitutions can be made without departing from the scope of the present application. Therefore, although the present application has been described in detail through the above embodiments, the present application is not limited to the above embodiments, and can include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the claims.

Claims

1. An information processing method, characterized in that, include: When a pending message is received from a task processing message queue, the target attribute information of the pending message is obtained; wherein, the task processing message queue includes at least one pending message, each pending message is generated based on a pending task, and the target attribute information includes data volume information and adaptation interface information. Based on the pre-set traffic segmentation rules, a target task processing center that matches the target attribute information is determined from at least one task processing center; The target task processing center processes the message to be processed to obtain the target processing result.

2. The method according to claim 1, characterized in that, The step of obtaining the target attribute information of the message to be processed includes: Obtain the data volume information and adaptation interface information carried in the message to be processed; Accordingly, determining the target task processing center that matches the target attribute information from at least one task processing center according to the pre-set traffic segmentation rules includes: Based on the data volume information, the adaptation interface information, and the pre-set traffic segmentation rules, a target task processing center that matches the target attribute information is determined.

3. The method according to claim 1, characterized in that, The process of processing the message to be processed based on the target task processing center to obtain the target processing result includes: When the target task processing center receives the message to be processed and determines that there is a target task cancellation message corresponding to the message to be processed, the task to be processed corresponding to the message to be processed is marked as cancelled, and the task cancellation result is obtained.

4. The method according to claim 3, characterized in that, When it is determined that there is a target task cancellation message corresponding to the pending message, the pending task corresponding to the pending message is marked as cancelled, and the task cancellation result is obtained, including: When the cached task cancellation message set determines that there is a target task cancellation message corresponding to the pending message, the pending task corresponding to the pending message is marked as cancelled, and the target task cancellation message is removed from the task cancellation message set to obtain the task cancellation result.

5. The method according to claim 3, characterized in that, The process of processing the message to be processed based on the target task processing center to obtain the target processing result includes: When the target task processing center receives the message to be processed and determines that there is no task cancellation message corresponding to the message to be processed, it generates a target task corresponding to the message to be processed and uses the target task as the target processing result.

6. The method according to claim 1, characterized in that, Also includes: When a task cancellation message is received based on the task cancellation message queue, it is determined whether a target task to be processed corresponding to the task cancellation message has been generated. If so, the target task to be processed will be removed based on the target task processing center corresponding to the target task to be processed; If not, the task cancellation message is updated to the task cancellation message set of the corresponding target task processing center, so as to cancel the pending messages in the task processing message queue based on the cancellation messages in the task cancellation message set; The target task processing center to be selected includes the target task processing center.

7. The method according to claim 6, characterized in that, When a task cancellation message is received based on a task cancellation message queue, determining whether a target task corresponding to the task cancellation message has been generated includes: When a task cancellation message is received based on the task cancellation message queue, the message routing is queried based on the routing module to determine the target task processing center for processing the pending message corresponding to the task cancellation message, and to determine whether the target task processing center includes the pending target task.

8. The method according to claim 6, characterized in that, The step of updating the task cancellation message to the task cancellation message set of the corresponding target task processing center includes: Based on the message attribute information of the task cancellation message, at least one target task processing center to be selected is determined; The task cancellation message is updated in the task cancellation message set of the at least one candidate target task processing center.

9. The method according to claim 8, characterized in that, The method further includes: at least one candidate target task processing center is a canceled non-return target task processing center. Remove pending messages from the task processing message queue that match the cancellation messages in the task cancellation message set.

10. The method according to claim 6, characterized in that, Also includes: Set concurrency locks for the task cancellation message queue and the task processing message queue to prevent messages in the task cancellation message queue and the task processing message queue from being sent simultaneously.

11. An information processing device, characterized in that, include: The target attribute information acquisition module is used to acquire the target attribute information of the message to be processed when a message to be processed is received based on the task processing message queue; wherein, the task processing message queue includes at least one message to be processed, each message to be processed is generated based on the task to be processed, and the target attribute information includes data volume information and adaptation interface information. The target task processing center determination module is used to determine the target task processing center that matches the target attribute information from at least one task processing center according to a pre-set traffic segmentation rule. The pending message processing module is used to process the pending message based on the target task processing center to obtain the target processing result.

12. An electronic device, characterized in that, The electronic device includes: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the information processing method as described in any one of claims 1-10.

13. A storage medium comprising computer-executable instructions, which, when executed by a computer processor, are used to perform the information processing method as described in any one of claims 1-10.

Citation Information

Patent Citations

  • Flow switching method and device based on multi-active data center

    CN110990200A

  • Message processing method, device and system, electronic device and storage medium

    CN111786886A