Task processing system, task processing method, and test system
By classifying and prioritizing immediate tasks through a task processing system, the delay problem caused by the lack of differentiation in task timeliness in existing technologies is solved, ensuring the reliability and effectiveness of vehicle testing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHEJIANG GEELY HLDG GRP CO LTD
- Filing Date
- 2026-03-04
- Publication Date
- 2026-06-09
AI Technical Summary
In existing technologies, server-based vehicle testing solutions fail to differentiate between the time-sensitive nature of tasks when allocating test resources, resulting in delays in the execution of some immediate tasks and affecting the reliability of the testing process and the validity of the test results.
A task processing system is provided, which classifies test tasks through a task submission module, a planned task queue module, a task retrieval module, and a task distribution module, prioritizes immediate tasks, and ensures that high-time-sensitive tasks are not delayed due to queuing delays.
It enables timely processing of test tasks, ensures timely completion of verification of key scenarios, improves the reliability of the test process and the validity of test results, and ensures that scheduled tasks are executed in an orderly manner according to preset time conditions, avoiding omissions in periodic tests.
Smart Images

Figure CN122173231A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of information processing technology, and in particular relates to a task processing system, a task processing method and a testing system. Background Technology
[0002] Automated testing is a technology that uses scripts, tools, or platforms to automatically execute test cases and verify the functionality of software or hardware. Its core is to replace manual labor in performing repetitive and tedious testing operations. It can not only significantly improve testing efficiency and reduce labor costs, but also reduce human error through standardized processes. It has been widely used in software development, hardware verification, and other fields, and has become one of the key links in modern R&D systems to ensure product quality.
[0003] In the field of vehicle testing, existing technologies have gradually built an automated testing system with hardware-in-the-loop test benches, real vehicle data acquisition terminals, and subsystem integration test platforms as the core, which can realize functional verification, performance testing, and fault injection testing of key components such as vehicle controllers, battery management systems, and power subsystems.
[0004] In current server-based vehicle testing solutions, the server typically uses a uniform queue scheduling mechanism when allocating test resources and executing test tasks. This mechanism does not differentiate between tasks based on their timeliness and processes all tasks in the same queue. As a result, some test tasks are delayed, making it impossible to complete the verification of key scenarios in a timely manner. Consequently, this affects the reliability of the testing process and the validity of the test results. Summary of the Invention
[0005] This application provides a task processing system, a task processing method, and a testing system. The task processing system can classify test tasks, prioritize the processing of immediate tasks, and avoid test delays caused by queuing delays for time-sensitive tasks.
[0006] In a first aspect, embodiments of this application provide a task processing system, which is applied to a server and includes: a task submission module, a planned task queue module, a task retrieval module, and a task distribution module; The task submission module is used to respond to the client's test request and obtain the test task; The task submission module is further configured to send the test task to the task distribution module when it is determined that the test task is an immediately triggered test task; or, when it is determined that the test task is a timed triggered test task or an automatically triggered test task, send the test task to the scheduled task queue module. The planned task queue module is used to store the test tasks that are triggered at regular intervals or automatically. The task retrieval module is used to monitor the stored test tasks. If the test task is detected to meet the task triggering conditions, the test task is sent to the task distribution module. The task distribution module is used to determine the target test device for the test task from a plurality of pre-configured test devices, and send the test task to the target test device so that the target test device can perform test operations according to the test task.
[0007] In one embodiment of this application, the system further includes a device management module; The device management module is used to obtain test information of multiple pre-configured test devices and send the test information of the multiple devices to the task distribution module; The task distribution module is specifically used to determine the target test device for the test task from among the multiple test devices based on the device information of the multiple test devices and the test object corresponding to the test task.
[0008] In one embodiment of this application, the task distribution module, when determining the target test device for the test task from among the multiple test devices based on the device information of the multiple test devices and the test object corresponding to the test task, is specifically used for: If the test object corresponding to the test task is the software function of the vehicle controller, then at least one first device is determined from the plurality of devices according to the device information, and the first device is used to test the software function of the vehicle controller. Select an idle first device from at least one of the first devices as the target test device; or, If the test object corresponding to the test task is the middleware of the vehicle software, then at least one second device is determined from the plurality of devices according to the device information, and the second device is used to test the middleware of the vehicle software. Select an idle second device from at least one of the second devices as the target test device.
[0009] In one embodiment of this application, the task processing system further includes a ready task queue module; The ready task queue module is used to send the test task sent by the task submission module to the task distribution module; The task submission module is specifically used to send the test task to the ready task queue module when it is determined that the test task type is a timed trigger test task or an automatically trigger test task. Alternatively, the task submission module is specifically used to send the test task to the ready task queue module when it is determined that the test task type is an immediately triggered test task.
[0010] In one embodiment of this application, the task retrieval module is specifically used to monitor the stored test tasks. If the test task is detected to meet the task triggering conditions, the test task is sent to the ready task queue module. The ready task queue module is also used to send the test task to the task distribution module.
[0011] In one embodiment of this application, the task processing system further includes a task execution management module; The task distribution module is specifically used to send the test task to the target test device through the task operation management module; The task operation management module is used to send the feedback information to the client when it receives the feedback information sent by the target test device. The feedback information includes the test status of the test task and / or the test result of the test task.
[0012] Secondly, embodiments of this application provide a task processing method, the method being applied to a server, the method comprising: Responding to the client's test request, retrieve the test task; If the test task is determined to be an immediately triggered test task, a target test device is determined for the test task from a plurality of pre-configured test devices; or, If the test task is determined to be a timed test task or an automatically triggered test task, the timed test task or the automatically triggered test task is stored; the stored test task is monitored; if the test task is detected to meet the task triggering conditions, a target test device is determined for the test task from a plurality of pre-configured test devices. The test task is sent to the target test device so that the target test device can perform test operations according to the test task.
[0013] In one embodiment of this application, determining the target test device for the test task from a pre-configured plurality of test devices includes: Obtain test information from multiple pre-configured test devices; Based on the device information of the multiple test devices and the test object corresponding to the test task, the target test device is determined for the test task from the multiple test devices.
[0014] In one embodiment of this application, determining the target test device for the test task from among the multiple test devices based on the device information of the multiple test devices and the test object corresponding to the test task includes: If the test object corresponding to the test task is the software function of the vehicle controller, then at least one first device is determined from the plurality of devices according to the device information, and the first device is used to test the software function of the vehicle controller. Select an idle first device from at least one of the first devices as the target test device; or, If the test object corresponding to the test task is the middleware of the vehicle software, then at least one second device is determined from the plurality of devices according to the device information, and the second device is used to test the middleware of the vehicle software. Select an idle second device from at least one of the second devices as the target test device.
[0015] Thirdly, embodiments of this application provide a testing system, including a client, a server, and a target testing device, wherein the server deploys the task processing system as described in the first aspect.
[0016] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer program instructions, which, when executed by a processor, implement the task processing method as described in the second aspect.
[0017] Fifthly, embodiments of this application provide a computer program product in which instructions, when executed by a processor in the cloud, cause the cloud to perform the task processing method as described in the second aspect.
[0018] This application provides a task processing system, a task processing method, and a testing system. The task processing system includes a task submission module, a planned task queue module, a task retrieval module, and a task distribution module. The task submission module is used to respond to a test request from a client and obtain test tasks. The task submission module is also used to send the test task to the task distribution module if the test task type is determined to be an immediately triggered test task; or, if the test task type is determined to be a timed triggered test task or an automatically triggered test task, send the test task to the planned task queue module. The planned task queue module is used to store timed triggered test tasks or automatically triggered test tasks. The task retrieval module is used to retrieve the stored test tasks. The system monitors test tasks. If a test task meets the triggering conditions, it sends the test task to the task distribution module. The task distribution module determines the target test device for a test task from a pre-configured pool of test devices and sends the test task to the target test device. The target test device then performs test operations according to the test task. The system can classify test tasks, prioritize immediate tasks, avoid test delays caused by queuing for time-sensitive tasks, and complete the verification of key scenarios in a timely manner, thereby ensuring the reliability of the test process and the validity of the test results. Scheduled tasks are triggered and executed according to preset time conditions, which can ensure the orderly progress of periodic test tasks and avoid omissions in periodic tests due to resource allocation to immediate tasks. Attached Figure Description
[0019] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a schematic diagram of the task processing system provided in an embodiment of this application; Figure 2 This is a schematic diagram of the structure of the testing system provided in an embodiment of this application; Figure 3 This is a flowchart illustrating a task processing method provided in an embodiment of this application; Figure 4 This is a schematic diagram of the framework of the testing system provided in the embodiments of this application. Figure 1 ; Figure 5 This is a schematic diagram of the framework of the testing system provided in the embodiments of this application. Figure 2 ; Figure 6 This is a schematic diagram of the server structure provided in the embodiments of this application. Detailed Implementation
[0021] The features and exemplary embodiments of various aspects of this application will be described in detail below. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain this application and not to limit it. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples.
[0022] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes said element.
[0023] To address the problems of the prior art, embodiments of this application provide a task processing system, a task processing method, and a testing system. The task processing method provided in this application embodiment will be described first below.
[0024] Figure 1 A schematic diagram of the structure of a task processing system provided in an embodiment of this application is shown. The system is applied to a server and includes: a task submission module, a scheduled task queue module, a task retrieval module, and a task distribution module. The task submission module is used to respond to the client's test request and obtain the test task; The task submission module is further configured to send the test task to the task distribution module when it is determined that the test task is an immediately triggered test task; or, when it is determined that the test task is a timed triggered test task or an automatically triggered test task, send the test task to the scheduled task queue module. The planned task queue module is used to store the test tasks that are triggered at regular intervals or automatically. The task retrieval module is used to monitor the stored test tasks. If the test task is detected to meet the task triggering conditions, the test task is sent to the task distribution module. The task distribution module is used to determine the target test device for the test task from a plurality of pre-configured test devices, and send the test task to the target test device so that the target test device can perform test operations according to the test task.
[0025] like Figure 1 As shown, the task processing system includes a task submission module, a planned task queue module, a task retrieval module, and a task distribution module. The task submission module is connected to both the planned task queue module and the task distribution module, and the task retrieval module is also connected to both the planned task queue module and the task distribution module.
[0026] The task processing system is used as a server, which communicates with both the client and the target test device.
[0027] Users initiate test requests through the client, which carry test tasks. The task submission module of the task processing system responds to the client's test requests and retrieves the test tasks.
[0028] The task submission module determines the type of the test task. If the test task is determined to be an immediately triggered test task, the task submission module sends the test task to the task distribution module. The task distribution module determines the target test device for the test task from multiple pre-configured test devices and sends the test task to the target test device.
[0029] Alternatively, the task submission module is used to send the test task to the scheduled task queue module when the test task type is determined to be either a time-triggered test task or an automatically triggered test task. The scheduled task queue module is used to store time-triggered or automatically triggered test tasks, for example, by storing time-triggered or automatically triggered test tasks in a pre-configured first storage area, which is used to store test tasks of the time-triggered or automatically triggered type. The task retrieval module is used to listen for the stored test tasks, such as listening for test tasks stored in the first storage area. If a test task is detected that meets the task triggering conditions, it is sent to the task distribution module. The task distribution module is used to determine the target test device for the test task from multiple pre-configured test devices and send the test task to the target test device.
[0030] The target test equipment is used to receive test tasks and perform test operations according to the test tasks.
[0031] The task processing system in this embodiment can classify test tasks, prioritize the processing of immediate tasks, avoid test delays caused by queuing delays of high-time-sensitive tasks, and complete the verification of key scenarios in a timely manner, thereby ensuring the reliability of the test process and the validity of the test results; scheduled tasks are triggered and executed according to preset time conditions, which can ensure the orderly progress of periodic test tasks and avoid the omission of periodic tests due to the allocation of resources to immediate tasks.
[0032] In one embodiment of this application, the system further includes a device management module; The device management module is used to obtain test information of multiple pre-configured test devices and send the test information of the multiple devices to the task distribution module; The task distribution module is specifically used to determine the target test device for the test task from among the multiple test devices based on the device information of the multiple test devices and the test object corresponding to the test task.
[0033] In this embodiment, the task processing system further includes a device management module, which is connected to the task distribution module. The device management module is used to obtain device information of multiple pre-configured test devices and send the device information of the multiple test devices to the task distribution module.
[0034] Optionally, the test task includes a test object identifier, the object identified by the test object identifier is the test object, and the task distribution module is used to determine the target test device for the test task from multiple test devices based on the device information of multiple test devices and the test object corresponding to the test task, and the target test device performs test operations according to the test task.
[0035] The target test device is selected from multiple devices. The target test device has a test environment that is suitable for the current test task, which can ensure the reliability of the test and the validity of the test results.
[0036] In one embodiment of this application, the task distribution module, when determining the target test device for the test task from the multiple test devices based on the device information of the multiple test devices and the test object corresponding to the test task, is specifically used for: If the test object corresponding to the test task is the software function of the vehicle controller, then at least one first device is determined from the plurality of devices according to the device information, and the first device is used to test the software function of the vehicle controller. Select an idle first device from at least one of the first devices as the target test device; or, If the test object corresponding to the test task is the middleware of the vehicle software, then at least one second device is determined from the plurality of devices according to the device information, and the second device is used to test the middleware of the vehicle software. Select an idle second device from at least one of the second devices as the target test device.
[0037] In this embodiment, the task distribution module is configured to, if the test object corresponding to the test task is the software function of the vehicle controller, determine at least one first device from multiple devices based on device information. The first device is used to test the software function of the vehicle controller, and the first device has a test environment adapted to the current test task, i.e., the first device has a test environment adapted to the software function of the controller. An idle first device is selected from the at least one first device as the target test device. If no idle first device exists, the first device with the fewest pending tasks is selected as the target test device based on the number of tasks pending on the at least one first device.
[0038] Alternatively, the task distribution module, if the test object corresponding to the test task is middleware of vehicle software, determines at least one second device from multiple devices based on device information. This second device is used to test the middleware of the vehicle software and possesses a test environment adapted to the current test task, i.e., a test environment adapted to the middleware. An idle second device is selected from the at least one second device as the target test device. If no idle second device exists, the second device with the fewest pending tasks is selected as the target test device based on the number of tasks pending on the at least one second device.
[0039] Alternatively, the task distribution module, when the test object corresponding to the test task is a subsystem of vehicle software, determines at least one third device from multiple devices based on device information. This third device is used to test the vehicle software subsystem and possesses a test environment adapted to the current test task, i.e., a test environment adapted to the subsystem. An idle third device is selected from the at least one third device as the target test device. If no idle third device exists, the third device with the fewest pending tasks among the at least one third device is selected as the target test device.
[0040] Alternatively, in addition to selecting an available testing device, an online testing device can also be selected.
[0041] In one embodiment of this application, the task processing system further includes a ready task queue module; The ready task queue module is used to send the test task sent by the task submission module to the task distribution module; The task submission module is specifically used to send the test task to the ready task queue module when it is determined that the test task type is a timed trigger test task or an automatically trigger test task. Alternatively, the task submission module is specifically used to send the test task to the ready task queue module when it is determined that the test task type is an immediately triggered test task.
[0042] See Figure 2 , Figure 2 This is a schematic diagram of the test system structure. The test system includes a client, a server, and a target test device. The server deploys a task processing system, which also includes a ready task queue module. The ready task queue module is connected to the task submission module and the task distribution module.
[0043] The ready task queue module is used to send test tasks sent by the task submission module to the task distribution module.
[0044] The task submission module is specifically used to send test tasks to the ready task queue module when the test task type is determined to be a timed test task or an automatically triggered test task.
[0045] Alternatively, the task submission module is specifically used to send the test task to the ready task queue module when it is determined that the test task type is an immediately triggered test task.
[0046] The test tasks sent to the ready task queue module are all test tasks that need to be executed immediately.
[0047] Send ready tasks to the task distribution module for timely processing of test tasks.
[0048] In one embodiment of this application, the task retrieval module is specifically used to monitor the stored test tasks, and if the test task is detected to meet the task triggering conditions, the test task is sent to the ready task queue module. The ready task queue module is also used to send the test task to the task distribution module.
[0049] See Figure 2 The task retrieval module is connected to the ready task queue module. The task retrieval module is specifically used to listen to the stored test tasks. If a test task meets the task triggering conditions, it sends the test task to the ready task queue module. The test tasks sent to the ready task queue module are all test tasks that need to be executed immediately. The ready task queue module then sends the test tasks to the task distribution module.
[0050] Send ready tasks to the task distribution module for timely processing.
[0051] In one embodiment of this application, the task processing system further includes a task execution management module; The task distribution module is specifically used to send the test task to the target test device through the task operation management module; The task operation management module is used to send the feedback information to the client when it receives the feedback information sent by the target test device. The feedback information includes the test status of the test task and / or the test result of the test task.
[0052] In this embodiment, the task processing system further includes a task operation management module, which is connected to the task distribution module.
[0053] The task distribution module is specifically used to send test tasks to the target test device through the task operation management module. Specifically, the task distribution module sends the test task and the target identifier of the target test device to the task operation management module; the task operation management module sends the test task to the target test device identified by the target identifier.
[0054] The task execution management module connects to both the target test device and the client.
[0055] The task operation management module is used to send feedback information to the client when it receives feedback information from the target test device. The feedback information includes the test status and / or test results of the test task. The closed-loop feedback of test status and test results can form a complete test data link, enabling R&D personnel to keep abreast of the test progress.
[0056] Figure 3 A flowchart illustrating a task processing method provided in an embodiment of this application is shown. Figure 3 As shown, the task processing method provided in this application embodiment is applied to a server, such as a cloud server, and includes the following steps 301-306, wherein: Step 301: Respond to the client's test request and obtain the test task.
[0057] In this embodiment, the user initiates a test request through the client, and in response to the client's test request, obtains a test task. The test task includes the information required for the test and the type of test task, which may include an immediately triggered test task, a timed triggered test task, or an automatically triggered test task.
[0058] Instantly triggered test tasks are those that start and execute immediately without waiting time or additional conditions. Scheduled trigger test tasks are those that are automatically triggered at preset fixed time nodes or time periods, with the triggering basis being only the time parameter. Automatically triggered test tasks are those that are driven by preset non-time-related conditions and automatically start and execute when the conditions are met.
[0059] Step 302: If the test task is determined to be an instant-triggered test task, a target test device is determined from a plurality of pre-configured test devices for the test task.
[0060] In this embodiment, it is determined which type of test task it is. If the test task is an immediately triggered test task, it means that the test task needs to be tested by the test equipment immediately. That is, in the case of an immediately triggered test task, the target test equipment is determined from a number of pre-configured test equipment, and a suitable test equipment is found.
[0061] Step 303: If the test task is determined to be a timed test task or an automatically triggered test task, the timed test task or the automatically triggered test task is stored.
[0062] In this embodiment, when it is determined that the test task is a timed test task or an automatically triggered test task, the timed test task or the automatically triggered test task is stored, for example, the test task is stored in a pre-configured first storage area, the first storage area is used to store test tasks of the timed trigger type or the automatically triggered test task.
[0063] Step 304: Monitor the stored test tasks.
[0064] In this embodiment, the stored test tasks are monitored, such as the test tasks in the first storage area, so that when a test task is detected to meet the task triggering conditions, a suitable test device is selected for it.
[0065] Step 305: If the test task is detected to meet the task triggering conditions, then a target test device is determined for the test task from a plurality of pre-configured test devices.
[0066] In this embodiment, if the test task is detected to meet the task triggering conditions, it means that the test task needs to be tested by the test device immediately. That is, the target test device is determined for the test task from the multiple pre-configured test devices, and a suitable test device is found. Each of the multiple pre-configured test devices can perform test operations, and the server communicates with the multiple test devices.
[0067] Step 306: Send the test task to the target test device so that the target test device can perform test operations according to the test task.
[0068] In this embodiment, the test task is sent to the target test device, which has a test environment adapted to the current test task, and the target test device performs test operations according to the test task.
[0069] In this embodiment, in response to a test request from a client, a test task is obtained. If the test task is determined to be an immediately triggered test task, a target test device is selected from a pre-configured pool of test devices. Alternatively, if the test task is determined to be a timed or automatically triggered test task, the timed or automatically triggered test task is stored. The stored test tasks are monitored. If a test task is detected to meet the triggering conditions, a target test device is selected from a pre-configured pool of test devices. Furthermore, the test task is sent to the target test device, which performs test operations according to the test task. In the above steps, test tasks can be classified, and immediately triggered tasks are prioritized to avoid test delays caused by queuing delays for time-sensitive tasks. This ensures timely verification of key scenarios and guarantees the reliability of the test process and the validity of the test results. Timed tasks are triggered and executed according to preset time conditions, ensuring the orderly progress of periodic test tasks and preventing omissions in periodic tests due to resource allocation to immediately triggered tasks.
[0070] In one embodiment of this application, determining the target test device for the test task from a pre-configured plurality of test devices includes: Obtain test information from multiple pre-configured test devices; Based on the device information of the multiple test devices and the test object corresponding to the test task, the target test device is determined for the test task from the multiple test devices.
[0071] In this embodiment, device information of multiple pre-configured test devices is obtained; wherein the test task includes a test object identifier, the object identified by the test object identifier is the test object, and based on the device information of the multiple pre-configured test devices and the test object corresponding to the test task, a target test device is determined from the multiple test devices for the test task, and the target test device performs test operations according to the test task.
[0072] The target test device is selected from multiple devices. The target test device has a test environment that is suitable for the current test task, which can ensure the reliability of the test and the validity of the test results.
[0073] In one embodiment of this application, determining the target test device for the test task from among the multiple test devices based on the device information of the multiple test devices and the test object corresponding to the test task includes: If the test object corresponding to the test task is the software function of the vehicle controller, then at least one first device is determined from the plurality of devices according to the device information, and the first device is used to test the software function of the vehicle controller. Select an idle first device from at least one of the first devices as the target test device; or, If the test object corresponding to the test task is the middleware of vehicle software, then at least one second device is determined from the plurality of devices according to the device information, and the second device is used to test the middleware of vehicle control. Select an idle second device from at least one of the second devices as the target test device.
[0074] In this embodiment, if the test object corresponding to the test task is the software function of the vehicle controller, then at least one first device is determined from multiple devices based on the device information. The first device is used to test the software function of the vehicle controller, and the first device has a test environment adapted to the current test task, that is, the first device has a test environment adapted to the software function of the controller. An idle first device is selected from the at least one first device as the target test device. If no idle first device exists, then the first device with the fewest tasks is selected as the target test device based on the number of tasks to be processed by the at least one first device.
[0075] Alternatively, if the test object corresponding to the test task is middleware of the vehicle software, then at least one second device is determined from multiple devices based on the device information. This second device is used to test the middleware of the vehicle software, and it has a test environment adapted to the current test task, i.e., it has a test environment adapted to the middleware. An idle second device is selected from the at least one second device as the target test device. If no idle second device exists, then the second device with the fewest pending tasks is selected as the target test device based on the number of tasks pending on the at least one second device.
[0076] Alternatively, when the test object corresponding to the test task is a subsystem of vehicle software, at least one third device is determined from multiple devices based on device information. This third device is used to test the subsystem of vehicle software and has a test environment adapted to the current test task, i.e., the third device has a test environment adapted to the subsystem. An idle third device is selected from the at least one third device as the target test device. If no idle third device exists, the third device with the fewest pending tasks among the at least one third device is selected as the target test device.
[0077] Alternatively, in addition to selecting an available testing device, an online testing device can also be selected.
[0078] The above triggering method can work in conjunction with the resource scheduling strategy of real-time tasks to schedule resource-intensive timed test tasks to idle devices for execution, which not only ensures the priority processing of real-time tasks, but also improves the overall utilization rate.
[0079] In one embodiment of this application, after obtaining the test task in response to a test request from a client, the method further includes: When the test task is an instant-triggered test task, the test task is stored in a pre-configured first storage area, which is used to store test tasks that are time-triggered or automatically triggered. When the test task is a timed or automatically triggered test task, the test task is stored in a pre-configured second storage area, which stores test tasks that are triggered instantly.
[0080] In this embodiment, when the test task is a timed test task or an automatically triggered test task, the test task is stored in a pre-configured first storage area. The first storage area is used to store test tasks of the timed or automatically triggered type.
[0081] When the test task type is an instant-triggered test task, the test task is stored in a pre-configured second storage area, which stores test tasks of the instant-triggered type.
[0082] The first and second storage areas can be different storage areas in the Redis database, or different storage areas in the Kafka database. Redis and Kafka are open-source databases, and they can also be other open-source databases.
[0083] Different tasks are stored in different spaces, enabling the classification, management, and rapid retrieval of test tasks that are triggered instantly, on a schedule, or automatically. This avoids scheduling instruction confusion or task retrieval delays caused by storing multiple types of tasks together.
[0084] In one embodiment of this application, after storing the test task to a pre-configured first storage area, the method further includes: Monitor the tasks stored in the first storage area; If the test task is detected to meet the task triggering conditions, the test task is transferred from the first storage area to the second storage area.
[0085] In this embodiment, tasks stored in the first storage area are monitored; when a test task is detected to meet the task triggering conditions, the test task is transferred from the first storage area to the second storage area for storage, the second storage area is scanned, and when a new test task is detected, the step of determining the target test device for the test task from a plurality of pre-configured test devices is executed.
[0086] When a timed or automatically triggered test task meets the task triggering conditions and is transferred to the instant task storage space, it can automatically obtain the same scheduling priority as an instant task, ensuring that such tasks that need to be started on time will not have their resources occupied by other non-urgent tasks, thus guaranteeing the timeliness of execution after triggering.
[0087] In one embodiment of this application, after sending the test task to the target test device, the method further includes: Upon receiving feedback information from the target testing device, the feedback information is sent to the client. The feedback information includes the test status of the test task and / or the test result of the test task.
[0088] In this embodiment, when a new test task is detected, a target test device is determined from a plurality of pre-configured test devices, and the test task located in the second storage area is sent to the target test device.
[0089] The target test equipment performs test operations according to the test task and sends feedback information.
[0090] Upon receiving feedback information from the target test device, the feedback information is sent to the client, which then receives and displays the feedback information.
[0091] The feedback information includes the test status corresponding to the test task, and / or the test result corresponding to the test task.
[0092] The closed-loop feedback of test status and test results can form a complete test data link, enabling R&D personnel to keep abreast of test progress.
[0093] This application provides a testing system, which includes a client, a server, and a target testing device. The server deploys the task processing system described in the above embodiment.
[0094] In this embodiment, the testing system includes a client, a server, and a target testing device. The server is connected to the client and the target testing device.
[0095] The client is used to send test requests to the server. The test request includes a test task, which includes the information required for the test and the type of test task. The type can be an immediately triggered test task, a timed triggered test task, or an automatically triggered test task.
[0096] The task processing system deployed on the server includes: a task submission module, a scheduled task queue module, a task retrieval module, and a task distribution module; The task submission module is used to respond to the client's test request and obtain the test task; The task submission module is further configured to send the test task to the task distribution module when it is determined that the test task is an immediately triggered test task; or, when it is determined that the test task is a timed triggered test task or an automatically triggered test task, send the test task to the scheduled task queue module. The planned task queue module is used to store the test tasks that are triggered at regular intervals or automatically. The task retrieval module is used to monitor the stored test tasks. If the test task is detected to meet the task triggering conditions, the test task is sent to the task distribution module. The task distribution module is used to determine the target test device for the test task from a plurality of pre-configured test devices, and send the test task to the target test device; The target test equipment is used to perform test operations according to the test task.
[0097] The system of this application can classify test tasks, prioritize the processing of immediate tasks, avoid test delays caused by queuing delays of high-time-sensitive tasks, and complete the verification of key scenarios in a timely manner, thereby ensuring the reliability of the test process and the validity of the test results.
[0098] See Figure 4 The task processing system also includes a ready task queue module and a task execution management module; the target test device includes local services and an execution framework.
[0099] 1. Distribute tasks: The client is used to distribute tasks to the task submission module of the task processing system (i.e., the client mentioned above, used to send test requests to the task processing system). Specifically, the client is a continuous integration and continuous deployment (CICD) client.
[0100] 1.1 Scheduled / Automatically triggered test tasks: The task submission module is used to respond to test requests from clients and retrieve test tasks.
[0101] The task submission module is also used to send the test task to the scheduled task queue module when it is determined that the test task is a timed test task or an automatically triggered test task.
[0102] The scheduled task queue module is used to store test tasks that are triggered on a timed basis or automatically.
[0103] 1.1.1 Monitor whether the task triggering conditions are met: The task retrieval module is used to monitor stored test tasks.
[0104] 1.1.2 Sending the test task: The task retrieval module is also used to send the test task to the ready task queue module when the test task is detected to meet the task triggering conditions. The ready task queue module is used to send received test tasks to the task distribution module.
[0105] 1.2 Instantly Triggered Test Tasks: The task submission module is also used to send test tasks to the ready task queue module when the test task type is an immediately triggered test task.
[0106] The ready task queue module is used to send received test tasks to the task distribution module.
[0107] 2. Receive test tasks: The task distribution module is used to receive test tasks sent by the ready task queue module.
[0108] 3. Send the test task: The task distribution module is also used to send test tasks to the local service of the target test device.
[0109] 4. Startup: The local server of the target test device is used to start test tasks and send them to the execution framework. The execution framework of the target test equipment is used to perform test operations according to the test task.
[0110] 5.1 Report test status: The local service is used to report the test status to the task operation management module of the task processing system.
[0111] 5.2 Report test results: The execution platform of the target test equipment is used to report test results to the task operation management module of the task processing system.
[0112] 6. Send test status / test results: The task execution management module is used to send the received test status and / or test results to the client.
[0113] See Figure 5 The task processing system also includes a device management module, a task submission interface, a queue service interface, a device query interface, a test task creation interface, a test task interface, a task status interface, and a test result interface.
[0114] The task submission interface is used to connect the client and the task processing system; The queue service interface is used to connect the task submission module and the scheduled task module; The queue service interface is also used to connect the task submission module and the ready task queue module; The queue service interface is also used to connect the scheduled task queue module and the task retrieval module; The queue service interface is also used to connect the task retrieval module and the ready task queue module; The queue service interface is also used to connect the task distribution module and the ready task queue module; The device query interface is used to connect the device management module and the task distribution module; the device management module is used to obtain device information of multiple test devices through the device query interface and send the device information to the task distribution module.
[0115] Create a test task interface to connect the task distribution module and the task execution management module; The test task interface is used to connect the task execution management module with the local service of the target test device; The task status interface is used to connect the task execution management module with the local service of the target test device; the local service is used to report the test status through the task status interface.
[0116] The test result interface connects the task execution management module with the execution framework of the target device; the execution framework reports test results through the test result interface. The execution framework integrates various dependency libraries, testing tools, and test scripts required for automated testing, providing testing capability support for automated testing.
[0117] The test task interface is used to connect the task execution management module and the client; the task execution management module is used to send the received test status and / or test results to the client through the test task interface.
[0118] An automatic adaptation mechanism is established. After the CICD client distributes test tasks to the distribution service, the service's automatic adaptation mechanism will assign the test tasks to the most suitable test environment (device) for execution. A task management mechanism is established, placing test tasks into a task queue and managing task distribution through distribution logic. Immediate trigger, automatic trigger, and timed trigger methods are created, allowing test tasks to be triggered at any time or in specific scenarios. A device management mechanism is established, where the local service automatically senses the device status of the test environment, implementing device management through the local service and the distribution service.
[0119] Figure 6 A schematic diagram of the hardware structure of the server provided in an embodiment of this application is shown.
[0120] The server may include a processor 601 and a memory 602 storing computer program instructions.
[0121] Specifically, the processor 601 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.
[0122] Memory 602 may include mass storage for data or instructions. For example, and not limitingly, memory 602 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 602 may include removable or non-removable (or fixed) media. Where appropriate, memory 602 may be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, memory 602 is non-volatile solid-state memory.
[0123] Memory may include read-only memory (ROM), random access memory (RAM), disk storage media devices, optical storage media devices, flash memory devices, and electrical, optical, or other physical / tangible memory storage devices. Therefore, typically, memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to the first aspect of this disclosure.
[0124] The processor 601 implements any of the methods described above in the above embodiments by reading and executing computer program instructions stored in the memory 602.
[0125] In one example, the server may also include a communication interface 603 and a bus 610. Wherein, for example... Figure 6 As shown, the processor 601, memory 602, and communication interface 603 are connected through bus 610 and complete communication with each other.
[0126] The communication interface 603 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.
[0127] Bus 610 includes hardware, software, or both, that couples components of the method or server described above together. For example, and not as a limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 610 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, this application contemplates any suitable bus or interconnect.
[0128] Alternatively, embodiments of this application can be implemented using a computer storage medium. This computer storage medium stores computer program instructions; when these computer program instructions are executed by a processor, they implement any of the task processing methods described in the above embodiments.
[0129] Alternatively, this application embodiment can provide a computer program product for implementation, wherein when the instructions in the computer program product are executed by the processor of the server, the server implements any of the task processing methods in the above embodiments.
[0130] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described as examples. However, the method process of this application is not limited to the specific steps described. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.
[0131] The functional blocks shown in the above-described structural diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.
[0132] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0133] The aspects of this disclosure have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by special-purpose hardware performing the specified functions or actions, or can be implemented by a combination of special-purpose hardware and computer instructions.
[0134] The above description is merely a specific implementation of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.
Claims
1. A task processing system, characterized by, The system is applied to the server side and includes: a task submission module, a scheduled task queue module, a task retrieval module, and a task distribution module; The task submission module is used to respond to the client's test request and obtain the test task; The task submission module is further configured to send the test task to the task distribution module when it is determined that the test task is an immediately triggered test task; or, when it is determined that the test task is a timed triggered test task or an automatically triggered test task, send the test task to the scheduled task queue module. The planned task queue module is used to store the test tasks that are triggered at regular intervals or automatically. The task retrieval module is used to monitor the stored test tasks. If the test task is detected to meet the task triggering conditions, the test task is sent to the task distribution module. The task distribution module is used to determine the target test device for the test task from a plurality of pre-configured test devices, and send the test task to the target test device so that the target test device can perform test operations according to the test task.
2. The task processing system according to claim 1, characterized by The system also includes an equipment management module; The device management module is used to obtain test information of multiple pre-configured test devices and send the test information of the multiple devices to the task distribution module; The task distribution module is specifically used to determine the target test device for the test task from among the multiple test devices based on the device information of the multiple test devices and the test object corresponding to the test task.
3. The task processing system according to claim 2, characterized by The task distribution module, when determining the target test device for the test task from among the multiple test devices based on the device information of the multiple test devices and the test object corresponding to the test task, is specifically used for: If the test object corresponding to the test task is the software function of the vehicle controller, then at least one first device is determined from the plurality of devices according to the device information, and the first device is used to test the software function of the vehicle controller. Select an idle first device from at least one of the first devices as the target test device; or, If the test object corresponding to the test task is the middleware of the vehicle software, then at least one second device is determined from the plurality of devices according to the device information, and the second device is used to test the middleware of the vehicle software. Select an idle second device from at least one of the second devices as the target test device.
4. The task processing system of claim 1, wherein, The task processing system also includes a ready task queue module; The ready task queue module is used to send the test task sent by the task submission module to the task distribution module; The task submission module is specifically used to send the test task to the ready task queue module when it is determined that the test task type is a timed trigger test task or an automatically trigger test task. Alternatively, the task submission module is specifically used to send the test task to the ready task queue module when it is determined that the test task type is an immediately triggered test task.
5. The task processing system according to claim 4, characterized in that, The task retrieval module is specifically used to monitor the stored test tasks. If the test task is detected to meet the task triggering conditions, the test task is sent to the ready task queue module. The ready task queue module is also used to send the test task to the task distribution module.
6. The task processing system according to any one of claims 1 to 5, characterized in that, The task processing system also includes a task operation management module; The task distribution module is specifically used to send the test task to the target test device through the task operation management module; The task operation management module is used to send the feedback information to the client when it receives the feedback information sent by the target test device. The feedback information includes the test status of the test task and / or the test result of the test task.
7. A task processing method, characterized in that, The method is applied to the server side, and the method includes: Responding to the client's test request, retrieve the test task; If the test task is determined to be an immediately triggered test task, a target test device is determined for the test task from a plurality of pre-configured test devices; or, If the test task is determined to be a timed test task or an automatically triggered test task, the timed test task or the automatically triggered test task is stored; the stored test task is monitored; if the test task is detected to meet the task triggering conditions, a target test device is determined for the test task from a plurality of pre-configured test devices. The test task is sent to the target test device so that the target test device can perform test operations according to the test task.
8. The task processing method according to claim 7, characterized in that, The step of determining the target test device for the test task from a pre-configured plurality of test devices includes: Obtain test information from multiple pre-configured test devices; Based on the device information of the multiple test devices and the test object corresponding to the test task, the target test device is determined for the test task from the multiple test devices.
9. The task processing method according to claim 8, characterized in that, The step of determining the target test device for the test task from among the multiple test devices based on the device information of the multiple test devices and the test object corresponding to the test task includes: If the test object corresponding to the test task is the software function of the vehicle controller, then at least one first device is determined from the plurality of devices according to the device information, and the first device is used to test the software function of the vehicle controller. Select an idle first device from at least one of the first devices as the target test device; or, If the test object corresponding to the test task is the middleware of the vehicle software, then at least one second device is determined from the plurality of devices according to the device information, and the second device is used to test the middleware of the vehicle software. Select an idle second device from at least one of the second devices as the target test device.
10. A testing system, characterized in that, It includes a client, a server, and a target testing device, wherein the server is deployed with a task processing system as described in any one of 1 to 6.