An information processing method, apparatus, device, and storage medium
By adopting a message-driven scheduling method in the autonomous driving system, using preset component queues and message queues for information processing, the problem of insufficient real-time performance in the existing system is solved, and the information processing effect with high real-time and high scalability is achieved.
Patent Information
- Application Number
- CN202111114355.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-23
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2041-09-23
AI Technical Summary
The real-time nature of existing autonomous driving systems is affected by task context switching, user-state and kernel-state switching, and it is difficult to accurately schedule and arrange according to the characteristics of autonomous driving.
The message-driven scheduling method is adopted to process information through preset component queues and message queues, reducing the number of tasks context switching and querying.
It improves the real-time nature of information processing, with low coupling, durability, high scalability and high flexibility.
Smart Images

Figure CN113835903B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of information processing for autonomous driving, and particularly to an information processing method, apparatus, device, and storage medium. Background Art
[0002] As autonomous driving becomes the mainstream trend of future vehicles, various autonomous driving vehicles are constantly emerging. The core of all autonomous driving vehicles is the central computing platform, which is responsible for computing tasks such as vehicle fusion perception, positioning, and planning. Therefore, extremely high real-time requirements are imposed on the autonomous driving system, and thus a high real-time environment is needed.
[0003] Existing central computing platforms are mainly based on high-performance X86 processors or high-performance heterogeneous ARM processors; usually, the autonomous driving platforms of each manufacturer are developed based on real-time or non-real-time operating systems such as QNX and Linux.
[0004] Currently, the real-time performance of the autonomous driving platform can be ensured by applying real-time patches to Linux, which can guarantee real-time performance through the underlying operating system; however, for Linux with real-time patches, the real-time performance is still insufficient. Therefore, users can enhance the system real-time performance through the coroutine method.
[0005] In the existing device, the scheduling based on the native kernel, whether it is a real-time or non-real-time operating system, involves the switching between the user mode and the kernel mode, which affects the performance, and at the same time, it is impossible to perform precise scheduling and orchestration according to the characteristics of autonomous driving itself. Based on the coroutine method, although the real-time performance can be enhanced, the coroutine method still involves coroutine context switching, as well as setting and querying the states of coroutine tasks, such as the ready state, running state, IO waiting state, etc.
[0006] Due to the complexity of the autonomous driving service and the characteristics of the operating system itself, task context switching, and the way users use coroutines will fix the task priorities and query ready tasks, and this design framework limits the improvement of the real-time performance of the autonomous driving system. Summary of the Invention
[0007] In order to solve the above technical problems, this application discloses an information processing method. In the scenario of autonomous driving, a message-driven scheduling method is adopted to reduce the number of task context switches and the number of task queries, improve the real-time performance of information processing, and has the advantages of low coupling, persistence, high scalability, and high flexibility.
[0008] To achieve the above invention objective, this application provides an information processing method, and the method includes:
[0009] Based on the target information sent by the first component, add at least one second component for receiving the target information to a preset component queue, and add the target information to the message queue of the second component; the first component and the second component are components in different applications;
[0010] Based on the sorting of the second components in the preset component queue, sequentially obtain the target information in the message queue of each second component, and respectively process the corresponding target information based on the information processing function of each second component.
[0011] In some embodiments, the adding the target information to the message queue of the second component includes:
[0012] Add the target information to the message queue of the second component based on a preset time sequence.
[0013] In some embodiments, the sequentially obtaining the target information in the message queue of each second component based on the sorting of the second components in the preset component queue includes:
[0014] Add each second component to the preset component queue based on a preset time sequence to obtain a component sorting queue;
[0015] Based on the component sorting queue in the preset component queue, sequentially obtain the target information in the message queue of each second component.
[0016] In some embodiments, before adding at least one second component for receiving the target information to a preset component queue based on the target information sent by the first component and adding the target information to the message queue of the second component, it further includes:
[0017] Monitor the target information sending status of the first component;
[0018] If it is monitored that the first component sends target information, determine the second component for receiving the target information.
[0019] In some embodiments, before sequentially obtaining the target information in the message queue of each second component based on the sorting of the second components in the preset component queue and respectively processing the corresponding target information based on the information processing function of each second component, it further includes:
[0020] Create a message processing thread;
[0021] Use the message processing thread to monitor the storage status of the preset component queue;
[0022] If the storage state is that there is at least one of the second components in the preset component queue, perform the step of obtaining the target information and the step of processing the target information.
[0023] This application also provides an information processing device, and the device includes:
[0024] A first processing module, configured to add at least one second component for receiving the target information to a preset component queue based on the target information sent by a first component, and add the target information to the message queue of the second component; the first component and the second component are components in different application programs;
[0025] A second processing module, configured to sequentially obtain the target information in the message queue of each second component based on the sorting of the second components in the preset component queue, and process the corresponding target information respectively based on the information processing function of each second component.
[0026] In some embodiments, a monitoring module is configured to monitor the target information sending state of the first component;
[0027] A determination module is configured to determine the second component for receiving the target information if it is monitored that the first component sends the target information.
[0028] In some embodiments, it further includes:
[0029] A thread creation module is configured to create a message processing thread;
[0030] A storage state monitoring module is configured to monitor the storage state of the preset component queue by using the message processing thread;
[0031] An execution module is configured to perform the step of obtaining the target information and the step of processing the target information if the storage state is that there is at least one of the second components in the preset component queue.
[0032] This application also provides an information processing device, the device includes a processor and a memory, and at least one instruction or at least one program segment is stored in the memory, and the at least one instruction or the at least one program segment is loaded and executed by the processor to implement the information processing method as described above.
[0033] This application also provides a computer-readable storage medium, and at least one instruction or at least one program segment is stored in the storage medium, and the at least one instruction or the at least one program segment is loaded and executed by a processor to implement the information processing method as described above.
[0034] Implementing the embodiments of this application has the following beneficial effects:
[0035] The information processing method disclosed in this application adopts a message-driven scheduling method in the scenario of autonomous driving, reduces the number of task context switches and the number of query tasks, improves the real-time performance of information processing, and has the advantages of low coupling, persistence, high scalability, and high flexibility. Description of the Drawings
[0036] To more clearly illustrate the information processing method, apparatus, device, and storage medium described in this application, the accompanying drawings required for the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of this application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0037] Figure 1 Flow chart of an information processing method provided by an embodiment of this application;
[0038] Figure 2 Schematic diagram of a message queue provided by an embodiment of this application;
[0039] Figure 3 Schematic diagram of a multi-threaded information scheduling process provided by an embodiment of this application;
[0040] Figure 4 UML diagram of an information scheduler provided by an embodiment of this application;
[0041] Figure 5 Schematic diagram of the structure of an information processing apparatus provided by an embodiment of this application;
[0042] Figure 6 Schematic diagram of the structure of an information processing device provided by an embodiment of this application. Detailed Embodiments
[0043] The technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are only some embodiments of this application, rather than all embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of this application without creative efforts fall within the scope of protection of this application.
[0044] It should be noted that the terms "first", "second", etc. in the description, claims and the above-mentioned drawings of this application are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application described here can be implemented in an order other than those illustrated or described here. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or server that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or are inherent to these processes, methods, products or devices.
[0045] Before further elaborating on the embodiments of the present application, the nouns and terms involved in the embodiments of the present application are described, and the nouns and terms involved in the embodiments of the present application are applicable to the following explanations.
[0046] In the UML diagram, the relationships between classes;
[0047] 1) Dependency relationship
[0048] Introduction: For two relatively independent objects, when one object is responsible for constructing the instance of another object or depends on the service of another object, the relationship between these two objects is mainly a dependency relationship.
[0049] Representation method:
[0050] The dependency relationship is represented by a dashed arrow.
[0051] 2) Aggregation relationship
[0052] Introduction: It represents a weak 'ownership' relationship, that is, the has-a relationship, which reflects that object A can contain object B, but object B is not a part of object A. The two objects have their own lifecycles.
[0053] Representation method:
[0054] The aggregation relationship is represented by a hollow diamond + solid arrow.
[0055] 3) Composition relationship
[0056] Introduction: Composition is a strong 'ownership' relationship, a contains-a relationship, which reflects a strict part-whole relationship, and the part and the whole have the same lifecycle.
[0057] Representation method:
[0058] The composition relationship is represented by a solid diamond + solid arrow, and the numbers at both ends of the connection can also be used to indicate how many instances there are at a certain end.
[0059] FIFO (First Input First Output) simply refers to a data structure where the first input is the first output.
[0060] A component is an atomic function in autonomous driving, that is, a minimum application.
[0061] A component instance is a class instantiated during the operation of an atomic function component. Multiple instances can be instantiated, but the atomic function component is unique. Among them, a component instance will have a corresponding message queue (MessageQueue), and the information sent by other component instances to the destination component instance will be stored in the message queue of the destination component instance.
[0062] An input port (InPort) represents the port through which a component instance receives a certain type of information.
[0063] An output port (OutPort) represents the port through which a component instance outputs a certain type of information. The output port will contain destination information, and this destination information will contain the input port information of the component instance where it is located to the destination component (Component) to be output.
[0064] A message dispatcher is a looped std::thread that is bound to a single CPU or floats among multiple CPUs. Among them, each message dispatcher performs a blocking fetch on a component queue (ComponentQueue) until a component instance arrives. When a component instance arrives, the message dispatcher calls the message handling function (handleMessages()) on the component instance, and this component instance processes each element in its queue.
[0065] The following combines Figure 1 to introduce the information processing method of this application, which can be applied to the field of autonomous driving. Specifically, it can be applied to the entire autonomous driving system and can be applied to message passing in the autonomous driving system.
[0066] Please refer to Figure 1 , which shows a schematic flowchart of an information processing method provided by an embodiment of this application. This specification provides the method operation steps as described in the embodiment or flowchart, but based on routine; or without creative labor, more or fewer operation steps may be included. The step order listed in the embodiment is only one way among the execution orders of numerous steps and does not represent the only execution order. The information processing method can be executed in the method order shown in the embodiment or the accompanying drawings. Specifically, such asFigure 1 As shown, the method includes:
[0067] S101, based on the target information sent by the first component, adding at least one second component for receiving the target information to a preset component queue, and adding the target information to the message queue of the second component; the first component and the second component are components in different applications;
[0068] It should be noted that in the embodiments of the present application, both the first component and the second component can be any component in any application;
[0069] The target information can be any information sent by the first component;
[0070] The preset component queue can be a global component queue. When there is information transmission, any component receiving information can be added to this preset component queue;
[0071] In the embodiments of the present application, before adding at least one second component for receiving the target information to the preset component queue based on the target information sent by the first component, it further includes:
[0072] Monitoring the target information sending status of the first component;
[0073] The target information sending status can include the target information sending status and the target information not sent status;
[0074] If it is monitored that the first component sends the target information, determine the second component for receiving the target information.
[0075] In the embodiments of the present application, when it is monitored that the first component sends the target, the second component for receiving the target information can be determined;
[0076] Specifically, it can be based on the output port of the first component to output the target information, determine the input port information of the component receiving the target information; then determine the second component for receiving the target information based on the input port information.
[0077] In the embodiments of the present application, both the first component and each second component can work in the form of component instances;
[0078] Specifically, when the first component sends the target information, it can send the target information to the message queue, that is, the message pool, through the output port of the first component instance corresponding to the first component;
[0079] Each second component obtains the target information from the message pool based on the input port of its corresponding second component instance, and saves the target information to the message queue corresponding to each second component instance respectively.
[0080] In the embodiment of the present application, adding the target information to the message queue of the second component may include:
[0081] Adding the target information to the message queue of the second component based on a preset time sequence;
[0082] Specifically, the preset time sequence may be the chronological order of time;
[0083] Specifically, the memory pool of the message queue is statically allocated, such as Figure 2 which shows a schematic diagram of a message queue provided by an embodiment of the present application;
[0084] Specifically, in this message pool, information 1, information 2, and information n are sorted according to the time sequence.
[0085] Specifically, the message queue is also the message pool. The size of the message can be calculated through the sending and receiving frequency of the message, and then the memory size of each message in the autonomous driving system can be determined during compilation and statically allocated in advance.
[0086] Specifically, according to the time when the second component receives the target information, the target information received by the second component can be added to the message queue of the second component according to the first-in, first-out rule.
[0087] S103. Based on the sorting of the second components in the preset component queue, sequentially obtain the target information in the message queues of the respective second components, and respectively process the corresponding target information based on the information processing functions of the respective second components;
[0088] In the embodiment of the present application, the target information received by the second component can be processed based on the operating principle of the set FIFO data structure;
[0089] In the embodiment of the present application, before the step of based on the sorting of the second components in the preset component queue, sequentially obtaining the target information in the message queues of the respective second components, and respectively processing the corresponding target information based on the information processing functions of the respective second components, further includes:
[0090] Create a message processing thread;
[0091] In the embodiment of the present application, one thread or multiple threads can be set;
[0092] Specifically, the thread can be a message dispatcher, and the message dispatcher can be a looped std::thread thread;
[0093] This std::thread thread is bound to a single CPU or floats among multiple CPUs.
[0094] Monitor the storage status of the preset component queue by using the message processing thread;
[0095] In the embodiments of the present application, the storage status of the preset component queue can be monitored in real time based on multiple threads;
[0096] The storage status of the preset component queue includes two states: the presence of components and the absence of components;
[0097] Specifically, it can be the state of the absence of the second component and the state of the presence of at least one second component;
[0098] If the storage status is that there is at least one of the second components in the preset component queue, perform the step of obtaining the target information and the step of processing the target information.
[0099] In the embodiments of the present application, when it is monitored that there is at least one second component in the preset component queue, based on the sorting of the second components in the preset component queue, the target information in the message queues of the respective second components is obtained in sequence; and the corresponding target information is processed respectively based on the information processing functions of the respective second components.
[0100] In the embodiments of the present application, the obtaining of the target information in the message queues of the respective second components based on the sorting of the second components in the preset component queue may include:
[0101] Add the respective second components to the preset component queue based on a preset time sequence to obtain a component sorting queue;
[0102] Based on the component sorting queue in the preset component queue, obtain the target information in the message queues of the respective second components in sequence.
[0103] Specifically, in the embodiments of the present application, the target messages in the message queue are sorted based on a preset time sequence;
[0104] In the embodiments of the present application, when the target messages need to be processed, based on the first-in-first-out rule, the second components in the preset component queue and the message queues corresponding to the respective second components are obtained in sequence;
[0105] Obtain the target information from the message queues of the respective second components;
[0106] In the embodiments of the present application, the processing of the respective corresponding target information based on the information processing functions of the respective second components may include:
[0107] Call the information processing functions of the respective second components;
[0108] In the embodiments of the present application, each component has its own corresponding information processing function;
[0109] Based on each information processing function, the target information corresponding to each of the second components is processed respectively.
[0110] Specifically, based on the information processing functions corresponding to the second components, the target information corresponding to the second components is processed.
[0111] This first-in-first-out scheduling mode for driving the target information can make the coupling of the autonomous driving system low, the persistence good, the scalability high, and the flexibility high.
[0112] In a preferred embodiment of the present application, as Figure 3 , it shows a schematic diagram of a multi-threaded information scheduling process provided by an embodiment of the present application. Specifically, as follows:
[0113] In the embodiment of the application, there can be multiple component queues, and the multiple component queues correspond to multiple priorities.
[0114] In this figure, component instance A represents the component instance corresponding to the first component, and component instances B and C respectively represent the component instances corresponding to the two second components, and their corresponding priorities are the component instances in the component queue of A.
[0115] Component instances B and C respectively represent the component instances in the component queue with priority B.
[0116] The message pool represents the message queue of component instance A.
[0117] Information processing function B represents the information processing function corresponding to component instance B.
[0118] Information processing function C represents the information processing function corresponding to component instance C.
[0119] In a preferred embodiment of the present application, as Figure 4 , it shows a UML schematic diagram of an information scheduler provided by an embodiment of the present application. Specifically, as follows:
[0120] In this figure, the relationships between various classes can be clearly seen.
[0121] For example, there is a composition relationship between the component instance and the component.
[0122] There is a composition relationship between the component and the input port.
[0123] There is an aggregation relationship between the component instance and the message header.
[0124] There is a dependency relationship between the information processing function and the message dispatcher.
[0125] As can be seen from the embodiments of the information processing method, apparatus, device, and storage medium provided by the present application above, the embodiments of the present application add at least one second component for receiving the target information to a preset component queue based on the target information sent by the first component, and add the target information to the message queue of the second component; the first component and the second component are components in different applications; based on the sorting of the second components in the preset component queue, the target information in the message queue of each second component is sequentially obtained, and the corresponding target information is processed respectively based on the information processing function of each second component; by using the technical solution provided by the embodiments of the present specification, in the scenario of autonomous driving, a message-driven scheduling method is adopted, which reduces the number of task context switches and the number of query tasks, improves the real-time performance of information processing, and has the advantages of low coupling, persistence, high scalability, and high flexibility.
[0126] The embodiments of the present application also provide an information processing apparatus, as Figure 5 shown, which is a schematic structural diagram of an information processing apparatus provided by the embodiments of the present application; specifically, the apparatus includes:
[0127] A first processing module 510, configured to add at least one second component for receiving the target information to a preset component queue based on the target information sent by the first component, and add the target information to the message queue of the second component; the first component and the second component are components in different applications;
[0128] A second processing module 520, configured to sequentially obtain the target information in the message queue of each second component based on the sorting of the second components in the preset component queue, and process the corresponding target information respectively based on the information processing function of each second component.
[0129] In the embodiments of the present application, the first processing module 510 includes:
[0130] A first processing unit, configured to add the target information to the message queue of the second component based on a preset time sequence.
[0131] In the embodiments of the present application, the second processing module 520 includes:
[0132] A second processing unit, configured to add each second component to the preset component queue based on a preset time sequence to obtain a component sorting queue;
[0133] A target information obtaining unit, configured to sequentially obtain the target information in the message queue of each second component based on the component sorting queue in the preset component queue.
[0134] In the embodiments of the present application, it further includes:
[0135] A monitoring module, configured to monitor the sending status of target information of the first component;
[0136] A determination module, configured to determine a second component for receiving the target information if it is monitored that the first component sends the target information.
[0137] In an embodiment of the present application, it further includes:
[0138] A thread creation module, configured to create a message processing thread;
[0139] A storage status monitoring module, configured to monitor the storage status of the preset component queue by using the message processing thread;
[0140] An execution module, configured to execute the target information acquisition step and the target information processing step if the storage status is that there is at least one of the second components in the preset component queue.
[0141] An embodiment of the present application provides an information processing device, which includes a processor and a memory. At least one instruction or at least one program segment is stored in the memory, and the at least one instruction or at least one program segment is loaded and executed by the processor to implement the information processing method as described in the above method embodiment.
[0142] The memory can be used to store software programs and modules. The processor runs the software programs and modules stored in the memory to execute various functional applications and data processing. The memory mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for functions, etc.; the data storage area can store data created according to the use of the device, etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices. Correspondingly, the memory can also include a memory controller to provide the processor with access to the memory.
[0143] Figure 6 A structural schematic diagram of an information processing device provided in an embodiment of the present application. The internal structure of the information processing device can include but is not limited to: a processor, a network interface, and a memory. The processor, network interface, and memory in the information processing device can be connected through a bus or other means. In the embodiments shown in this specification Figure 6 it is taken as an example of being connected through a bus.
[0144] Among them, the processor (or CPU (Central Processing Unit)) is the computing core and control core of the information processing device. The network interface may optionally include a standard wired interface, a wireless interface (such as WI-FI, a mobile communication interface, etc.). The memory is the memory device in the information processing device, used to store programs and data. It can be understood that the memory here can be a high-speed RAM storage device, or a non-volatile memory device, such as at least one disk storage device; optionally, it can also be at least one storage device located far from the aforementioned processor. The memory provides a storage space, and the operating system of the information processing device is stored in this storage space, which may include but is not limited to: Windows system (an operating system), Linux (an operating system), etc., and this application does not make any limitations in this regard; and, one or more instructions suitable for being loaded and executed by the processor are also stored in this storage space, and these instructions can be one or more computer programs (including program codes). In the embodiments of this application, the processor loads and executes one or more instructions stored in the memory to implement the information processing method provided in the above method embodiments.
[0145] Embodiments of this application also provide a computer-readable storage medium, which can be set in the information processing device to store at least one instruction, at least one program segment, a code set or an instruction set related to implementing an information processing method in the method embodiments. The at least one instruction, the at least one program segment, the code set or the instruction set can be loaded and executed by the processor of the electronic device to implement the information processing method provided in the above method embodiments.
[0146] Optionally, in this embodiment, the above storage medium may include but is not limited to: USB flash drives, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), mobile hard disks, magnetic disks or optical discs, etc., all of which are media that can store program codes.
[0147] It should be noted that: the above sequence of the embodiments of this application is only for description and does not represent the advantages or disadvantages of the embodiments. And the above specific embodiments of this specification have been described. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be executed in a different order from that in the embodiments and still achieve the desired results. Additionally, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0148] According to one aspect of the present application, a computer program product or a computer program is provided. The computer program product or the computer program includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in the above various optional implementation manners.
[0149] Each embodiment in this specification is described in a progressive manner. For the same or similar parts among the embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the device and server embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiments.
[0150] Those of ordinary skill in the art can understand that all or part of the steps for implementing the above embodiments can be completed by hardware, or can be completed by a program instructing relevant hardware. The program can be stored in a computer-readable storage medium. The above-mentioned storage medium can be a read-only memory, a magnetic disk, an optical disc, etc.
[0151] The above-disclosed is only a preferred embodiment of the present application. Of course, the scope of the rights of the present application cannot be limited thereby. Therefore, equivalent changes made according to the claims of the present application still fall within the scope covered by the present application.
Claims
1. An information processing method, characterized in that, The method includes: Sending the target information sent by the first component to the message pool through the output port of the first component instance corresponding to the first component; Based on the target information, adding at least one second component for receiving the target information to a preset component queue according to a preset time sequence to obtain a component sorting queue; the first component and the second component are components in different applications; the first component and each of the second components work in the form of component instances; there are multiple component queues, and the multiple component queues correspond to multiple priorities; Obtaining the target information from the message pool through the input port of the second component instance corresponding to each second component; Adding the target information to the message queue corresponding to each second component instance; Creating a plurality of message processing threads; Monitoring the storage state of the preset component queue based on the plurality of message processing threads; the storage state includes a state where there is no second component and a state where there is at least one second component; When the storage state is that there is at least one second component, obtaining the target information in the corresponding message queue in sequence based on the sorting of the second components in the preset component queue, and respectively processing the corresponding target information based on the information processing function of each second component.
2. The information processing method according to claim 1, wherein The step of adding the target information to the message queue corresponding to each second component instance includes: Adding the target information to the message queue of the second component instance according to a preset time sequence.
3. The information processing method according to claim 1, wherein The step of obtaining the target information in the corresponding message queue in sequence based on the sorting of the second components in the preset component queue includes: Obtaining the target information in the message queue of each second component instance in sequence based on the component sorting queue in the preset component queue.
4. The information processing method according to claim 1, wherein Before the step of adding at least one second component for receiving the target information to the preset component queue based on the target information, the method includes: Monitoring the target information sending state of the first component; If it is monitored that the first component sends target information, determining the second component for receiving the target information.
5. An information processing apparatus, characterized in that, The device includes: A first processing module, configured to send the target information sent by the first component to the message pool through the output port of the first component instance corresponding to the first component; based on the target information, adding at least one second component for receiving the target information to a preset component queue according to a preset time sequence to obtain a component sorting queue; the first component and the second component are components in different applications; the first component and each of the second components work in the form of component instances; there are multiple component queues, and the multiple component queues correspond to multiple priorities; Obtaining the target information from the message pool through the input port of the second component instance corresponding to each second component; adding the target information to the message queue corresponding to each second component instance; A thread creation module, configured to create a plurality of message processing threads; A storage status monitoring module for monitoring the storage status of the preset component queue based on the multiple message processing threads; the storage status includes a status where there is no second component and a status where there is at least one second component; An execution module for, when the storage status is that there is at least one second component, sequentially obtaining target information in the respective corresponding message queues based on the sorting of the second components in the preset component queue, and respectively processing the corresponding target information based on the information processing functions of the respective second components.
6. The information processing apparatus according to claim 5, wherein It further includes: A monitoring module for monitoring the target information sending status of the first component; A determination module for determining a second component for receiving the target information if it is monitored that the first component sends the target information.
7. An information processing apparatus, characterized in that, The device includes a processor and a memory, and at least one instruction or at least one program segment is stored in the memory, and the at least one instruction or the at least one program segment is loaded and executed by the processor to implement the information processing method according to any one of claims 1 to 4.
8. A computer-readable storage medium, characterized in that, At least one instruction or at least one program segment is stored in the storage medium, and the at least one instruction or the at least one program segment is loaded and executed by the processor to implement the information processing method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Message transmission method and device based on message queue, and equipment
CN111400056A
Apparatus and method for monitoring messages forwarded between applications
US6915457B1