Service scheduling methods, vehicles, and computer-readable storage media

By adopting a dynamic load-aware service scheduling method, the problem of surged response latency or service interruption in high-concurrency scenarios caused by task scheduling relying on static configuration is solved, and accurate request distribution and low-latency response are achieved.

CN123123354APending Publication Date: 2026-11-17CHERY AUTOMOBILE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611382704.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-07
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

In existing technologies, task scheduling relies on static configuration, which leads to a surge in response latency or service interruption in high-concurrency scenarios.

Method used

The dynamic load-aware service scheduling method receives service requests from target objects in the vehicle, determines the target ECU node based on the load information of the ECU node, and distributes the service request to the target service instance to execute the target function. This includes technical means such as real-time load information acquisition, virtual node mapping, hash ring routing, scaling up and down, and fault migration.

Benefits of technology

It enables dynamic matching of service instances based on real-time load information, achieving accurate request distribution and low-latency response in high-concurrency scenarios, thus solving the problem of surged response latency or service interruption in high-concurrency scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123123354A_ABST
    Figure CN123123354A_ABST
Patent Text Reader

Abstract

This application provides a service scheduling method, which includes: receiving a service request from a target object in a vehicle; determining a target ECU node corresponding to the service request based on the load information of the vehicle's electronic control unit (ECU) node, wherein the ECU node is used to carry at least one service instance, and each service instance corresponds to executing a function in the vehicle; and distributing the service request to a target service instance of the target ECU node, wherein the target service instance is used to execute the target function corresponding to the service request. This application solves the technical problem in related technologies where task scheduling relies on static configuration, leading to a surge in response latency or service interruption in high-concurrency scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of vehicle control technology, and more specifically, to a service scheduling method, a vehicle, and a computer-readable storage medium. Background Technology

[0002] With the development of intelligent connected vehicles, automotive electronic functions are becoming increasingly complex, placing higher demands on computing performance and high-concurrency processing capabilities. However, the task scheduling employed by related technologies relies on static configuration, fixing task cycles and priorities during the system design phase, leading to a surge in response latency or service interruptions in high-concurrency scenarios.

[0003] There is currently no good solution to the above problems. Summary of the Invention

[0004] This application provides a service scheduling method, a vehicle, and a computer-readable storage medium to at least solve the technical problem that task scheduling in related technologies relies on static configuration, leading to a surge in response latency or service interruption in high-concurrency scenarios.

[0005] According to one aspect of the embodiments of this application, a service scheduling method is provided, comprising: receiving a service request from a target object in a vehicle; determining a target ECU node corresponding to the service request based on the load information of the vehicle's electronic control unit (ECU) node, wherein the ECU node is used to carry at least one service instance, and each service instance corresponds to executing a function in the vehicle; and distributing the service request to a target service instance of the target ECU node, wherein the target service instance is used to execute a target function corresponding to the service request.

[0006] Further, determining the target ECU node corresponding to the service request based on the load information of the vehicle's electronic control unit (ECU) node includes: obtaining the load information of the candidate ECU node to which the service instance carrying the target function belongs; determining the number of virtual nodes of the candidate ECU node based on the load information, wherein the number of virtual nodes increases as the load information decreases; mapping the virtual nodes corresponding to the candidate ECU node to a hash ring based on the number of virtual nodes; and determining the target ECU node corresponding to the service request from the hash ring.

[0007] Further, determining the target ECU node corresponding to the service request from the hash ring includes: obtaining the request parameters corresponding to the service request; determining the target hash value corresponding to the request parameters, wherein the target hash value is used to characterize the routing landing point of the service request in the hash ring; determining the target virtual node that matches the target hash value on the hash ring, and determining the candidate ECU node to which the target virtual node belongs as the target ECU node.

[0008] Furthermore, the method also includes: obtaining the resource indicators of the target ECU node; generating an expansion instruction when the resource indicators of the target ECU node are greater than a preset upper threshold in multiple consecutive sampling periods, wherein the expansion instruction is used to indicate the addition of a target service instance on a first ECU node, and the available resources of the first ECU node are greater than the available resources of the target ECU node; generating a reduction instruction when the resource indicators of the target ECU node are less than a preset lower threshold in multiple consecutive sampling periods, wherein the reduction instruction is used to indicate the cessation of idle service instances on the target ECU node.

[0009] Furthermore, the method also includes: obtaining performance metrics of the target service instance; and migrating the target service instance to the second ECU node if the performance metrics indicate that the target service instance is faulty.

[0010] Furthermore, when performance metrics indicate that the target service instance is faulty, the target service instance is migrated to the second ECU node, including: when the heartbeat status in the performance metrics indicates that the target service instance has continuously lost heartbeats, and the timeout time in the performance metrics is greater than a preset time threshold, the target service instance is migrated to the second ECU node; or, based on the performance metrics, the request error rate of the target service instance within a preset window is determined, and when the request error rate is greater than a preset error rate threshold, and the number of consecutive failed requests is greater than a preset failure count threshold, the target service instance is migrated to the second ECU node.

[0011] Furthermore, after migrating the target service instance to the second ECU node, the method also includes: obtaining the running status of the target service instance on the second ECU node; updating the hash ring mapping relationship when the running status indicates that the target service instance is running normally; and triggering a rollback operation when the running status indicates that the target service instance is running abnormally.

[0012] Furthermore, the target ECU node corresponding to the service request is determined based on the load information of the vehicle's electronic control unit (ECU) node, including: obtaining resource requirement information of the service instance carrying the target function, and resource capability description information of the candidate ECU node corresponding to the service instance; determining the matching degree between the resource requirement information and the resource capability description information; obtaining the priority corresponding to the service instance carrying the target function, wherein the priority is used to reflect the safety level or real-time requirements of the target function; and determining the target ECU node based on the matching degree, priority, and load information.

[0013] According to another aspect of the embodiments of this application, a service scheduling apparatus is also provided, comprising: a receiving module for receiving a service request from a target object in a vehicle; a determining module for determining a target ECU node corresponding to the service request based on the load information of the electronic control unit (ECU) node of the vehicle, wherein the ECU node is used to carry at least one service instance, and each service instance corresponds to the execution of a function in the vehicle; and an execution module for distributing the service request to a target service instance of the target ECU node, wherein the target service instance is used to execute a target function corresponding to the service request.

[0014] According to another aspect of the embodiments of this application, a vehicle is also provided, including: a memory storing an executable program; and a processor for running the program, wherein the program executes the methods in various embodiments of this application when it runs.

[0015] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored executable program, wherein, when the executable program is running, it controls the device where the computer-readable storage medium is located to perform the methods of various embodiments of this application.

[0016] According to another aspect of the embodiments of this application, a computer program product is also provided, including a computer program that, when executed by a processor, implements the methods of various embodiments of this application.

[0017] According to another aspect of the embodiments of this application, a computer program product is also provided, including a non-volatile computer-readable storage medium storing a computer program that, when executed by a processor, implements the methods in various embodiments of this application.

[0018] According to another aspect of the embodiments of this application, a computer program is also provided, which, when executed by a processor, implements the methods of the various embodiments of this application.

[0019] In this embodiment, a dynamic load-aware service scheduling method is adopted. By receiving service requests from target objects in the vehicle and determining the target service instance carrying the corresponding function based on the load information of the electronic control unit (ECU) node, the service request is distributed to the target service instance to execute the target function. This achieves the purpose of dynamically matching service instances based on real-time load information, thereby realizing accurate request distribution and low-latency response in high-concurrency scenarios. This solves the technical problem that task scheduling in related technologies relies on static configuration, leading to a surge in response latency or service interruption in high-concurrency scenarios. Attached Figure Description

[0020] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0021] Figure 1 This is a schematic diagram illustrating an application scenario of a service scheduling method according to an embodiment of this application;

[0022] Figure 2 This is a flowchart of a service scheduling method according to an embodiment of this application;

[0023] Figure 3 This is an architecture diagram of a service scheduling system according to an embodiment of this application;

[0024] Figure 4 This is a schematic diagram of a service scheduling apparatus according to an embodiment of this application;

[0025] Figure 5 This is a schematic diagram of an electronic device according to an embodiment of this application. Detailed Implementation

[0026] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0027] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0028] Figure 1 This is a schematic diagram illustrating an application scenario of a service scheduling method according to an embodiment of this application, such as... Figure 1As shown, the above scenario may include terminal device 10, network 20, and vehicle 30. Terminal device 10 can be used to obtain service requests from vehicle users (drivers, passengers, etc.) and can send these service requests to vehicle 30 via network 20. At this point, vehicle 30 needs to execute steps S102 to S106 to implement the service scheduling control process.

[0029] The following steps can be performed by vehicle 30: Step S102, receiving a service request from a target object in the vehicle; Step S104, determining the target ECU node corresponding to the service request based on the load information of the vehicle's electronic control unit (ECU) node, wherein the ECU node is used to carry at least one service instance, and each service instance corresponds to executing a function in the vehicle; Step S106, distributing the service request to the target service instance of the target ECU node, wherein the target service instance is used to execute the target function corresponding to the service request.

[0030] In this embodiment, through steps S102 to S106, a dynamic load-aware service scheduling method is adopted. By receiving service requests from target objects in the vehicle and determining the target service instance carrying the corresponding function based on the load information of the electronic control unit (ECU) node, the service request is distributed to the target service instance to execute the target function. This achieves the purpose of dynamically matching service instances based on real-time load information, thereby realizing accurate request distribution and low-latency response in high-concurrency scenarios. This solves the technical problem that task scheduling in related technologies relies on static configuration, leading to a surge in response latency or service interruption in high-concurrency scenarios.

[0031] According to an embodiment of this application, a service scheduling method embodiment is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0032] This embodiment provides a service scheduling method. Figure 2 This is a flowchart of a service scheduling method according to an embodiment of this application, such as... Figure 2 As shown, the method may include the following steps:

[0033] Step S202: Receive the service request from the target object in the vehicle.

[0034] In the technical solution provided by step S202 in the embodiments of this application, the service request refers to a data packet generated by the target object through the vehicle human-machine interface or voice input module, containing a specific function call intent, user identity identifier, and contextual environment parameters. In some embodiments of this application, the service request is not only a carrier of business data, but also a key input parameter for the dynamic service orchestration engine to perform load-aware analysis and routing decisions. For example, the source IP address, service identifier, and timestamp carried in the service request are used by the policy decision-maker to calculate the hash value, thereby determining the optimal service instance node on the consistent hash ring with dynamic weights, and realizing accurate distribution based on real-time load.

[0035] In some embodiments of this application, when a target object in the vehicle issues an operation command through the human-machine interface, the application layer software of the cockpit domain controller constructs a service request message conforming to the Internet Protocol Service-Oriented Middleware Protocol (IPHS) format according to the service interface definition. This message encapsulates the unique identifier of the target service, the user session identifier initiating the request, and specific business parameters. Subsequently, the message is transmitted to the lightweight service communication bus via the vehicle Ethernet. Upon receiving the message, the communication bus parses out key routing information such as the service identifier, source network address, and timestamp, and passes it to the policy decision-maker in the dynamic service orchestration engine. This information serves as input data for subsequent load balancing calculations, completing the standardized reception and preliminary preprocessing of service requests, ensuring that the requests conform to the system's expected data format and communication specifications.

[0036] It should be noted that the target object in the vehicle can also issue natural language commands through the in-vehicle voice assistant, and then determine the service request based on the natural language commands, which is not limited here.

[0037] Step S204: Determine the target ECU node corresponding to the service request based on the load information of the vehicle's electronic control unit (ECU) node. The ECU node is used to carry at least one service instance, and each service instance corresponds to the execution of a function in the vehicle.

[0038] In the technical solution provided by step S204 of the embodiments of this application, the ECU node refers to a hardware processing unit in a vehicle that has independent computing, storage, and communication capabilities, such as a central computing unit, a regional controller, or a domain controller. The ECU node is the physical host and resource carrier of service instances (also known as microservice instances), and its internal processor cores (such as application processor A cores, microcontroller M cores, or real-time processor R cores) provide the computing power, memory, and network bandwidth required to execute services. For example, in an in-vehicle intelligent lighting control scenario, the central computing unit, as a high-performance ECU node, carries microservice instances responsible for calculating complex lighting effects; while the regional controller, as another ECU node, carries microservice instances responsible for underlying hardware control.

[0039] A service instance refers to a self-contained and dynamically schedulable microservice application running on an ECU node. It may exist as a container or virtualized application package, for example. Each service instance is specifically responsible for executing a particular function or a set of related functions within the vehicle, serving as the smallest unit of execution for load balancing and task scheduling. For instance, one instance of the "dimming service" runs on the regional controller, while another runs on the central computing unit. The system determines which instance to distribute requests to based on the load, thereby achieving elastic scaling and high availability of functionality.

[0040] Load information refers to performance metrics that reflect the current resource usage of ECU nodes, including but not limited to CPU utilization, memory usage, network bandwidth utilization, and task queue depth. Load information is the core basis for the dynamic service orchestration engine to make scheduling decisions. By acquiring the load information of each ECU node in real time, the system can perceive the busy level of the nodes, thereby avoiding routing requests to overloaded nodes and ensuring the stability of the system under high concurrency scenarios.

[0041] It should be noted that in some embodiments of this application, the load information is not a simple static configuration, but rather real-time load data based on the dynamic binding relationship between microservice instances and ECU nodes. This means that determining the target ECU node is actually an assessment of the resource consumption of the set of microservice instances hosted by that node, rather than simply assessing the resources of the process pool. This fine-grained load awareness lays the data foundation for subsequent request distribution to specific instances, enabling scheduling decisions to be aware of the resource status of specific service instances, thereby avoiding the distribution of requests to nodes that are already fully loaded with specific service instances, and indirectly supporting instance-level elastic scaling requirements.

[0042] In some embodiments of this application, the target ECU node corresponding to the service request can be determined in the following ways: obtaining the load information of the candidate ECU node to which the service instance carrying the target function belongs; determining the number of virtual nodes of the candidate ECU node based on the load information, wherein the number of virtual nodes increases as the load information decreases; mapping the virtual nodes corresponding to the candidate ECU node to a hash ring based on the number of virtual nodes; and determining the target ECU node corresponding to the service request from the hash ring.

[0043] It should be noted that candidate ECU nodes refer to electronic control unit hardware entities that are currently running or in a standby state in the system and, based on the service registry or resource descriptor, possess the capability to host specific microservice instances. Unlike related technologies that use the entire process or thread as the scheduling unit, candidate nodes in this application are defined based on the deployment location of microservice instances. For example, when the intelligent lighting control service needs to respond to a request, the system will select all ECU nodes (such as area controllers and central computing units) that have deployed "lighting control service instances" as candidate pools. These nodes are not statically bound but dynamically change according to the lifecycle of the microservice instances.

[0044] The number of virtual nodes refers to the number of logical mapping points generated for each physical ECU node in the load balancing hash ring algorithm. The number of virtual nodes is a dynamically adjusted parameter that is negatively correlated with the load information of the ECU node (i.e., the lower the load, the more virtual nodes). It is used to convert the load state of physical nodes into geometric weights on the hash ring. For example, when node A has a low load, 160 virtual nodes are allocated; when node B has a high load, only 40 virtual nodes are allocated. In this way, on the hash ring, node A occupies a much larger interval than node B, thus probabilistically causing node A to receive more hash hits (i.e., service requests), achieving load-based dynamic load balancing.

[0045] A hash ring is used to implement the consistent hashing algorithm. It maps service request parameters (such as source IP and service ID) to a point on the ring, and also maps the virtual nodes of candidate ECU nodes to the ring. By searching clockwise, the physical ECU node mapped to the virtual node closest to the request hash point is determined, thus identifying the target node. This mechanism ensures that when a candidate node fails or is added, only a small subset of requests are affected and need to be rerouted.

[0046] Specifically, the current CPU utilization of all candidate ECU nodes carrying the target service instance is acquired in real time, and the number of virtual nodes for each candidate node is calculated. These candidate nodes and their calculated virtual node counts are mapped onto a hash ring ranging from 0 to 4294967295, with each virtual node occupying a random or node ID-based position on the ring. When a service request is received, the policy decision-maker extracts the source IP address, service identifier, and timestamp of the request, and calculates a hash value using a cyclic redundancy check algorithm. The hash value is then searched clockwise on the hash ring, and the first virtual node matched is identified as the candidate ECU node to which it belongs, thus determining it as the target ECU node.

[0047] To achieve deterministic and balanced routing of service requests to target ECU nodes, the target ECU node corresponding to the service request can be determined from the hash ring in the following way: obtain the request parameters corresponding to the service request; determine the target hash value corresponding to the request parameters, wherein the target hash value is used to characterize the routing landing position of the service request in the hash ring; determine the target virtual node that matches the target hash value on the hash ring, and determine the candidate ECU node to which the target virtual node belongs as the target ECU node.

[0048] It should be noted that the request parameters include, but are not limited to, the network address of the source electronic control unit, the unique identifier of the target service, and the timestamp of the request. Their purpose is to provide input data for hash calculation, ensuring that the same service request can generate a definite hash value under specific conditions. At the same time, when dynamic parameters such as timestamps are introduced, the system is allowed to perform more granular routing distinctions for requests within a certain time window, avoiding all requests from being routed to the same static node, thereby achieving load balancing in the time dimension.

[0049] In some embodiments of this application, an ordered list of candidate ECU nodes can be maintained, where each node contains its current load information and weight value. The weight value is dynamically calculated based on the load information, for example, using exponential smoothing to update the weight, and the weight is inversely proportional to the load. When a service request arrives, the policy decision-maker does not immediately construct a hash ring, but instead traverses the ordered list and selects a target node using a weighted round-robin algorithm based on the current weight value of each node. Specifically, a current weight value is maintained for each node. Each time a selection is made, the current weight values ​​of all nodes are added to their base weights, the node with the largest current weight value is selected as the target, and its current weight value is subtracted from the sum of the base weights of all nodes. If the load of a node exceeds a preset high-water mark threshold, its base weight is temporarily set to zero or significantly reduced, causing it to be skipped in the round-robin; when the load recovers, the weight gradually increases.

[0050] To facilitate understanding of the process of determining the target ECU node, the following explanation is provided in conjunction with some specific embodiments.

[0051] Step S1: Collect ECU node resource metrics (CPU utilization, memory usage).

[0052] Step S2: Construct a virtual node mapping table. Map each microservice instance to a hash ring of 0 to 2^32-1, and dynamically adjust the number of virtual nodes (N) based on the real-time load of the ECU.

[0053] N = N_base × (1 - CPU_usage / 100)

[0054] Where N is the number of virtual nodes currently allocated to this ECU node; N_base is the base number of virtual nodes, with a default value of 160; CPU_usage is the current CPU utilization rate of this ECU node (percentage value, ranging from 0 to 100).

[0055] The above formula ensures that nodes with lower loads have more virtual nodes, thus occupying a larger "responsibility zone" on the hash ring and receiving more requests.

[0056] Step S3: Request route calculation. When a client request arrives, calculate the hash value based on parameters such as the source IP address and service ID.

[0057] Hash=CRC32(Source_IP+Service_ID+Timestamp)

[0058] Wherein, Hash is the calculated 32-bit hash value; CRC32 is the 32-bit Cyclic Redundancy Check algorithm; Source_IP is the IP address of the client ECU; Service_ID is the unique identifier of the target service; and Timestamp is the request timestamp (accurate to milliseconds), used to ensure that the same request may be routed to different nodes at different times, thus achieving load balancing in the time dimension.

[0059] The system searches clockwise on the hash ring for the virtual node with the nearest hash value and then distributes the request to the microservice instance corresponding to that node.

[0060] In some embodiments of this application, the target ECU node corresponding to the service request can also be determined by: obtaining resource requirement information of the service instance carrying the target function, and resource capability description information of the candidate ECU node corresponding to the service instance; determining the matching degree between the resource requirement information and the resource capability description information; obtaining the priority corresponding to the service instance carrying the target function, wherein the priority is used to reflect the security level or real-time requirements of the target function; and determining the target ECU node based on the matching degree, priority, and load information.

[0061] It should be noted that resource requirements information refers to the specific quantitative requirements of a microservice instance for computing resources, storage resources, and communication resources during operation, including but not limited to the CPU computing power level (such as TOPS or number of CPU cores), memory size, whether it depends on a specific hardware accelerator (such as GPU or NPU), and communication latency requirements required by the microservice instance.

[0062] Resource capability description information refers to a comprehensive description of the hardware performance indicators and currently available resources of the candidate electronic control unit node. It can be determined by a unified resource descriptor, including but not limited to the processor architecture type (application processor, microcontroller or real-time processor), total computing power, available memory, supported hardware acceleration interfaces and current remaining resources.

[0063] Specifically, the system retrieves the resource requirements declared by the microservice instance (such as CPU type, memory size, and real-time requirements) from the service registry, and obtains the resource capability descriptions of each candidate ECU node (such as processor architecture, number of cores, and current load) from the hardware abstraction layer. Next, the system performs a first round of static filtering, eliminating nodes that do not support the required hardware acceleration or have incompatible architectures (e.g., eliminating nodes that do not support real-time kernels to run ASIL-D level services). Subsequently, a dynamic matching degree is calculated for the remaining candidate nodes. Finally, considering the service instance's priority (such as ASIL level), if multiple nodes with high matching degrees exist, the node with better hardware isolation or stronger real-time performance (such as an R core) is prioritized as the target ECU node, thereby achieving a balance between security and performance.

[0064] In some embodiments of this application, for heterogeneous in-vehicle hardware environments (such as an A-core application processor + an M-core microcontroller + an R-core time processor), cross-platform deployment can be achieved through the following steps:

[0065] S1: Construct a unified resource descriptor to standardize the representation of hardware capabilities.

[0066] The hardware abstraction layer defines and maintains a standardized resource description format. For different computing units in a heterogeneous in-vehicle hardware environment (including application processor A-cores, microcontroller M-cores, real-time processor R-cores, and possible GPUs or neural network processing units NPUs), it extracts and records their key hardware attributes. Specifically, it records information such as the type of computing unit, computing power level (e.g., trillions of operations per second), memory size, and supported hardware acceleration interfaces, thereby forming a unified resource descriptor for each electronic control unit node. This provides a standardized hardware capability data foundation for subsequent scheduling decisions.

[0067] S2: Abstract hardware differences through the driver adaptation framework.

[0068] By leveraging a driver adaptation framework, a unified driver interface is provided for processors with different architectures. By calling standard application programming interfaces such as the resource manager interface, the hardware differences between underlying processor architectures in terms of instruction sets, interrupt handling, and memory management are shielded, achieving unified abstraction and management of heterogeneous hardware at the software level. This ensures that upper-layer scheduling logic can obtain resource status without being aware of the specific implementation details of the underlying hardware.

[0069] S3: Matching and filtering execution resource requirements with hardware capabilities.

[0070] The unified scheduling interface receives resource requirement declarations (such as declarations requiring graphics processor acceleration or specific computing power support) published by microservice instances. The scheduling algorithm compares these resource requirements with the resource capability descriptions of candidate electronic control unit nodes, prioritizing nodes whose hardware capabilities meet the microservice's operational requirements as candidate target nodes, ensuring that service instances can run in an environment with the corresponding hardware support.

[0071] S4: Implement affinity scheduling based on service attributes.

[0072] Based on candidate nodes that meet resource requirements, the unified scheduling interface executes affinity scheduling strategies according to the service attributes of microservice instances. For service instances with high real-time requirements or high security integrity levels (such as ASIL-D level) (such as braking control functions), the scheduling algorithm prioritizes their deployment on processor cores with real-time processing capabilities (such as R cores); for computationally intensive service instances (such as image recognition functions), the scheduling algorithm deploys them on processor cores with high general-purpose computing power advantages (such as A cores), thereby optimizing resource utilization and ensuring the performance and security of critical functions.

[0073] Step S206: Distribute the service request to the target service instance of the target ECU node, wherein the target service instance is used to execute the target function corresponding to the service request.

[0074] In the technical solution provided by step S206 in the embodiments of this application, the target function refers to the specific vehicle business logic or control action that the service request expects to achieve.

[0075] In some embodiments of this application, after determining the target ECU node and the target service instance, a communication connection with the target service instance is established through a lightweight RPC framework. The framework first utilizes a service proxy mechanism to serialize the business parameters in the service request into a binary format (e.g., using the Protobuf protocol) to reduce serialization overhead and improve transmission efficiency. Then, through a maintained long-connection pool, the serialized data packets are sent to the network interface of the target ECU node via the vehicle Ethernet. After receiving the data, the network interface of the target ECU node hands it over to the service skeleton module for deserialization and finds the corresponding target service instance thread or coroutine based on the service ID. The target service instance receives the request parameters, executes the corresponding business logic (e.g., calculates the light brightness value), encapsulates the result back into a response message, and returns it to the client via the original path. This process achieves end-to-end distribution from routing decision to business execution.

[0076] It's important to note that in step S206, service requests are not simply distributed to a specific ECU node, but rather precisely routed to a specific microservice instance on that node. This means that the system can simultaneously run multiple microservice instances with different functionalities, or multiple replica instances of the same microservice, on the same ECU node. When load needs to be handled, the system can independently create, destroy, or migrate individual microservice instances without restarting the entire process or affecting other services within the same process.

[0077] In some other embodiments of this application, the following steps may also be performed: obtaining the resource index of the target ECU node; generating an expansion instruction when the resource index of the target ECU node is greater than a preset upper limit threshold in multiple consecutive sampling periods, wherein the expansion instruction is used to indicate adding a target service instance on the first ECU node, and the available resources of the first ECU node are greater than the available resources of the target ECU node; generating a reduction instruction when the resource index of the target ECU node is less than a preset lower limit threshold in multiple consecutive sampling periods, wherein the reduction instruction is used to indicate stopping idle service instances on the target ECU node.

[0078] It should be noted that the scaling instruction refers to the control signal generated by the policy decision maker, which instructs to start a new microservice instance replica on a node with available resources. It not only includes the startup instruction, but also specifies the target deployment node (the first ECU node). Its function is to perform a physical or logical increase in resources to improve the system's processing capacity.

[0079] Scaling down commands are control signals generated by the policy decision-maker that instruct the shutdown of non-essential or idle microservice instances, aiming to reclaim resources that are no longer needed. Their function is to perform a physical or logical reduction of resources to lower system operating costs and optimize resource allocation.

[0080] Specifically, a sliding window is maintained to record resource metric values ​​for the most recent three sampling periods (i.e., within 30ms). When CPU utilization is detected to be greater than the upper threshold of 85% for three consecutive periods, the policy decision-maker generates a scaling-up instruction, specifying the creation of a new service instance replica on the first ECU node (whose CPU utilization is assessed at 20%, far lower than the target node). Conversely, when CPU utilization is detected to be less than the lower threshold of 30% for three consecutive periods, the policy decision-maker generates a scaling-down instruction, specifying the shutdown of idle service instances that are in a normal state on the target ECU node. It should be noted that the specific values ​​mentioned above are only examples and can be changed according to requirements.

[0081] The above steps achieve a dynamic balance between microservice resource supply and business load through an automated scaling mechanism based on continuous sampling and resource thresholds. This ensures that the system can scale up in a timely manner to guarantee response performance in high-concurrency scenarios and scale down in a timely manner to save resources in low-load scenarios, thus solving the problems of low resource utilization or overload crashes in traditional static architectures.

[0082] In some embodiments of this application, the following steps may also be performed: obtaining performance metrics of the target service instance; and migrating the target service instance to the second ECU node if the performance metrics indicate that the target service instance is faulty.

[0083] It should be noted that performance metrics include, but are not limited to, heartbeat signal status, number of consecutive timeouts, response time (such as P99 latency), error rate, and abnormal resource usage. A fault refers to a state where the target service instance cannot execute service logic as expected or cannot respond normally. The second ECU node refers to a backup electronic control unit capable of supporting the operation of the target service instance, with currently healthy resources and appropriate load, which can be selected based on resource descriptors and real-time load.

[0084] Specifically, including but not limited to the following situations:

[0085] (1) When the heartbeat status in the performance metrics indicates that the target service instance has continuously lost heartbeats and the timeout in the performance metrics is greater than the preset time threshold, the target service instance will be migrated to the second ECU node.

[0086] In other words, the heartbeat of the target service instance is continuously monitored. If no heartbeat is received for three consecutive sampling periods (corresponding to 1.5 seconds), the instance is immediately marked as faulty and a migration command is triggered.

[0087] (2) Determine the request error rate of the target service instance within the preset window based on the performance indicators. When the request error rate is greater than the preset error rate threshold and the number of consecutive failed requests is greater than the preset failure number threshold, migrate the target service instance to the second ECU node.

[0088] In other words, a sliding window statistics mechanism is activated, with the window size set to 10 requests. When the error rate within the window exceeds 50% and the number of consecutive failed requests reaches 5, a business logic failure is determined to have occurred in the service, and a migration command is triggered.

[0089] After triggering the migration command, traffic to the faulty instance is cut off via a circuit breaker mechanism, and the session state of the service instance (such as the current headlight brightness value of 80 and the last valid checkpoint) is read from a persistent storage unit (e.g., an automotive NVMe SSD). Next, on the selected second ECU node (e.g., a central computing unit), a new service instance process is quickly started using a HAP container image, and the read session state is injected into the new instance. Finally, the instance address in the service registry is updated, traffic is switched to the new instance, and the migration is complete.

[0090] After migrating the target service instance to the second ECU node, the following steps can also be performed: obtain the running status of the target service instance on the second ECU node; when the running status indicates that the target service instance is running normally, update the hash ring mapping relationship; when the running status indicates that the target service instance is running abnormally, trigger a rollback operation.

[0091] Specifically, after the target service instance is started on the second ECU node, monitoring of the new instance begins. For example, the monitor checks the instance's heartbeat signal and core process status at regular intervals (e.g., every 100 milliseconds). If the new instance continuously sends heartbeats and maintains stable resource usage within a preset verification time window (e.g., 2 seconds), it is determined to be running normally. At this time, the internally maintained hash ring mapping table is updated, pointing the virtual node identifier representing the service instance to the IP address or identifier of the second ECU node, and the service governance center is notified to update the service registry. If the monitor finds that the new instance has not sent a heartbeat for more than a threshold time after startup, or the process status changes to "terminated," it is determined to be running abnormally. In this case, a termination signal is sent to the second ECU node to release resources and trigger rollback logic, attempting to redeploy on other healthy nodes, or maintaining the routing record of the original faulty node (if the original node can be recovered) and marking it as unavailable.

[0092] In steps S202 to S206 above, a dynamic load-aware service scheduling method is adopted. By receiving service requests from target objects in the vehicle and determining the target service instance carrying the corresponding function based on the load information of the electronic control unit (ECU) node, the service request is distributed to the target service instance to execute the target function. This achieves the purpose of dynamically matching service instances based on real-time load information, thereby realizing accurate request distribution and low-latency response in high-concurrency scenarios. This solves the technical problem that task scheduling in related technologies relies on static configuration, leading to a surge in response latency or service interruption in high-concurrency scenarios.

[0093] Figure 3 This is an architecture diagram of a service scheduling system according to an embodiment of this application, such as... Figure 3 As shown, the system includes:

[0094] Dynamic Service Orchestration Engine 302: It is responsible for the full lifecycle management of microservice instances. Specifically, it includes collecting resource indicators of electronic control units in real time through resource monitors, making load balancing and scaling decisions based on dynamic weighted consistent hashing algorithms through policy decision makers, and realizing the dynamic deployment, migration and destruction of microservice instances among heterogeneous hardware nodes through deployment executors.

[0095] It should be noted that, in some embodiments of this application, the dynamic service orchestration engine has undergone the following key improvements:

[0096] (a) Dynamic weight adjustment: The number of virtual nodes is no longer fixed, but dynamically adjusted based on the real-time CPU / memory utilization of the ECU. Nodes with lower loads are allocated more virtual nodes, thus receiving more requests;

[0097] (b) Microservice instance-level scheduling: The scheduling granularity is refined from the process / thread level to the microservice instance level, supporting independent scaling up and down of a single service, rather than restarting the entire process;

[0098] (c) Resource-aware migration: When the load on a node exceeds the threshold, the engine can selectively migrate some non-critical service instances to idle nodes, rather than simply routing new requests to other nodes.

[0099] Lightweight Service Communication Bus 304: Used as a communication channel between microservices, it provides automatic code generation based on service proxy and service skeleton models, optimizes serialization and connection reuse to reduce communication latency, and has a built-in session persistence mechanism to support breakpoint recovery and session continuity after service interruption.

[0100] It's important to note that the lightweight service communication bus acts as an "information superhighway" between microservices, optimizing the interaction between services. Based on the service-oriented communication (such as SOME / IP) standard of AUTOSAR AP, a lightweight RPC framework is built. This framework provides automatic code generation for service proxy and skeleton models and incorporates session persistence and state synchronization mechanisms. Furthermore, through session persistence technology, after communication failures are resolved, the client can automatically reconnect to the original service instance and resume execution from the breakpoint, with end-to-end latency controlled to within 35ms.

[0101] Service Governance Center 306: It is used to provide microservice governance and high availability assurance capabilities. Specifically, it includes collecting service performance indicators and distributed tracing information through monitoring agents, executing service circuit breaking and degradation decisions based on the sliding window algorithm through the policy engine, and performing fault isolation and instance recovery operations through the governance executor in coordination with the dynamic service orchestration engine.

[0102] It should be noted that the service governance center provides the system with an "immune system" to ensure its high availability. It introduces a complete microservice governance mechanism, including but not limited to: Circuit Breaker: fast failure when service providers fail consecutively to prevent callers from accumulating threads due to timeouts; Fallback: providing alternative solutions to ensure core functionality; and Distributed Tracing: assigning a globally unique tracing identifier to each request and recording the service nodes and timestamps traversed.

[0103] The governance center works in conjunction with the dynamic service orchestration engine. When an anomaly is detected in a service instance (such as consecutive timeouts), a circuit breaker policy can be triggered, and the orchestration engine can be notified to restart the instance on a healthy node to prevent the fault from spreading.

[0104] Execution Management Module 308: Used as a standard functional cluster for the automotive open system architecture adaptive platform, it is responsible for the startup, shutdown, restart and lifecycle state management of adaptive applications, and provides a control interface for the microservice instance runtime status of the dynamic service orchestration engine.

[0105] Platform Health Management Module 310: Used as a standard functional cluster of the automotive open system architecture adaptive platform, it is responsible for monitoring the overall health status of the electronic control unit and hardware platform, providing monitoring data on system load, resource availability and the operating status of each component, and providing basic information for the resource awareness of the dynamic service orchestration engine.

[0106] Communication Service Module 312: Used as a standard functional cluster for the automotive open system architecture adaptive platform, it provides service-oriented communication infrastructure, including the underlying transmission, service discovery and interface call functions of IP-based service-oriented middleware protocols (such as SOME / IP), and provides underlying communication service support for the lightweight service communication bus.

[0107] It should be noted that the above system is used to execute Figure 2 The service scheduling method shown, therefore Figure 2 The explanations and descriptions regarding the service scheduling methods in the document also apply to the above system, and will not be repeated here.

[0108] In some embodiments of this application, the dynamic service orchestration engine includes the following modules:

[0109] Resource Monitor 302a: Used to collect resource indicators such as CPU utilization, memory usage and network bandwidth of each electronic control unit node in real time. The sampling frequency of resource indicators can be set to, for example, 100 times per second.

[0110] Strategy Decision Maker 302b: Used to make scaling up or down decisions for microservice instances based on resource metrics data collected by the resource monitor, using a dynamic weight-based consistent hash load balancing algorithm.

[0111] Deployment Executor 302c: Used to implement dynamic deployment, migration and destruction of microservice instances between electronic control unit nodes through the interface provided by the automotive open system architecture execution management module.

[0112] Specifically, the scaling up / down process based on the dynamic service orchestration engine can be implemented through the following steps: Step S1: The resource monitor collects resource metrics of the ECU node; Step S2: The policy decision-maker determines whether the threshold is exceeded; Step S3: Trigger the scaling up / down decision; Step S4: The deployment executor performs instance migration; Step S5: Verify the migration result and update the hash ring.

[0113] In some embodiments of this application, the lightweight service communication bus includes the following processes:

[0114] (1) Service registration process: During the startup phase, microservice instances actively register the service interface information and metadata they provide with the service governance center so that they can be perceived and managed by the system;

[0115] (2) Service discovery process: Before initiating a request, the client uses a tiered caching strategy to query and obtain the network address and status information of the target service instance in order to reduce the latency of service discovery;

[0116] (3) Session persistence process: When communication is interrupted, the system automatically saves the current unfinished transaction state to the persistent storage unit. After communication is restored, the client and server can continue execution from the breakpoint state to ensure the continuity of the transaction.

[0117] In some embodiments of this application, the service governance center may include the following modules:

[0118] Monitoring agent 306a: Used to collect performance metrics of microservices through instrumentation, including queries per second, response time (P99 less than 100 milliseconds) and error rate;

[0119] Strategy Engine 306b: Used to implement service circuit breaker decisions based on a sliding window statistical algorithm, where the sliding window size is set to 10 requests;

[0120] Governance Executor 306c: Used to work with the dynamic service orchestration engine to perform governance actions such as service circuit breaking, service degradation, and service scaling.

[0121] In some embodiments of this application, the hardware abstraction layer provides a unified resource descriptor and driver adaptation framework, abstracts the computing power differences of processors with different architectures, implements a unified scheduling interface to match resource requirements and affinity scheduling algorithms, and supports transparent deployment across A-cores, M-cores, and R-cores.

[0122] To facilitate understanding of the execution process of the service scheduling method of this application, the following explanation is provided in conjunction with some specific embodiments.

[0123] refer to Figure 3 This system is based on the Automotive Open System Architecture Adaptive Platform (AUTOSAR Adaptive Platform, AP) standard and mainly includes the following core components: dynamic service orchestration engine 302, lightweight service communication bus 304, service governance center 306, and execution management module 308, platform health management module 310 and communication service module 312 based on the AUTOSAR AP standard.

[0124] The connections and working principles between the components are as follows:

[0125] (1) The dynamic service orchestration engine 302 interacts with the execution management module 308 through the AUTOSAR AP standard interface to obtain the running status of microservice instances, and at the same time receives resource scheduling instructions sent by the service governance center 306. The dynamic service orchestration engine 302 obtains the health status of each electronic control unit (ECU) node through the standard application programming interface (API) provided by the platform health management module 310.

[0126] (2) The lightweight service communication bus 304 is embedded in the communication service module 312. It provides service discovery and communication functions through the ARA::COM API (AUTOSAR adaptive platform communication application programming interface) and interacts with the session persistent storage unit (such as the vehicle non-volatile memory high-speed solid-state drive) to realize the persistent storage and recovery of session state.

[0127] (3) Service governance center 306 collects the performance indicators of each microservice in real time through monitoring agent 306a, and works with dynamic service orchestration engine 302 to execute elastic scaling strategies.

[0128] These components together form a closed-loop control system, enabling full lifecycle management of microservices from registration, discovery, communication to elastic scheduling.

[0129] For dynamic service orchestration engines, resource monitor 302a can perform the following steps:

[0130] The resource monitor 302a collects real-time resource metrics such as CPU utilization, memory usage, and network bandwidth from each ECU node at a sampling frequency of 100 times per second, ensuring that resource fluctuations are detected within 10 milliseconds. The monitor obtains this data through the standard API provided by the AUTOSARAP platform health management module 310, specifically using the ara::phm::MonitorInterface interface to read processor load.

[0131] The strategy decision-maker 302b can perform the following steps:

[0132] The strategy decision maker 302b employs a load balancing algorithm based on dynamic weighted consistent hashing, including the following steps:

[0133] Step S1: Resource monitor 302a collects ECU node resource indicators (CPU utilization, memory usage).

[0134] Step S2: The strategy decision maker 302b constructs a virtual node mapping table.

[0135] Step S3: Request route calculation. When a client request arrives, a hash value is calculated based on parameters such as the source IP address and service ID. The virtual node with the closest hash value is searched clockwise on the hash ring, and the request is distributed to the microservice instance corresponding to that node.

[0136] Step S4: Elastic scaling up / down decision. Set a CPU utilization threshold (upper limit 85%, lower limit 30%). When the resource monitor 302a detects that a node exceeds the upper limit threshold for three consecutive sampling periods (i.e., 30 milliseconds), a scaling up decision is triggered; when it is below the lower limit threshold for three consecutive sampling periods, a scaling down decision is triggered.

[0137] Step S5: Deploy executor 302c to perform instance migration. Dynamic deployment of microservice instances is achieved through the ara::em::ProcessManager interface of the AUTOSAR execution management module 308. Each microservice is packaged into an independent Hypervisor Application Package (HAP) format container image, and lightweight virtualization technology is used to achieve rapid migration, which can be completed within 100 milliseconds.

[0138] Step S6: Verify the migration results and update the hash ring. After the migration is complete, resource monitor 302a verifies the running status of the new instance. If it is normal, the hash ring mapping is updated; otherwise, a rollback is triggered.

[0139] The lightweight service communication bus 304 is an optimized extension based on the ARA::COM API of the AUTOSAR AP standard.

[0140] Improvements to the service discovery mechanism:

[0141] (1) Extended service registry: Based on the standard SOME / IP service discovery, add service health status fields (such as heartbeat timeout time, load weight), set the heartbeat detection interval to 500 milliseconds, and the timeout threshold to 1500 milliseconds.

[0142] (2) Tiered caching strategy: Local nodes cache service instance information (TTL is 30 seconds), and regional centers cache the global service topology (TTL is 300 seconds) to reduce service discovery latency.

[0143] Communication protocol optimization:

[0144] (1) Serialization optimization: Protocol Buffers (Protobuf) are used instead of Extensible Markup Language (XML) for data serialization, reducing the average serialization overhead from 15% to 5%.

[0145] (2) Connection reuse: Maintain a long connection pool (default size 50 connections) to avoid the delay caused by frequently establishing Transmission Control Protocol (TCP) connections.

[0146] Session persistence mechanisms can be implemented through the following steps:

[0147] Step C1: When service communication is interrupted, the lightweight remote procedure call (RPC) framework automatically saves the state of unfinished transactions to a persistent storage unit (such as a high-speed solid-state drive for automotive non-volatile memory). The recorded content includes: Session ID, Processed Bytes, and Checkpoint Timestamp.

[0148] Step C2: After the service is restored, the client resumes execution from the breakpoint by retransmitting the session ID and the last valid checkpoint, ensuring transaction continuity.

[0149] For Service Governance Center 306, Monitoring Agent 306a can perform the following steps:

[0150] (1) Metrics collection: Microservice performance metrics are collected through instrumentation, including queries per second (QPS), response time (P99 less than 100 milliseconds), error rate, etc., with the collection granularity accurate to each service instance.

[0151] (2) Distributed tracing: The tracing algorithm based on Dapper is used to assign a globally unique tracing identifier (TraceID) to each request and record the service nodes and timestamps passed through.

[0152] The circuit breaker algorithms in Policy Engine 306b include:

[0153] (1) Error rate based on sliding window: The window size is set to 10 requests. When the error rate exceeds 50% and the number of consecutive failed requests reaches 5, the circuit breaker is triggered.

[0154] (2) Half-open state test: After 15 seconds of circuit breaking, it will automatically enter the half-open state, allowing some requests to pass. If the success rate recovers to more than 90%, the circuit will be closed.

[0155] Furthermore, the collaboration process between the governance executor 306c and the dynamic service orchestration engine 302 includes:

[0156] Step G1: When monitoring agent 306a detects that a service instance has timed out continuously (the threshold is set to 500 milliseconds), it sends an alarm to policy engine 306b.

[0157] Step G2: After analyzing the metrics, if the strategy engine 306b determines that expansion is needed, it generates an expansion instruction (such as increasing the number of instances from 2 to 4) and sends it to the deployment executor 302c of the dynamic service orchestration engine 302.

[0158] Step G3: Deployment executor 302c starts a new service instance on a node with sufficient resources according to the instructions.

[0159] In some embodiments of this application, the system described above may perform the following steps:

[0160] Step 1: Service Registration and Discovery. When a microservice instance starts, it declares its interface through an ARXML file and registers it with the service governance center. The monitoring agent of the service governance center continuously collects performance metrics of each instance (such as QPS (Queries Per Second), response time, and error rate).

[0161] Step 2: Request Routing and Load Balancing. When a client sends a service request, the dynamic service orchestration engine's strategy decision-maker calculates a hash value based on parameters such as the source IP address and service ID, searches for the optimal node on the dynamically weighted hash ring, and distributes the request to that node.

[0162] Step 3: Elastic scaling up and down. The resource monitor collects resource metrics of each ECU node in real time. When it detects that the CPU utilization of a node exceeds the threshold of 85% for three consecutive sampling cycles (sampling frequency 100Hz), the policy decision-maker triggers a scaling up decision, and the deployment executor starts a new service instance on a node with sufficient resources.

[0163] Step 4: Fault Detection and Recovery. When the monitoring agent detects that a service instance has continuously lost heartbeats (timeout threshold 1500ms), the policy engine triggers a circuit breaker, and traffic is switched to the healthy instance. The deployment executor restarts the faulty instance on another node and restores the session state from the persistent storage unit.

[0164] Step 5: Heterogeneous Hardware Adaptation. The hardware abstraction layer uses a unified resource descriptor to match the resource requirements of microservices with hardware capabilities, enabling transparent deployment across A-cores, M-cores, and R-cores.

[0165] To facilitate understanding of the overall technical process of this application, a specific embodiment is used as an example below: in-vehicle intelligent lighting control service.

[0166] A certain intelligent connected vehicle is equipped with a regional controller and a central computing unit. The regional controller is responsible for controlling the headlight hardware locally, while the central computing unit is responsible for high-performance lighting effect calculations. The headlight control service needs to support functions such as dynamic dimming, fault diagnosis, and lighting animation.

[0167] Step L1: Service definition phase.

[0168] Developers use ARXML files to define the vehicle lighting control interface, including:

[0169] SetBeamIntensity(level): Sets the beam intensity. The value of the parameter level ranges from 0 to 100.

[0170] SetLightPattern(pattern_id): Sets the light pattern, where pattern_id is the pattern identifier;

[0171] GetDiagnosticInfo(): Retrieves fault diagnosis information.

[0172] Generate service skeleton code and configure the execution manifest to declare resource requirements (CPU utilization ≤10%, memory usage ≤50MB).

[0173] Step L2: Microservice encapsulation and registration.

[0174] The vehicle lighting control logic is encapsulated as an adaptive application and packaged into an HAP format container image. Upon service startup, the interface information is registered with the service governance center, and the monitoring agent begins collecting performance metrics for the service.

[0175] Step L3: Normal service call.

[0176] The client ECU (such as the vehicle domain controller) sends a dimming request SetBeamIntensity(80). The dynamic service orchestration engine's policy decision-maker calculates a hash value based on the client's IP address, matches the lighting control service node (currently deployed on the area controller) on the hash ring, and assigns the task. The lightweight service communication bus serializes the request and transmits it to the lighting control service instance via SOME / IP, with an end-to-end latency of ≤30ms.

[0177] Step L4: Load balancing and migration.

[0178] The system detected that the area controller load exceeded 85% (e.g., running multiple lighting effect calculation tasks simultaneously), and the resource monitor reported high load for three consecutive sampling periods. The policy decision-maker triggered a migration decision, and the deployment executor migrated the lighting control service instance to the central computing unit. The migration process was completed within 80ms, and the client was unaware of it.

[0179] Step L5: Fault detection and recovery.

[0180] If the node hosting the lighting control service instance crashes, the monitoring agent detects a loss of heartbeat within 1500ms. The policy engine triggers a circuit breaker, and traffic is switched to the backup node. The deployment executor restarts a new lighting control service instance on the central computing unit and restores the current lighting state (e.g., current brightness value of 80) from the persistent storage unit, continuing the dimming operation from the breakpoint. The entire process is completed within 1.2 seconds, and the user only perceives a brief flash of light.

[0181] Through the above implementation methods, the in-vehicle intelligent lighting control service achieves the following:

[0182] (1) Dynamic load balancing: When the area controller is overloaded, it automatically migrates to the central computing unit, and the migration time is <100ms;

[0183] (2) High availability: When a single node fails, the service recovers within 1.2 seconds without the user noticing;

[0184] (3) Low latency communication: end-to-end communication latency ≤30ms, meeting the real-time control requirements of vehicle lights;

[0185] (4) Elastic scaling up and down: During high-concurrency scenarios such as holiday light shows, the system automatically scales up to 4 instances and automatically scales down after the peak.

[0186] It should be noted that in the above embodiments, the policy decision-maker employs a load balancing algorithm based on dynamic weighted consistent hashing. As alternatives, a weighted round-robin algorithm, a least-connection algorithm, or a machine learning-based load prediction algorithm can also be used. Machine learning-based solutions can train prediction models using historical load data, enabling proactive service migration and are suitable for scenarios with periodic load changes. All of the above alternatives can achieve the technical effect of load balancing.

[0187] In the above embodiments, the session state is saved to the vehicle-mounted NVMe SSD. Alternatively, a distributed in-memory database (such as Redis) can be used as session storage, or the session state can be distributed and saved in the local memory of each service node, using consistent hashing to ensure that the same session is always routed to the same node. All of these alternative solutions can achieve the technical effect of session persistence.

[0188] In the above embodiments, microservices are encapsulated using HAP format container images. Alternatively, standard Docker containers, OCI (Open Container Initiative) containers, or lightweight virtual machines (such as MicroVM) can also be used for encapsulation. All of these alternatives can achieve the technical effects of microservice isolation and rapid migration.

[0189] In the above embodiments, inter-service communication is based on the SOME / IP protocol. Alternatively, the DDS (Data Distribution Service) protocol or the MQTT (Message Queuing Telemetry Transport) protocol can also be used. The DDS protocol has advantages in data distribution and QoS (Quality of Service) assurance, making it suitable for scenarios with high data consistency requirements. All of the above alternatives can achieve the technical effects of inter-service communication.

[0190] In the above embodiments, the circuit breaker strategy is based on the error rate calculated using a sliding window. Alternatively, a circuit breaker strategy based on response time percentiles, a rate limiting strategy based on a token bucket, or an adaptive circuit breaker strategy based on a state machine can also be used. All of these alternatives can achieve the technical effect of service circuit breaking and fault isolation.

[0191] Figure 4 This is a schematic diagram of a service scheduling apparatus according to an embodiment of this application, such as... Figure 4 As shown, the device 40 may include:

[0192] The receiving module 402 is used to receive service requests from target objects in the vehicle;

[0193] The determination module 404 is used to determine the target ECU node corresponding to the service request based on the load information of the vehicle's electronic control unit (ECU) node. The ECU node is used to carry at least one service instance, and each service instance corresponds to the execution of a function in the vehicle.

[0194] The execution module 406 is used to distribute service requests to target service instances of target ECU nodes, wherein the target service instances are used to execute the target function corresponding to the service request.

[0195] It should be noted that, Figure 4 The service scheduling apparatus shown is used to perform Figure 2 The service scheduling method shown, therefore Figure 2 The relevant explanations in the service scheduling methods also apply to Figure 4 The service scheduling device shown will not be described in detail here.

[0196] According to another aspect of the embodiments of this application, a vehicle is also provided, including: a memory storing an executable program; and a processor for running the executable program, wherein the executable program performs the service scheduling method described in any of the above when running on the processor.

[0197] Figure 5 This is a schematic diagram of an electronic device according to an embodiment of this application, such as... Figure 5 As shown, an electronic device 50 is also provided, including: a memory 51 storing an executable program; and a processor 52 for running the program, wherein the program executes the methods in various embodiments of this application when it runs.

[0198] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer-readable storage medium, and the computer program is configured to perform the service scheduling method described in any of the above when running on a computer or processor.

[0199] According to another aspect of the embodiments of this application, a computer program product is also provided, including a computer program that, when executed by a processor, implements the service scheduling methods of various embodiments of this application.

[0200] According to another aspect of the embodiments of this application, a computer program product is also provided, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the service scheduling method of various embodiments of this application.

[0201] According to another aspect of the embodiments of this application, a computer program is also provided, which, when executed by a processor, implements the service scheduling method of various embodiments of this application.

[0202] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0203] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0204] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0205] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0206] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.

[0207] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A method of service scheduling, characterized by, include: Receive service requests from the target object in the vehicle; The target ECU node corresponding to the service request is determined based on the load information of the vehicle's electronic control unit (ECU) node, wherein the ECU node is used to carry at least one service instance, and each service instance corresponds to the execution of a function in the vehicle; The service request is distributed to the target service instance of the target ECU node, wherein the target service instance is used to execute the target function corresponding to the service request.

2. The method according to claim 1, characterized in that, Determining the target ECU node corresponding to the service request based on the load information of the vehicle's electronic control unit (ECU) node includes: Obtain the load information of the candidate ECU node to which the service instance carrying the target function belongs; The number of virtual nodes for the candidate ECU node is determined based on the load information, wherein the number of virtual nodes increases as the load information decreases; Based on the number of virtual nodes, the virtual nodes corresponding to the candidate ECU nodes are mapped to a hash ring; The target ECU node corresponding to the service request is determined from the hash ring.

3. The method according to claim 2, characterized in that, Determining the target ECU node corresponding to the service request from the hash ring includes: Obtain the request parameters corresponding to the service request; Determine the target hash value corresponding to the request parameters, wherein the target hash value is used to characterize the routing landing point position of the service request in the hash ring; A target virtual node matching the target hash value is determined on the hash ring, and the candidate ECU node to which the target virtual node belongs is determined as the target ECU node.

4. The method according to claim 1, characterized in that, The method further includes: Obtain the resource metrics of the target ECU node; If the resource index of the target ECU node is greater than a preset upper limit threshold in multiple consecutive sampling periods, an expansion instruction is generated. The expansion instruction is used to indicate that a new target service instance is added on the first ECU node, and the available resources of the first ECU node are greater than the available resources of the target ECU node. If the resource index of the target ECU node is less than a preset lower threshold for multiple consecutive sampling periods, a scaling-down instruction is generated, wherein the scaling-down instruction is used to instruct the stopping of idle service instances on the target ECU node.

5. The method according to claim 1, characterized in that, The method further includes: Obtain the performance metrics of the target service instance; If the performance metrics indicate that the target service instance is faulty, the target service instance will be migrated to the second ECU node.

6. The method according to claim 5, characterized in that, If the performance metric indicates that the target service instance is faulty, migrating the target service instance to the second ECU node includes: If the heartbeat status in the performance metrics indicates that the target service instance has continuously lost heartbeats, and the timeout time in the performance metrics exceeds a preset time threshold, then the target service instance will be migrated to the second ECU node; or, The request error rate of the target service instance within a preset window is determined based on the performance indicators. When the request error rate is greater than a preset error rate threshold and the number of consecutive failed requests is greater than a preset failure count threshold, the target service instance is migrated to the second ECU node.

7. The method according to claim 5, characterized in that, After migrating the target service instance to the second ECU node, the method further includes: Obtain the running status of the target service instance on the second ECU node; When the running status indicates that the target service instance is running normally, update the hash ring mapping relationship; When the running status indicates that the target service instance is running abnormally, a rollback operation is triggered.

8. The method according to claim 1, characterized in that, Determining the target ECU node corresponding to the service request based on the load information of the vehicle's electronic control unit (ECU) node includes: Obtain the resource requirement information of the service instance that carries the target function, and the resource capability description information of the candidate ECU node corresponding to the service instance; Determine the degree of matching between the resource requirement information and the resource capability description information; Obtain the priority corresponding to the service instance carrying the target function, wherein the priority is used to reflect the security level or real-time requirements of the target function; The target ECU node is determined based on the matching degree, the priority, and the load information.

9. A vehicle, characterized in that, include: Memory, which stores executable programs; A processor for running the program, wherein the program, when running, performs the method according to any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored executable program, wherein, when the executable program is executed, it controls the device on which the storage medium is located to perform the method according to any one of claims 1 to 8.