Message accumulation processing method, vehicle, computer equipment and program product
By designing a message stacking processing method for SOA communication middleware in automobiles, receiving and processing SOA messages, the delay problem caused by message stacking is solved, and the message processing efficiency and user experience are improved.
Patent Information
- Application Number
- CN202411652384.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2025-03-07
Smart Images

Figure CN119576604A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of vehicle technology, and in particular to a method for processing message accumulation, a vehicle, a computer device, and a program product. Background Art
[0002] Service-Oriented Architecture (SOA) is a software architecture model that aims to achieve interoperability and flexibility between systems by organizing different functional modules of an application into reusable services. Today, SOA service architecture is increasingly used in the automotive industry.
[0003] Generally, the module that implements SOA service communication is called SOA communication middleware. When there are special situations in the car, such as operating system freezes, business vulnerabilities and bugs, the SOA communication middleware may process messages at a lower speed than the message generation speed, causing unprocessed messages to accumulate in the receiving queue, which in turn causes message processing delays and cannot be quickly recovered, seriously affecting the use of car functions and poor user experience. Summary of the invention
[0004] The embodiments of the present disclosure at least provide a method, a vehicle, a computer device, and a program product for processing message accumulation.
[0005] In a first aspect, an embodiment of the present disclosure provides a method for processing message accumulation, which is applied to vehicle service-oriented architecture (SOA) communication middleware, including:
[0006] Receiving an SOA message sent through a target service interface indicating the invocation of a target SOA service; the target service interface is one of a plurality of service interfaces corresponding to the target SOA service; the target SOA service is one of at least one SOA service provided by a target business process;
[0007] Update the SOA message to the target message queue corresponding to the target service interface, and obtain the message accumulation processing strategy corresponding to the target message queue;
[0008] The SOA messages in the target message queue are processed according to the message accumulation processing strategy.
[0009] In a possible implementation, obtaining a message accumulation processing strategy corresponding to the target message queue includes:
[0010] Obtain a message accumulation processing strategy pre-configured by the target business process by calling a processing strategy interface;
[0011] The message accumulation strategy is a message accumulation strategy configured for the target SOA service and shared by multiple service interfaces corresponding to the target SOA service; or, the message accumulation strategy is configured for the target service interface in the target SOA service.
[0012] In a possible implementation manner, the message accumulation processing strategy includes a first processing strategy, wherein the first processing strategy indicates that after the number of accumulated SOA messages exceeds a target number threshold, SOA message discard processing is performed, and the target number threshold is dynamically set by the SOA communication middleware;
[0013] Processing the SOA message in the target message queue according to the message accumulation processing strategy includes:
[0014] When the message accumulation processing strategy is the first processing strategy, determining the number of SOA messages in the target message queue;
[0015] When the number of SOA messages in the target message queue is greater than a target number threshold, discarding at least part of the SOA messages in the target message queue;
[0016] According to the order in which the SOA messages enter the target message queue, the remaining SOA messages in the target message queue are sent to the corresponding domain controller.
[0017] In a possible implementation manner, the first processing strategy indicates a basic accumulation quantity;
[0018] The target quantity threshold is determined according to the following steps:
[0019] Acquire system operation data of a domain controller in the vehicle that executes the SOA message in the target message queue, wherein the system operation data includes at least one of the following: CPU usage, memory usage, and input / output I / O resource usage;
[0020] determining a quantity adjustment value based on the system operation data;
[0021] The basic accumulation quantity is adjusted using the quantity adjustment value to obtain a target quantity threshold corresponding to the target message queue.
[0022] In a possible implementation manner, discarding at least part of the SOA messages in the target message queue includes:
[0023] Determining a message discard ratio based on the system operation data;
[0024] According to the message discard ratio, the SOA messages in the target message queue are discarded.
[0025] In a possible implementation manner, the message accumulation processing strategy includes a second processing strategy, and the second processing strategy indicates to perform queue processing on the accumulated SOA messages;
[0026] Processing the SOA message in the target message queue according to the message accumulation processing strategy includes:
[0027] When the message accumulation processing strategy is the second processing strategy, the SOA messages in the target message queue are sent to the corresponding domain controller in sequence according to the order in which the SOA messages enter the target message queue.
[0028] In a possible implementation, the message accumulation processing strategy includes a third processing strategy, and the third processing strategy indicates discarding SOA messages whose waiting processing time exceeds a target time threshold; the target time threshold is dynamically set by the SOA communication middleware;
[0029] Processing the SOA message in the target message queue according to the message accumulation processing strategy includes:
[0030] When the message accumulation processing strategy is the third processing strategy, extracting the current to-be-processed SOA message from the target message queue in the order in which the SOA messages are written into the target message queue;
[0031] Determine whether the waiting processing time of the current SOA message to be processed is greater than a target time threshold;
[0032] If yes, the currently pending SOA message is deleted, and the currently pending SOA message is re-extracted from the target message queue;
[0033] If not, the currently-to-be-processed SOA message is sent to the corresponding domain controller.
[0034] In a possible implementation manner, the target duration threshold is determined according to the following steps:
[0035] Obtaining vehicle driving status data;
[0036] A target duration threshold corresponding to the target message queue is determined according to the driving status data and the message type of the SOA message in the target message queue.
[0037] In a possible implementation manner, the method further includes:
[0038] Generate a statistical report periodically, wherein the statistical report includes at least part of the following contents: SOA message discarding time, discarded SOA message name, discarded SOA message quantity, CPU utilization rate, memory utilization rate, input and output I / O resource utilization rate;
[0039] The statistical report is sent to a cloud server, and the cloud server is used to determine the message processing efficiency and / or system performance of the vehicle based on the statistical report.
[0040] In a second aspect, an embodiment of the present disclosure further provides a vehicle, which is used to execute the steps in the above-mentioned first aspect, or any possible implementation of the first aspect.
[0041] In a third aspect, an embodiment of the present disclosure further provides a computer device, comprising: a processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the machine-readable instructions are executed by the processor to perform the steps of the above-mentioned first aspect, or any possible implementation of the first aspect.
[0042] In a fourth aspect, an embodiment of the present disclosure further provides a computer program product, including a computer program, which, when executed, implements the method described in the above-mentioned first aspect, or any possible implementation manner of the first aspect.
[0043] The message accumulation processing method, vehicle, computer device and program product provided by the embodiments of the present disclosure receive an SOA message sent through a target service interface indicating the call of a target SOA service; the target service interface is one of a plurality of service interfaces corresponding to the target SOA service; the target SOA service is one of at least one SOA service provided by the target business process; the SOA message is updated to the target message queue corresponding to the target service interface, and the message accumulation processing strategy corresponding to the target message queue is obtained; the SOA message in the target message queue is processed according to the message accumulation processing strategy. The present disclosure processes the SOA message in the target message queue according to the message accumulation processing strategy. When there is message accumulation in the target message queue, the message processing efficiency can be improved, the message accumulation problem can be alleviated, the normal use of the vehicle functions can be guaranteed, and the user experience can be better.
[0044] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following is a brief introduction to the drawings required for use in the embodiments. The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used together with the specification to illustrate the technical solutions of the present disclosure. It should be understood that the following drawings only illustrate certain embodiments of the present disclosure and should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can also be obtained based on these drawings without creative work.
[0046] Figure 1 A flowchart of a method for processing message accumulation provided by an embodiment of the present disclosure is shown;
[0047] Figure 2 A schematic diagram of a message queue in a method for processing message accumulation provided by an embodiment of the present disclosure is shown;
[0048] Figure 3a A schematic diagram showing a first processing strategy processing process in the message accumulation processing method provided by an embodiment of the present disclosure;
[0049] Figure 3b A schematic diagram showing a second processing strategy processing process in the message accumulation processing method provided by an embodiment of the present disclosure;
[0050] Figure 3c A schematic diagram showing a processing process of a third processing strategy in the message accumulation processing method provided by an embodiment of the present disclosure;
[0051] Figure 4 A schematic diagram of the architecture of a message accumulation processing device provided by an embodiment of the present disclosure is shown;
[0052] Figure 5 A schematic diagram of the structure of a computer device provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0053] In order to make the purpose, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments. The components of the embodiments of the present disclosure generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the present disclosure claimed for protection, but merely represents selected embodiments of the present disclosure.
[0054] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0055] The term "and / or" herein only describes an association relationship, indicating that three relationships may exist. For example, A and / or B may represent the following three situations: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C may represent including any one or more elements selected from the set consisting of A, B, and C.
[0056] Research has found that when there are special circumstances in the car, such as operating system freezes, business vulnerabilities and bugs, the SOA communication middleware may process messages at a speed lower than the speed at which messages are generated, causing unprocessed messages to accumulate in the receiving queue. This will cause message processing delays and make it impossible to recover quickly, seriously affecting the use of car functions and providing a poor user experience.
[0057] Based on the above research, the present disclosure provides a method, vehicle, computer equipment and program product for processing message accumulation, receiving an SOA message sent through a target service interface indicating the call of a target SOA service; the target service interface is one of multiple service interfaces corresponding to the target SOA service; the target SOA service is one of at least one SOA service provided by the target business process; the SOA message is updated to the target message queue corresponding to the target service interface, and the message accumulation processing strategy corresponding to the target message queue is obtained; the SOA message in the target message queue is processed according to the message accumulation processing strategy. The present disclosure processes the SOA message in the target message queue according to the message accumulation processing strategy. When there is message accumulation in the target message queue, the message processing efficiency can be improved, the message accumulation problem can be alleviated, the normal use of the vehicle functions can be guaranteed, and the user experience can be better.
[0058] See also Figure 1 As shown, it is a flowchart of a method for processing message accumulation provided by an embodiment of the present disclosure, which is applied to vehicle service-oriented architecture SOA communication middleware, and the method includes S101 to S103, wherein:
[0059] S101. Receive an SOA message sent through a target service interface indicating the invocation of a target SOA service; the target service interface is one of a plurality of service interfaces corresponding to the target SOA service; the target SOA service is one of at least one SOA service provided by a target business process.
[0060] There may be one or more business processes in the automobile system, and one or more SOA services in each business process. In the present disclosure, the target business process may be any process in the automobile system, and the target SOA service may be any SOA service in the target business process. The target SOA service corresponds to multiple service interfaces, and the target service interface may be one of the multiple service interfaces. For example, a matching service interface may be selected from the multiple service interfaces as the target service interface according to the message content of the SOA message.
[0061] The present disclosure further includes S102, updating the SOA message to a target message queue corresponding to the target service interface, and acquiring a message accumulation processing strategy corresponding to the target message queue.
[0062] In the SOA communication middleware of the present disclosure, each service interface can be configured to correspond to a message queue, and different service interfaces can correspond to different message queues, that is, messages transmitted by the same service interface are stored in the same message queue, and messages transmitted by different service interfaces can be stored in different message queues. Figure 2 As shown, the SOA communication middleware maintains message queues corresponding to multiple service interfaces. After triggering the call of the target SOA service, the SOA message can be sent to the SOA communication middleware through the target service interface. The SOA communication middleware updates the received SOA message to the target message queue corresponding to the target service interface, and obtains the message accumulation processing strategy corresponding to the target message queue, so that the subsequent SOA communication middleware sends the SOA messages in the target message queue to the corresponding business party (such as a domain controller) for processing according to the order in which the messages are stored and based on the message accumulation processing strategy.
[0063] The message accumulation processing strategies corresponding to different message queues may be different. For example, if the SOA message is an unimportant message, the message accumulation strategy may be: when the number of messages is greater than the number threshold, the target message queue is cleared; or, if the SOA message is an important message, the message accumulation strategy may be queued in order, that is, even if there is a message accumulation in the target message queue, each SOA message in the queue needs to be sent to the corresponding domain controller for processing in turn.
[0064] Optionally, obtaining the message accumulation processing strategy corresponding to the target message queue includes: obtaining the message accumulation processing strategy pre-configured by the target business process by calling the processing strategy interface; wherein the message accumulation strategy is a message accumulation strategy configured for the target SOA service and shared by multiple service interfaces corresponding to the target SOA service; or, the message accumulation strategy is configured for the target service interface in the target SOA service.
[0065] Among them, the message accumulation processing strategy of the message queue can be configured according to the service granularity, that is, multiple service interfaces under the same SOA service share a message accumulation strategy; or, the message accumulation processing strategy of the message queue can be configured according to the interface granularity, that is, multiple service interfaces under the SOA service are respectively configured with corresponding message accumulation strategies, and the message accumulation strategies corresponding to different service interfaces can be different.
[0066] It is also possible to pre-configure a processing strategy interface corresponding to the message accumulation processing strategy, and then the target business process can call the processing strategy interface to configure the corresponding message accumulation strategy for each SOA under the target business process, or configure the corresponding message accumulation strategy for each service interface of each SOA under the target business process. Then, the message accumulation processing strategy corresponding to the target message queue can be obtained. Through the above process, flexible configuration of the message accumulation processing strategy can be achieved.
[0067] After S102, the present disclosure further includes S103, processing the SOA message in the target message queue according to the message accumulation processing strategy.
[0068] For example, if the message accumulation processing strategy is to clear the message queue when the number of messages is greater than the number threshold, the target message queue can determine the number of messages currently stored in each SOA message, and when the number of messages is greater than the number threshold, delete each SOA message in the target message queue; conversely, if the number of messages is less than or equal to the number threshold, then the SOA messages in the target message queue will be sent to the corresponding domain controller for processing in the order in which the messages are updated to the target message queue.
[0069] In an optional implementation, the message accumulation processing strategy includes a first processing strategy, which indicates that after the number of accumulated SOA messages exceeds a target number threshold, SOA message discarding processing is performed, and the target number threshold is dynamically set by the SOA communication middleware.
[0070] For example, if the SOA message is a periodic data with a lower priority, discarding part of the message has little impact on the business function. At this time, the message accumulation processing strategy of the message queue storing the SOA message can be set to the first processing strategy. The SOA message for which the first processing strategy is set can be set according to the actual scenario. For example, the SOA message corresponding to the first processing strategy can include but is not limited to temperature display messages, music playback status messages, volume adjustment messages, etc.
[0071] According to the message accumulation processing strategy, the SOA message in the target message queue is processed, including:
[0072] Step a1: when the message accumulation processing strategy is the first processing strategy, determine the number of SOA messages in the target message queue.
[0073] Step a2: When the number of SOA messages in the target message queue is greater than a target number threshold, discard at least part of the SOA messages in the target message queue.
[0074] Step a3: Send the remaining SOA messages in the target message queue to the corresponding domain controller according to the order in which the SOA messages enter the target message queue.
[0075] See also Figure 3a The schematic diagram of the first processing strategy processing process shown in the figure shows that when the message accumulation processing strategy of the target message queue is the first processing strategy, the number of SOA messages in the target message queue can be determined. When the number of SOA messages in the target message queue is greater than the target number threshold, at least some of the SOA messages in the target message queue are discarded. For example, all SOA messages in the target message queue can be discarded, or some of the SOA messages in the target message queue can be discarded according to the order in which the SOA messages enter the target message queue.
[0076] If all SOA messages in the target message queue are discarded, the target message queue currently has no SOA message, so no subsequent processing is required, and after the target message queue receives an SOA message next time, it continues to process the message according to the first processing strategy.
[0077] If some SOA messages in the target message queue are discarded, the remaining SOA messages in the target message queue can be sent to the corresponding domain controller in the order in which the SOA messages enter the target message queue, so that the domain controller performs corresponding processing according to the SOA messages. By discarding at least some of the SOA messages in the target message queue, the message accumulation in the target message queue can be effectively alleviated.
[0078] Optionally, discarding at least part of the SOA messages in the target message queue includes: determining a message discard ratio according to the system operation data; and discarding the SOA messages in the target message queue according to the message discard ratio.
[0079] During implementation, the message discard ratio can be determined based on system operation data, wherein the system operation data includes but is not limited to: central processing unit (CPU) utilization, memory utilization, and input / output (I / O) resource utilization.
[0080] Exemplarily, if the system operation data includes CPU usage, the CPU usage can be determined as the message discard ratio, or half of the CPU usage can also be determined as the message discard ratio. When the system operation data includes CPU usage, memory usage, and input / output I / O resource usage, the average usage of the CPU usage, memory usage, and input / output I / O resource usage can be determined, and the average usage can be determined as the message discard ratio. Alternatively, the CPU usage, memory usage, and input / output I / O resource usage can be weighted summed, and the message discard ratio can be determined based on the sum obtained.
[0081] Then, the SOA messages in the target message queue can be discarded according to the message discard ratio, so that the number of discarded messages matches the system operation status, and the message accumulation situation can be processed more accurately.
[0082] In one method, the target quantity threshold can be a pre-set fixed quantity threshold, and in another method, the target quantity threshold can be determined in real time and flexibly according to the system operation status, so as to flexibly set the triggering conditions of the first processing strategy and flexibly handle the message accumulation situation.
[0083] Optionally, the first processing strategy indicates a basic accumulation quantity; the target quantity threshold is determined according to the following steps: obtaining system operation data of the domain controller in the vehicle that executes the SOA message in the target message queue, the system operation data including at least one of the following: central processing unit CPU utilization, memory utilization, input and output I / O resource utilization; determining a quantity adjustment value based on the system operation data; using the quantity adjustment value to adjust the basic accumulation quantity to obtain the target quantity threshold corresponding to the target message queue.
[0084] During implementation, the first processing strategy indicates a basic accumulation quantity, and the basic accumulation quantity is subsequently adjusted according to the system operation data to obtain a target quantity threshold that matches the system operation data. For example, if the system operation data indicates that the system operation occupies more resources, it can be determined that the target quantity threshold is smaller, such as the basic accumulation quantity can be adjusted downward to trigger the message discarding step earlier; conversely, if the system operation data indicates that the system operation occupies fewer resources, it can be determined that the target quantity threshold is larger, such as the basic accumulation quantity can be adjusted upward to trigger the message discarding step later. For example, if the target quantity threshold is 120, when the number of SOA messages in the target message queue is greater than 120, the SOA message discarding process is executed; if the target quantity threshold is 150, when the number of SOA messages in the target message queue is greater than 150, the SOA message discarding process is executed. It can be seen that the larger the target quantity threshold, the later the triggering time of discarding the message.
[0085] Exemplarily, the quantity adjustment value can be determined based on the system operation data. For example, if the system operation data indicates that the system operation occupies more resources, the quantity adjustment value is smaller; conversely, if the system operation data indicates that the system operation occupies fewer resources, the quantity adjustment value is larger; then the basic accumulation quantity is adjusted upward based on the quantity adjustment value to obtain the target quantity threshold corresponding to the target message queue.
[0086] Alternatively, if the system operation data indicates that the system operation occupies more resources, the quantity adjustment value is larger; conversely, if the system operation data indicates that the system operation occupies fewer resources, the quantity adjustment value is smaller; then the basic accumulation quantity is adjusted downward according to the quantity adjustment value to obtain the target quantity threshold corresponding to the target message queue.
[0087] Analysis shows that CPU usage can reflect CPU usage in real time. If the CPU usage is higher, CPU competition will lead to slower business processing speed. In this case, the target number threshold needs to be lowered accordingly. Memory usage can reflect the system's memory usage in real time. If the memory usage is higher, the business processing speed will be slower. In this case, the target number threshold should be lowered accordingly. Similarly, I / O usage can reflect the usage of disk and network I / O. If the I / O usage is higher, it will affect the CPU usage and indirectly lead to slower business processing speed. In this case, the target number threshold should be lowered accordingly.
[0088] Therefore, the target number threshold max_stack_num can be determined according to the following formula:
[0089] max_stack_num=Num_base+(P_cpu×(1-Rate_cpu)+P_mem×(1
[0090] -Rate_mem)+P_io×(1-Rate_io))×Num_base;
[0091] Among them, Num_base is the basic accumulation number, Rate_cpu is the CPU utilization, P_cpu is the first weight corresponding to the CPU utilization, Rate_mem is the memory utilization, P_mem is the second weight corresponding to the memory utilization, Rate_io is the I / O resource utilization, and P_io is the third weight corresponding to the I / O resource utilization.
[0092] Through the above process, the target quantity threshold can be determined more accurately, so as to execute the first processing strategy according to the target quantity threshold.
[0093] In another optional implementation manner, the message accumulation processing strategy includes a second processing strategy, and the second processing strategy indicates to perform queue processing on the accumulated SOA messages.
[0094] For example, if the SOA message is important data with a higher priority, the message is data that cannot be discarded, so the message accumulation processing strategy of the message queue storing the SOA message can be set to the second processing strategy. The SOA message for which the second processing strategy is set can be set according to the actual scenario. For example, the SOA message corresponding to the second processing strategy can include but is not limited to alarm data, vehicle control data, etc.
[0095] According to the message accumulation processing strategy, the SOA messages in the target message queue are processed, including: when the message accumulation processing strategy is the second processing strategy, the SOA messages in the target message queue are sent to the corresponding domain controller in sequence according to the order in which the SOA messages enter the target message queue.
[0096] See also Figure 3b The schematic diagram of the processing process of the second processing strategy shown in the figure shows that when the message accumulation processing strategy is the second processing strategy, each SOA message in the target message queue can be sent to the corresponding domain controller in sequence according to the order in which each SOA message enters the target message queue, that is, each SOA message in the target message queue is queued and processed in sequence. In this case, even if there is message accumulation in the target message queue, each SOA message needs to be sent to the corresponding domain controller in sequence for queue processing to ensure the normal use of the vehicle function.
[0097] In another optional implementation, the message accumulation processing strategy includes a third processing strategy, and the third processing strategy indicates discarding SOA messages whose waiting processing time exceeds a target time threshold; the target time threshold is dynamically set by the SOA communication middleware.
[0098] For example, if the SOA message is time-sensitive data, the message accumulation processing strategy of the message queue storing the SOA message can be set to the third processing strategy. The SOA message for which the third processing strategy is set can be set according to the actual scenario. For example, the SOA message corresponding to the third processing strategy may include but is not limited to: data collected by sensors, such as point cloud data collected by radar equipment, image data collected by cameras, etc. The data collected by general sensors is used to provide data support for assisted driving systems or automatic driving systems, so these data are time-sensitive data.
[0099] Processing the SOA message in the target message queue according to the message accumulation processing strategy includes:
[0100] Step b1: when the message accumulation processing strategy is the third processing strategy, extract the current SOA message to be processed from the target message queue in the order in which the SOA messages are written into the target message queue.
[0101] Step b2: Determine whether the waiting processing time of the current SOA message to be processed is greater than the target time threshold.
[0102] Step b3: If yes, the current SOA message to be processed is deleted, and the current SOA message to be processed is re-extracted from the target message queue; if no, the current SOA message to be processed is sent to the corresponding domain controller.
[0103] See also Figure 3c The schematic diagram of the processing process of the third processing strategy shown is that when the message accumulation processing strategy is the third processing strategy, the current SOA message to be processed is extracted from the target message queue in the order in which each SOA message is written into the target message queue. It is determined whether the current SOA message to be processed is expired, that is, whether the waiting processing time of the current SOA message to be processed is greater than the target time threshold. If so, the current SOA message to be processed is directly deleted (i.e., discarded) without being sent to the domain controller, and the current SOA message to be processed is re-extracted from the target message queue. On the contrary, if the waiting processing time of the current SOA message to be processed is less than or equal to the target time threshold, the current SOA message to be processed is sent to the corresponding domain controller for business processing.
[0104] Through the above process, expired messages that have not been processed due to timeout can be deleted to speed up message processing and alleviate message accumulation.
[0105] Optionally, the target duration threshold is determined according to the following steps: obtaining driving status data of the vehicle; and determining the target duration threshold corresponding to the target message queue according to the driving status data and the message type of the SOA message in the target message queue.
[0106] During implementation, the SOA message can correspond to different duration thresholds under different driving conditions. For example, if the vehicle is in driving condition, the duration threshold of the sensor data can be set shorter, such as 1s; if the vehicle is in parking condition, the duration threshold of the sensor data can be set longer, such as 3s.
[0107] For example, mapping relationship data may be set, in which target duration thresholds corresponding to SOA messages of each message type are configured for each driving state, so as to determine the target duration threshold corresponding to the target message queue based on the mapping relationship data, driving state data and the message type of the SOA message.
[0108] Through the above process, the target duration threshold can be determined more accurately, and the time-sensitive SOA messages can be deleted more accurately, thereby ensuring the message processing speed and accuracy.
[0109] During specific implementation, the first processing strategy and the third processing strategy can also be combined as a processing strategy for the message queue. For example, if the SOA message is data with a lower priority and timeliness, such as the current song information and playback progress information in a music playlist, it is possible to first determine whether the number of SOA messages in the message queue is greater than the target number threshold. If so, some SOA messages in the message queue are discarded, and for the current SOA message to be processed, it is determined whether the SOA message is expired (that is, whether the waiting processing time of the SOA message is greater than the target time threshold). If it is expired, the SOA message is discarded and the current SOA message to be processed is re-determined; if it is not expired, the current SOA message to be processed is sent to the corresponding domain controller. Also, when it is determined that the number of SOA messages in the message queue is less than or equal to the target number threshold, there is no need to discard the SOA message in the message queue. For the current SOA message to be processed, it is determined whether the SOA message is expired. If it is expired, the SOA message is discarded and the current SOA message to be processed is re-determined; if it is not expired, the current SOA message to be processed is sent to the corresponding domain controller.
[0110] Optionally, the method also includes: periodically generating statistical reports, wherein the statistical reports include at least part of the following contents: SOA message discarding time, discarded SOA message name, discarded SOA message number, central processing unit CPU utilization, memory utilization, input and output I / O resource utilization; sending the statistical reports to a cloud server, and the cloud server is used to determine the message processing efficiency and / or system performance of the vehicle based on the statistical reports.
[0111] During implementation, a statistical report may be generated periodically, and the statistical report includes at least part of the following contents: SOA message discarding time, discarded SOA message name, discarded SOA message quantity, CPU usage, memory usage, and I / O resource usage. The statistical report is sent to the cloud server so that the cloud server can determine the message processing efficiency and / or system performance of the vehicle based on the statistical report. For example, the system performance may be excellent operation, slow operation, etc.
[0112] Through the above process, the vehicle's message processing status can be understood and analyzed in real time, so that the vehicle system can be improved and optimized to ensure the normal operation of the vehicle.
[0113] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.
[0114] Based on the same inventive concept, the embodiment of the present disclosure also provides a message accumulation processing device corresponding to the message accumulation processing method. Since the principle of solving the problem by the device in the embodiment of the present disclosure is similar to the above-mentioned message accumulation processing method in the embodiment of the present disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0115] Reference Figure 4 As shown, it is a schematic diagram of the architecture of a message accumulation processing device provided by an embodiment of the present disclosure, and the device includes: a receiving module 401, an acquisition module 402, and a processing module 403; wherein,
[0116] The receiving module 401 is used to receive an SOA message sent through a target service interface indicating the invocation of a target SOA service; the target service interface is one of a plurality of service interfaces corresponding to the target SOA service; the target SOA service is one of at least one SOA service provided by a target business process;
[0117] The acquisition module 402 is used to update the SOA message to the target message queue corresponding to the target service interface, and obtain the message accumulation processing strategy corresponding to the target message queue;
[0118] The processing module 403 is used to process the SOA message in the target message queue according to the message accumulation processing strategy.
[0119] In a possible implementation, the acquisition module 402, when acquiring the message accumulation processing strategy corresponding to the target message queue, is used to:
[0120] Obtain a message accumulation processing strategy pre-configured by the target business process by calling a processing strategy interface; wherein the message accumulation strategy is a message accumulation strategy configured for the target SOA service and shared by multiple service interfaces corresponding to the target SOA service; or, the message accumulation strategy is configured for the target service interface in the target SOA service.
[0121] In a possible implementation manner, the message accumulation processing strategy includes a first processing strategy, wherein the first processing strategy indicates that after the number of accumulated SOA messages exceeds a target number threshold, SOA message discard processing is performed, and the target number threshold is dynamically set by the SOA communication middleware;
[0122] The processing module 403, when processing the SOA message in the target message queue according to the message accumulation processing strategy, is used to:
[0123] When the message accumulation processing strategy is the first processing strategy, determining the number of SOA messages in the target message queue;
[0124] When the number of SOA messages in the target message queue is greater than a target number threshold, discarding at least part of the SOA messages in the target message queue;
[0125] According to the order in which the SOA messages enter the target message queue, the remaining SOA messages in the target message queue are sent to the corresponding domain controller.
[0126] In a possible implementation manner, the first processing strategy indicates a basic accumulation quantity;
[0127] The processing module 403 is used to determine the target quantity threshold according to the following steps:
[0128] Acquire system operation data of a domain controller in the vehicle that executes the SOA message in the target message queue, wherein the system operation data includes at least one of the following: CPU usage, memory usage, and input / output I / O resource usage;
[0129] determining a quantity adjustment value based on the system operation data;
[0130] The basic accumulation quantity is adjusted using the quantity adjustment value to obtain a target quantity threshold corresponding to the target message queue.
[0131] In a possible implementation, when discarding at least part of the SOA messages in the target message queue, the processing module 403 is used to: determine a message discard ratio according to the system operation data; and discard the SOA messages in the target message queue according to the message discard ratio.
[0132] In a possible implementation manner, the message accumulation processing strategy includes a second processing strategy, and the second processing strategy indicates to perform queue processing on the accumulated SOA messages;
[0133] The processing module 403, when processing the SOA messages in the target message queue according to the message accumulation processing strategy, is used to: when the message accumulation processing strategy is the second processing strategy, send each SOA message in the target message queue to the corresponding domain controller in sequence according to the order in which each SOA message enters the target message queue.
[0134] In a possible implementation, the message accumulation processing strategy includes a third processing strategy, and the third processing strategy indicates discarding SOA messages whose waiting processing time exceeds a target time threshold; the target time threshold is dynamically set by the SOA communication middleware;
[0135] The processing module 403, when processing the SOA message in the target message queue according to the message accumulation processing strategy, is used to:
[0136] When the message accumulation processing strategy is the third processing strategy, extracting the current to-be-processed SOA message from the target message queue in the order in which the SOA messages are written into the target message queue;
[0137] Determine whether the waiting processing time of the current SOA message to be processed is greater than a target time threshold;
[0138] If yes, the currently pending SOA message is deleted, and the currently pending SOA message is re-extracted from the target message queue;
[0139] If not, the currently-to-be-processed SOA message is sent to the corresponding domain controller.
[0140] In a possible implementation, the processing module 403 is used to determine the target duration threshold according to the following steps: obtaining driving status data of the vehicle; and determining the target duration threshold corresponding to the target message queue based on the driving status data and the message type of the SOA message in the target message queue.
[0141] In a possible implementation manner, the device further includes: a generating module 404, configured to:
[0142] Generate a statistical report periodically, wherein the statistical report includes at least part of the following contents: SOA message discarding time, discarded SOA message name, discarded SOA message quantity, CPU utilization rate, memory utilization rate, input and output I / O resource utilization rate;
[0143] The statistical report is sent to a cloud server, and the cloud server is used to determine the message processing efficiency and / or system performance of the vehicle based on the statistical report.
[0144] For descriptions of the processing flow of each module in the device and the interaction flow between each module, reference may be made to the relevant descriptions in the above method embodiment, which will not be described in detail here.
[0145] Based on the same technical concept, the embodiment of the present disclosure also provides a computer device. Figure 5As shown, it is a schematic diagram of the structure of a computer device 500 provided in an embodiment of the present disclosure, including a processor 501, a memory 502, and a bus 503. Among them, the memory 502 is used to store execution instructions, including a memory 5021 and an external memory 5022; the memory 5021 here is also called an internal memory, which is used to temporarily store the operation data in the processor 501, and the data exchanged with the external memory 5022 such as a hard disk. The processor 501 exchanges data with the external memory 5022 through the memory 5021. When the computer device 500 is running, the processor 501 communicates with the memory 502 through the bus 503, so that the processor 501 executes the following instructions:
[0146] Receiving an SOA message sent through a target service interface indicating the invocation of a target SOA service; the target service interface is one of a plurality of service interfaces corresponding to the target SOA service; the target SOA service is one of at least one SOA service provided by a target business process;
[0147] Update the SOA message to the target message queue corresponding to the target service interface, and obtain the message accumulation processing strategy corresponding to the target message queue;
[0148] The SOA messages in the target message queue are processed according to the message accumulation processing strategy.
[0149] In a possible implementation, the instruction of the processor 501 includes obtaining a message accumulation processing strategy corresponding to the target message queue, including:
[0150] Obtain a message accumulation processing strategy pre-configured by the target business process by calling a processing strategy interface;
[0151] The message accumulation strategy is a message accumulation strategy configured for the target SOA service and shared by multiple service interfaces corresponding to the target SOA service; or, the message accumulation strategy is configured for the target service interface in the target SOA service.
[0152] In a possible implementation manner, in the instruction of the processor 501, the message accumulation processing strategy includes a first processing strategy, and the first processing strategy indicates that after the number of accumulated SOA messages exceeds a target number threshold, SOA message discarding processing is performed, and the target number threshold is dynamically set by the SOA communication middleware;
[0153] Processing the SOA message in the target message queue according to the message accumulation processing strategy includes:
[0154] When the message accumulation processing strategy is the first processing strategy, determining the number of SOA messages in the target message queue;
[0155] When the number of SOA messages in the target message queue is greater than a target number threshold, discarding at least part of the SOA messages in the target message queue;
[0156] According to the order in which the SOA messages enter the target message queue, the remaining SOA messages in the target message queue are sent to the corresponding domain controller.
[0157] In a possible implementation manner, in the instruction of the processor 501, the first processing strategy indicates a basic accumulation quantity;
[0158] The target quantity threshold is determined according to the following steps:
[0159] Acquire system operation data of a domain controller in the vehicle that executes the SOA message in the target message queue, wherein the system operation data includes at least one of the following: CPU usage, memory usage, and input / output I / O resource usage;
[0160] determining a quantity adjustment value based on the system operation data;
[0161] The basic accumulation quantity is adjusted using the quantity adjustment value to obtain a target quantity threshold corresponding to the target message queue.
[0162] In a possible implementation manner, in the instruction of the processor 501, discarding at least part of the SOA messages in the target message queue includes:
[0163] Determining a message discard ratio based on the system operation data;
[0164] According to the message discard ratio, the SOA messages in the target message queue are discarded.
[0165] In a possible implementation manner, in the instruction of the processor 501, the message accumulation processing strategy includes a second processing strategy, and the second processing strategy indicates to perform queuing processing on the accumulated SOA messages;
[0166] Processing the SOA message in the target message queue according to the message accumulation processing strategy includes:
[0167] When the message accumulation processing strategy is the second processing strategy, the SOA messages in the target message queue are sent to the corresponding domain controller in sequence according to the order in which the SOA messages enter the target message queue.
[0168] In a possible implementation manner, in the instruction of the processor 501, the message accumulation processing strategy includes a third processing strategy, and the third processing strategy indicates discarding SOA messages whose waiting processing time exceeds a target time threshold; the target time threshold is dynamically set by the SOA communication middleware;
[0169] Processing the SOA message in the target message queue according to the message accumulation processing strategy includes:
[0170] When the message accumulation processing strategy is the third processing strategy, extracting the current to-be-processed SOA message from the target message queue in the order in which the SOA messages are written into the target message queue;
[0171] Determine whether the waiting processing time of the current SOA message to be processed is greater than a target time threshold;
[0172] If yes, the currently pending SOA message is deleted, and the currently pending SOA message is re-extracted from the target message queue;
[0173] If not, the currently-to-be-processed SOA message is sent to the corresponding domain controller.
[0174] In a possible implementation manner, in the instruction of the processor 501, the target duration threshold is determined according to the following steps:
[0175] Obtaining vehicle driving status data;
[0176] A target duration threshold corresponding to the target message queue is determined according to the driving status data and the message type of the SOA message in the target message queue.
[0177] In a possible implementation manner, in the instruction of the processor 501, the method further includes:
[0178] Generate a statistical report periodically, wherein the statistical report includes at least part of the following contents: SOA message discarding time, discarded SOA message name, discarded SOA message quantity, CPU utilization rate, memory utilization rate, input and output I / O resource utilization rate;
[0179] The statistical report is sent to a cloud server, and the cloud server is used to determine the message processing efficiency and / or system performance of the vehicle based on the statistical report.
[0180] The disclosed embodiment also provides a vehicle, which is used to execute the steps of the message accumulation processing method as described above.
[0181] The present disclosure also provides a computer program product that carries a program code. The program code includes instructions that can be used to execute the steps of the message accumulation processing method described in the above method embodiment. For details, please refer to the above method embodiment, which will not be repeated here.
[0182] The computer program product may be implemented in hardware, software or a combination thereof. In one optional embodiment, the computer program product is implemented as a computer program product. In another optional embodiment, the computer program product is implemented as a software product, such as a software development kit (SDK).
[0183] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. In the several embodiments provided in the present disclosure, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the device or unit can be electrical, mechanical or other forms.
[0184] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0185] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0186] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable program product that can be executed by a processor. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a program product and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned program products include: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks or optical disks.
[0187] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure is described in detail with reference to the aforementioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the aforementioned embodiments within the technical scope disclosed in the present disclosure, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be based on the protection scope of the claims.
Claims
1. A method for processing message accumulation, characterized in that: Application in vehicle service-oriented architecture (SOA) communication middleware, including: Receiving an SOA message sent through a target service interface indicating the invocation of a target SOA service; the target service interface is one of a plurality of service interfaces corresponding to the target SOA service; the target SOA service is one of at least one SOA service provided by a target business process; Update the SOA message to the target message queue corresponding to the target service interface, and obtain the message accumulation processing strategy corresponding to the target message queue; The SOA messages in the target message queue are processed according to the message accumulation processing strategy.
2. The method according to claim 1, characterized in that: Obtaining the message accumulation processing strategy corresponding to the target message queue includes: Obtain a message accumulation processing strategy pre-configured by the target business process by calling a processing strategy interface; The message accumulation strategy is a message accumulation strategy configured for the target SOA service and shared by multiple service interfaces corresponding to the target SOA service; or, the message accumulation strategy is configured for the target service interface in the target SOA service.
3. The method according to claim 1, characterized in that The message accumulation processing strategy includes a first processing strategy, wherein the first processing strategy indicates that after the number of accumulated SOA messages exceeds a target number threshold, SOA message discard processing is performed, and the target number threshold is dynamically set by the SOA communication middleware; The processing of the SOA message in the target message queue according to the message accumulation processing strategy includes: When the message accumulation processing strategy is the first processing strategy, determining the number of SOA messages in the target message queue; When the number of SOA messages in the target message queue is greater than a target number threshold, discarding at least part of the SOA messages in the target message queue; According to the order in which the SOA messages enter the target message queue, the remaining SOA messages in the target message queue are sent to the corresponding domain controller.
4. The method according to claim 3, characterized in that The first processing strategy indicates a basic accumulation quantity; The target quantity threshold is determined according to the following steps: Acquire system operation data of a domain controller in the vehicle that executes the SOA message in the target message queue, wherein the system operation data includes at least one of the following: CPU usage, memory usage, and input / output I / O resource usage; determining a quantity adjustment value based on the system operation data; The basic accumulation quantity is adjusted using the quantity adjustment value to obtain a target quantity threshold corresponding to the target message queue.
5. The method according to claim 4, characterized in that The discarding of at least part of the SOA messages in the target message queue comprises: Determining a message discard ratio based on the system operation data; According to the message discard ratio, the SOA messages in the target message queue are discarded.
6. The method according to claim 1, characterized in that The message accumulation processing strategy includes a second processing strategy, wherein the second processing strategy indicates to perform queue processing on the accumulated SOA messages; The processing of the SOA message in the target message queue according to the message accumulation processing strategy includes: When the message accumulation processing strategy is the second processing strategy, the SOA messages in the target message queue are sent to the corresponding domain controller in sequence according to the order in which the SOA messages enter the target message queue.
7. The method according to claim 1, characterized in that The message accumulation processing strategy includes a third processing strategy, wherein the third processing strategy indicates discarding SOA messages whose waiting processing time exceeds a target time threshold; the target time threshold is dynamically set by the SOA communication middleware; The processing of the SOA message in the target message queue according to the message accumulation processing strategy includes: When the message accumulation processing strategy is the third processing strategy, extracting the current to-be-processed SOA message from the target message queue in the order in which the SOA messages are written into the target message queue; Determine whether the waiting processing time of the current SOA message to be processed is greater than a target time threshold; If yes, the currently pending SOA message is deleted, and the currently pending SOA message is re-extracted from the target message queue; If not, the currently-to-be-processed SOA message is sent to the corresponding domain controller.
8. The method according to claim 7, characterized in that The target duration threshold is determined according to the following steps: Obtaining vehicle driving status data; A target duration threshold corresponding to the target message queue is determined according to the driving status data and the message type of the SOA message in the target message queue.
9. The method according to claim 1, characterized in that: The method further comprises: Generate a statistical report periodically, wherein the statistical report includes at least part of the following contents: SOA message discarding time, discarded SOA message name, discarded SOA message quantity, CPU utilization rate, memory utilization rate, input and output I / O resource utilization rate; The statistical report is sent to a cloud server, and the cloud server is used to determine the message processing efficiency and / or system performance of the vehicle based on the statistical report.
10. A vehicle, characterized in that: The vehicle is used to execute the steps of the message accumulation processing method as described in any one of claims 1 to 9.
11. A computer device, characterized in that: include: A processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and when the machine-readable instructions are executed by the processor, the steps of the message accumulation processing method as described in any one of claims 1 to 9 are performed.
12. A computer program product, comprising a computer program, characterized in that When the computer program is executed, the steps of the method for processing message accumulation according to any one of claims 1 to 9 are implemented.