CN-122019428-A - Request response method, device, control system, vehicle, storage medium, program product, and chip system
Abstract
The present disclosure relates to a request response method, device, control system, vehicle, storage medium, program product and chip system, the method comprising that a second processor sends a data access request to a first processor in case of having access requirement for accessing the storage medium; the second processor executes subsequent operations under the condition that response information returned by the first processor is received. The method is used for realizing real-time response feedback of the task in the second processor.
Inventors
- LV YICHEN
Assignees
- 小米汽车科技有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260205
Claims (20)
- 1. A request response method, comprising: the second processor sends a data access request to the first processor under the condition of having access requirements for accessing the storage medium; the first processor accessing the storage medium in response to the data access request; And the second processor executes subsequent operations under the condition of receiving response information returned by the first processor.
- 2. The request response method according to claim 1, wherein the access requirement is triggered by the second processor in a process of executing a task to be processed, and the second processor executes a subsequent operation if receiving response information returned by the first processor, including: And under the condition that the processing priority of the task to be processed is greater than or equal to a first priority threshold, the second processor blocks waiting until the subsequent operation of the task to be processed is executed under the condition that response information returned by the first processor is received, wherein the processing priority is inversely related to response time delay.
- 3. The request response method according to claim 2, characterized in that the method further comprises: And under the condition that the processing priority of the task to be processed is smaller than the first priority threshold, the second processor executes other tasks after submitting the data processing request to the first processor and asynchronously waits for response information returned by the first processor, and under the condition that the response information returned by the first processor is acquired, the second processor continues to execute subsequent operations of the task to be processed based on the response information.
- 4. The request response method according to claim 3, wherein the second processor performs other tasks after submitting the data processing request to the first processor, and asynchronously waits for response information returned by the first processor, and further comprising: The first processor responds to the data access request, accesses the storage medium and stores the response information after the access is finished; the second processor sends an information extraction request to the first processor, and the first processor responds to the information extraction request, reads the response information and returns the response information to the second processor.
- 5. The request response method according to claim 3, wherein the second processor performs other tasks after submitting the data processing request to the first processor, and asynchronously waits for response information returned by the first processor, and further comprising: The first processor responds to the data access request, accesses the storage medium and returns the response information to the shared memory after the access is finished; and the second processor reads the response information from the shared memory.
- 6. The request response method according to claim 1, wherein the first processor accessing the storage medium in response to the data access request comprises: the first processor sorts the data access requests under the condition that the data access requests sent by the second processors are received; the first processor sequentially responds to each data processing request according to the ordered result and accesses the storage medium.
- 7. The request response method according to claim 6, characterized in that the method further comprises: The first processor allocates corresponding identity tags for the received data access requests; the ordering of the plurality of data access requests includes: The first processor sorts the identity tags of the plurality of data access requests according to the sequence of receiving the data access requests; Or the first processor sorts the identity tags of the data access requests based on the processing priority of the tasks to be processed corresponding to the data access requests.
- 8. The request response method according to any one of claims 1 to 7, wherein the second processor, in the case of having an access requirement to access the storage medium, after transmitting a data access request to the first processor, further comprises: The second processor counts the time length of the first processor responding to the data access request; And under the condition that the timing reaches a preset duration threshold, the second processor continues to execute subsequent operations, and marks a response failure label on the task to be processed corresponding to the data access request.
- 9. The request response method according to claim 8, wherein the second processor continues to perform subsequent operations in the case where the timer reaches a preset duration threshold, comprising: Under the condition that the occupancy rate of the first processor reaches a preset occupancy rate threshold value, the second processor continues to execute subsequent operations under the condition that the timing reaches a first preset duration threshold value; Under the condition that the occupancy rate of the first processor does not reach a preset occupancy rate threshold value, under the condition that the timing reaches a second preset duration threshold value, the second processor continues to execute subsequent operations; The first duration threshold is greater than the second duration threshold.
- 10. The request response method according to claim 8, wherein the second processor continues to perform subsequent operations in the case where the timer reaches a preset duration threshold, comprising: under the condition that the processing priority of the data access request corresponding to the task to be processed is greater than or equal to a second priority threshold, the second processor continues to execute subsequent operations under the condition that the timing reaches a third preset duration threshold; Under the condition that the processing priority of the data access request corresponding to the task to be processed is smaller than the second priority threshold, the second processor continues to execute subsequent operations under the condition that the timing reaches a fourth preset duration threshold; the third preset duration threshold is smaller than the fourth preset duration threshold.
- 11. The method according to claim 8, wherein in the case where the timer reaches the preset duration threshold, the second processor continues to perform the subsequent operation, and after the second processor marks the response failure label on the task to be processed corresponding to the data access request, the method further comprises: The second processor sending a congestion notification to at least one of the second processors supporting an access protocol of the storage medium; a second processor supporting an access protocol of the storage medium sends a handoff prompt to the first processor and the remaining second processors based on the received occlusion prompt.
- 12. The request response method of claim 11, wherein the second processor supporting the access protocol of the storage medium sends a handoff prompt to the first processor and the remaining second processors based on the received congestion prompt, comprising: at least one of the second processors supporting an access protocol of the storage medium determines a third processor to take over access to the storage medium by the first processor based on occupancy; the third processor sends the switching prompt to the first processor and the rest of the second processors based on the occlusion prompt.
- 13. The request response method of claim 12, wherein the at least one second processor supporting the access protocol of the storage medium determines a third processor to take over access to the storage medium by the first processor based on occupancy, comprising: and determining a third processor based on the occupancy rate to take over the first processor to access the storage medium under the condition that at least one second processor supporting the access protocol of the storage medium is in a preset duration and the received blocking prompt reaches a preset number threshold.
- 14. The request response method according to claim 12, after the sending the handover hint to the first processor and the remaining second processors, further comprising: The rest second processors send data access requests of the tasks to be processed marked with the response failure labels to the third processor again; And the first processor and the rest of the second processors send the data access request to the third processor under the condition of having access requirements for accessing the storage medium.
- 15. A request response device, comprising: a sending module configured to send a data access request to a first processor in case of having an access requirement for accessing a storage medium; an access module configured to access the storage medium by the first processor in response to the data access request; and the waiting module is configured to execute subsequent operations when the second processor receives response information returned by the first processor.
- 16. The request response device of claim 15, wherein the access requirement is triggered by the second processor in performing a pending task, the waiting module further configured to: And under the condition that the processing priority of the task to be processed is greater than or equal to a first priority threshold, the second processor blocks waiting until the subsequent operation of the task to be processed is executed under the condition that response information returned by the first processor is received, wherein the processing priority is inversely related to response time delay.
- 17. The request response device of claim 16, wherein the wait module is further configured to: And under the condition that the processing priority of the task to be processed is smaller than the first priority threshold, the second processor executes other tasks after submitting the data processing request to the first processor and asynchronously waits for response information returned by the first processor, and under the condition that the response information returned by the first processor is acquired, the second processor continues to execute subsequent operations of the task to be processed based on the response information.
- 18. The request response device of claim 17, wherein the wait module is further configured to: The first processor responds to the data access request, accesses the storage medium and stores the response information after the access is finished; the second processor sends an information extraction request to the first processor, and the first processor responds to the information extraction request, reads the response information and returns the response information to the second processor.
- 19. The request response device of claim 17, wherein the second waiting module is further configured to: The first processor responds to the data access request, accesses the storage medium and returns the response information to the shared memory after the access is finished; and the second processor reads the response information from the shared memory.
- 20. The request response device of claim 15, wherein the access module is further configured to: the first processor sorts the data access requests under the condition that the data access requests sent by the second processors are received; the first processor sequentially responds to each data processing request according to the ordered result and accesses the storage medium.
Description
Request response method, device, control system, vehicle, storage medium, program product, and chip system Technical Field The present disclosure relates to the field of computer storage technologies, and in particular, to a request response method, a request response device, a request response control system, a request response vehicle, a request response storage medium, a request response program product, and a request response chip system. Background As the automotive electronics and electrical architecture evolves toward multi-core heterogeneous platforms, different functional modules in the automotive operating system (e.g., an auto sar-based architecture) need to be deployed on different physical cores. Generally, the multi-core architecture adopts an asynchronous cross-core service calling mode to realize request response among the multi-cores, but the asynchronous cross-core service calling mode is difficult to meet the requirements of real-time synchronous response, high concurrency processing and high reliability in an actual application scene. Disclosure of Invention To overcome the problems in the related art, the present disclosure provides a request response method, apparatus, control system, vehicle, storage medium, program product, and chip system, the method is used for solving the problem that the asynchronous cross-core service calling mode in the prior art cannot meet real-time synchronous response. According to some embodiments of the present disclosure, there is provided a request response method including: the second processor sends a data access request to the first processor under the condition of having access requirements for accessing the storage medium; the first processor accessing the storage medium in response to the data access request; And the second processor executes subsequent operations under the condition of receiving response information returned by the first processor. After the second processor sends out the data access request, the subsequent operation is continuously executed after the response information of the first processor is received, the process logically converts the cross-core remote calling process into a synchronous calling process, response time fluctuation of tasks in the second processor caused by factors such as task scheduling and message queue congestion is avoided, and the second processor can stably acquire an access result within a period of time after the data access request is sent out, so that real-time feedback of the tasks in the second processor is realized. In certain implementations of the first aspect, the access requirement is triggered by the second processor in a process of executing a task to be processed, and the second processor executes a subsequent operation when receiving response information returned by the first processor, including: And under the condition that the processing priority of the task to be processed is greater than or equal to a first priority threshold, the second processor blocks waiting until the subsequent operation of the task to be processed is executed under the condition that response information returned by the first processor is received, wherein the processing priority is inversely related to response time delay. In certain embodiments of the first aspect, the method further comprises: Or under the condition that the processing priority of the task to be processed is smaller than the first priority threshold, the second processor executes other tasks after submitting the data processing request to the first processor and asynchronously waits for response information returned by the first processor, and under the condition that the response information returned by the first processor is acquired by the second processor, the second processor continues to execute subsequent operations of the task to be processed based on the response information. The second processor can conduct differentiated processing according to the importance of the task to be processed, ensures that the response time delay of the task with high priority is shortest in a synchronous calling mode for the task with high priority, ensures the real-time performance, the certainty and the reliability of response information, eliminates the random delay caused by a task queue, a scheduling opportunity and the like in asynchronous communication, and can immediately execute other tasks after sending a data access request for the task with low priority, so that the time slice of the second processor can be fully utilized, the idle state of the second processor is avoided, and the overall processing capacity and the concurrent performance are remarkably improved. In certain implementations of the first aspect, after submitting the data processing request to the first processor, the second processor performs other tasks and asynchronously waits for response information returned by the first processor, further including: The first processor