Load balancing method and device for vehicle-machine interconnection, medium, equipment and vehicle

By monitoring and adjusting the load of business components on the vehicle and user ends, the problem of load balancing in the vehicle and machine interconnection solution is solved, and the reliability and robustness of the system are improved.

CN119484532APending Publication Date: 2025-02-18BEIJING CO WHEELS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311017057.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-11
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

In the vehicle-machine interconnection solution, it is impossible to load balancing the business components on the vehicle-machine end and the user end, resulting in high load or idle terminals, affecting the reliability and robustness of the system.

Method used

By obtaining business components deployed at the same time on the vehicle and the user side, monitoring the load volume of the main server and slave server side, determining whether the load balancing conditions are met, and when the conditions are met, load balancing the business components and adjusting their main service and the operation status on the server and the server.

Benefits of technology

The load balancing of business components between the vehicle and the user side is realized, avoiding the terminal's high load or idle situation, improving the reliability and robustness of the system, and reducing the probability of service unavailability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119484532A_ABST
    Figure CN119484532A_ABST
Patent Text Reader

Abstract

The invention relates to a load balancing method and device for vehicle-machine interconnection, a medium, equipment and a vehicle. The method comprises the following steps: acquiring service components deployed at a vehicle-mounted terminal and a user terminal which are connected at the same time; obtaining a master end load capacity of the master server, and receiving a slave end load capacity sent by the slave server; wherein the main server side is one of the vehicle machine side and the user side, and the slave server side is a terminal, except the main server side, in the vehicle machine side and the user side; monitoring whether the load capacity of the master end and the load capacity of the slave end in a preset time length meet a load balancing condition or not; and under the condition that the load balancing condition is met, carrying out load balancing on the service components started on the master server and the slave server. According to the technical scheme, load balancing can be carried out on the service components on the vehicle-mounted terminal and the user terminal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of automobile technology, and in particular to a load balancing method, device, medium, equipment and vehicle for vehicle-machine interconnection. Background Art

[0002] In the current vehicle-machine interconnection solution, the distribution relationship between the business components based on the vehicle operating system process, such as services and applications, and the vehicle-machine side or the user side is fixed and cannot be adjusted. Therefore, in the application process of vehicle-machine interconnection, it is impossible to load balance the business components on the vehicle-machine side and the user side. Summary of the invention

[0003] In order to solve the above technical problems, the present disclosure provides a load balancing method, device, medium, equipment and vehicle for vehicle-machine interconnection, so as to effectively achieve load balancing of business components on the vehicle-machine side and the user side.

[0004] The present disclosure provides a load balancing method for vehicle-machine interconnection, the method comprising:

[0005] Acquire the service components deployed on both the vehicle terminal and the user terminal that have established the connection;

[0006] Obtaining the master end load of the master server, and receiving the slave end load sent by the slave server; wherein the master server is one of the vehicle terminal and the user terminal, and the slave server is a terminal of the vehicle terminal and the user terminal other than the master server;

[0007] Monitor whether the load of the master end and the load of the slave end meet the load balancing condition within a preset time period;

[0008] When the load balancing condition is met, load balancing is performed on the enabled service components on the master server and the slave server.

[0009] In some embodiments, the monitoring of whether the load of the master end and the load of the slave end within a preset time period meet a load balancing condition includes:

[0010] Determine the load difference between the master end load and the slave end load according to a preset time interval;

[0011] Monitoring whether an absolute value of an average value of a plurality of the load differences within a preset time period is greater than a preset threshold; the preset time period includes a plurality of the preset time intervals;

[0012] When the absolute value of the average value of the load difference is greater than a preset threshold, it is determined that the load balancing condition is met.

[0013] In some embodiments, load balancing the enabled service components on the master server and the slave server includes:

[0014] Comparing the load of the master end with the load of the slave end;

[0015] In the case where the load of the master end is greater than the load of the slave end, selecting at least one first service component to be balanced from the service components enabled on the master server, and transferring the first service component from the master server to the slave server for operation;

[0016] When the load on the slave end is greater than the load on the master end, at least one second service component to be balanced is selected from the service components enabled on the slave service end, and the second service component is transferred from the slave service end to the master service end for operation.

[0017] In some embodiments, selecting at least one first service component to be balanced from the service components enabled on the master server includes:

[0018] Among the service components enabled on the main server, at least one first service component to be balanced is selected according to a preset selection index; wherein the selection index includes at least one of the following: arrangement order, resource occupancy, importance level and usage frequency of the service components.

[0019] In some embodiments, transferring the first service component from the master server to the slave server for execution includes:

[0020] Sending a first component identifier of the first service component to the slave server, so that the slave server controls the first service component to enter a waiting state according to the first component identifier;

[0021] When receiving the notification fed back from the server that the first service component has entered the waiting-for-balancing state, controlling the first service component to stop running and enter a disabled state;

[0022] A notification that the first service component has entered a disabled state is sent to the slave server, so that the slave server starts running the first service component.

[0023] In some embodiments, the method further comprises:

[0024] The display mode of the first service component on the display interface is controlled to change, so as to prompt the first service component to enter the waiting state from the enabled state through the changed display mode.

[0025] In some embodiments, the method further comprises:

[0026] Establishing a connection between the vehicle terminal and the user terminal;

[0027] After the connection is established, the master server and the slave server are determined from the vehicle terminal and the user terminal according to a preset master-slave relationship; or,

[0028] The vehicle terminal and the user terminal are both used as terminals to be selected;

[0029] Determine the load score of each of the terminals to be elected according to a preset load indicator, and determine the highest load score from the load scores of all the terminals to be elected;

[0030] The terminal to be elected corresponding to the highest load score is determined as the master server, and the terminals to be elected other than the master server are determined as slave servers.

[0031] The present disclosure provides a load balancing device for vehicle-machine interconnection, the device comprising:

[0032] A component acquisition module, used to acquire service components deployed simultaneously on the vehicle machine end and the user end with which a connection has been established;

[0033] A load acquisition module, used to acquire the master end load of the master server end, and receive the slave end load sent by the slave server end; wherein the master server end is one of the vehicle end and the user end, and the slave server end is a terminal of the vehicle end and the user end other than the master server end;

[0034] A monitoring module, used to monitor whether the load of the master end and the load of the slave end meet the load balancing condition within a preset time period;

[0035] The load balancing module is used to load balance the service components enabled on the master server and the slave server when the load balancing condition is met.

[0036] The present disclosure also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a program or instruction, wherein the program or instruction enables a computer to execute the steps of any of the above methods.

[0037] The present disclosure also provides an electronic device, comprising:

[0038] one or more processors;

[0039] A memory for storing one or more programs or instructions;

[0040] The processor is used to execute the steps of any of the above methods by calling the program or instruction stored in the memory.

[0041] The present disclosure also provides a vehicle, which includes the above-mentioned vehicle-machine interconnection load balancing device.

[0042] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has the following advantages:

[0043] The technical solution provided by the disclosed embodiment provides basic support for adjusting the distribution relationship between business components and terminals (i.e., the vehicle terminal and the user terminal) by acquiring business components deployed on both the vehicle terminal and the user terminal; furthermore, when the load of the master terminal and the load of the slave terminal within the preset time period are monitored to meet the load balancing conditions, the enabled business components on the master server and the slave server can be load balanced. In this way, it is possible to prevent the situation where some terminals are highly loaded and some are idle, thereby improving the reliability and robustness of the business components running between the vehicle terminal and the user terminal. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0045] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0046] Figure 1 A schematic diagram of a vehicle-machine interconnection scenario provided by an embodiment of the present disclosure;

[0047] Figure 2 A flow chart of a load balancing method for vehicle-machine interconnection provided in an embodiment of the present disclosure;

[0048] Figure 3 A schematic diagram of a service component provided in an embodiment of the present disclosure;

[0049] Figure 4 A schematic diagram of a load balancing service provided by an embodiment of the present disclosure;

[0050] Figure 5 A schematic diagram of the state of a business component provided by an embodiment of the present disclosure;

[0051] Figure 6 A schematic diagram of another state of a business component provided by an embodiment of the present disclosure;

[0052] Figure 7 A structural block diagram of a load balancing device for vehicle-machine interconnection provided in an embodiment of the present disclosure;

[0053] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0054] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0055] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.

[0056] In the vehicle-machine interconnection solution, currently, business components such as services and applications based on the vehicle operating system process can only be allocated to the vehicle-machine side or the user side during the development phase. Once the compilation and packaging are completed and the components are flashed to the hardware, they can no longer be adjusted according to the load. It can be seen that this allocation result is fixed and cannot be adjusted. Therefore, there is no solution for load balancing business components between the vehicle-machine side and the user side. In response to the above-mentioned load balancing problem, the embodiments of the present disclosure provide a load balancing method, device, medium, equipment and vehicle for vehicle-machine interconnection. For ease of understanding, the embodiments of the present disclosure are described below.

[0057] The disclosed embodiment provides a load balancing method for vehicle-machine interconnection, which can dynamically load balance the service components between the vehicle-machine end and the user end according to the load on the vehicle-machine end and the user end; the technology can be applied to autonomous driving vehicles and manned vehicles. The method can be executed by a load balancing device for vehicle-machine interconnection, and the load balancing device for vehicle-machine interconnection can be implemented in software and / or hardware.

[0058] To facilitate understanding of the disclosed embodiments, the application scenario of the load balancing method for vehicle-machine interconnection is first described. Vehicle-machine interconnection refers to connecting the vehicle-machine end with a user end such as a mobile phone, tablet, smart watch, etc. through a connection method such as Ethernet, CarPlay, and a data cable, so that the user can directly access the application (such as map, information, music, etc.) on the user end from the screen of the vehicle-machine end, or vice versa, access the application on the vehicle-machine end from the user end.

[0059] In one example, if Figure 1As shown, the vehicle terminal can be a terminal of a vehicle deployed with the Android Automotive OS system. Android Automotive is an Android platform for cars. The full name of OS is Operating System, which means operating system. The user terminal can be a terminal deployed with a car service framework, such as a common mobile phone. The vehicle terminal and the user terminal can be connected via Ethernet, and there can be at least one user terminal connected to the same vehicle terminal.

[0060] In order to facilitate the implementation of the load balancing method for vehicle-machine interconnection, this embodiment can determine a master server from the vehicle-machine end and the user end that establish the connection, and other terminals except the master server are slave servers. For example, the vehicle-machine end is determined as the master server, and the user end is determined as the slave server.

[0061] According to the above embodiments, the load balancing method for vehicle-machine interconnection provided in this embodiment can be applied to the main server, and the main server is one of the vehicle-machine end and the user end that establish the connection. Figure 2 As shown, the method may include the following steps:

[0062] Step S102, obtaining the service components deployed simultaneously on the vehicle machine side and the user side with which the connection has been established.

[0063] Some of the same business components are deployed on the vehicle side and the user side, and these same business components can be load balanced. Figure 3 In the example, the business components include services and applications, and the same services 1, 2, 3, and 4, as well as applications 1, 2, 3, and 4 are deployed on the vehicle side and the user side. In this embodiment, redundant backup of business components is performed on the vehicle side and the user side, which can improve service robustness and provide basic support for subsequent load balancing.

[0064] This embodiment obtains the above-mentioned business components deployed simultaneously on the vehicle terminal and the user terminal through the main server terminal, that is, obtains the above-mentioned business components deployed simultaneously on the main server terminal and the slave server terminal.

[0065] Reference Figure 4 , load balancing services are also deployed in the vehicle side and the user side. The load balancing service on the vehicle side establishes a connection and communicates with the load balancing service on the user side through Ethernet. The load balancing service is used to detect the load situation of the current terminal, and manage the business components such as enabling, stopping, and prohibiting according to the load situation to achieve load balancing. Taking the vehicle side as an example, the load balancing service can specifically be the control interface responsible for monitoring and managing business components in the vehicle side.

[0066] In this embodiment, the master-slave relationship between the vehicle terminal and the user terminal can also be understood as the master-slave relationship between the load balancing service of the vehicle terminal and the load balancing service of the user terminal. For example, the master service terminal is the vehicle terminal, which is equivalent to the master service terminal being the load balancing server of the vehicle terminal, and correspondingly, the slave service terminal is the load balancing server of the user terminal.

[0067] Step S104, obtaining the master load of the master server and receiving the slave load sent by the slave server, wherein the master server is one of the vehicle terminal and the user terminal, and the slave server is the terminal other than the vehicle terminal and the user terminal.

[0068] In this embodiment, the main server collects at least one load indicator of itself at a preset time interval, and obtains the main end load according to each load indicator. Load indicators include, but are not limited to: the number of enabled business components, the proportion of enabled business components to all business components, CPU utilization, memory utilization, disk utilization and network card bandwidth, etc.; the main end load is determined based on the above-mentioned load indicators collected and the weights assigned to each load indicator. In some examples, the number of enabled business components can be determined as the main end load. Alternatively, the main end load is determined according to x=αK1+βK2+γK3, where x represents the main end load, K1, K2, and K3 respectively represent the proportion of enabled business components to all business components, CPU utilization, and memory utilization, and α, β, and γ are the weights of K1, K2, and K3 respectively. Of course, the above is only an example of the main end load and should not be understood as a limitation.

[0069] And, the slave server collects at least one load indicator of itself according to the above preset time interval, obtains the slave load (which can be expressed as y) according to each load indicator, and sends the slave load y to the master server. The process of obtaining the slave load from the slave server can refer to the above embodiment of the master load, and will not be described in detail here.

[0070] Step S106, monitoring whether the load on the master end and the load on the slave end within a preset time period meet a load balancing condition.

[0071] In this embodiment, it can be determined whether load balancing is required based on the load on the master end and the load on the slave end, wherein there can be multiple load balancing conditions, such as referring to the following embodiments.

[0072] In some embodiments, the load balancing condition may include: any load is greater than a preset first load value. In this case, monitor the master-side load or the slave-side load within a preset time period to see if one of them is greater than the preset first load value. If so, it means that one of the master server and the slave server is overloaded, and the load between the master server and the slave server is unbalanced, and load balancing is required to determine whether the load balancing condition is met; at the same time, determine the current load that is greater than the first load value. Taking the current load that exceeds the first load value as the master-side load as an example, the master-side load is greater than the first load value, which means that the master server is overloaded and some business components on the master server need to be allocated to the slave server.

[0073] In some embodiments, the load balancing condition may include: any load is less than a preset second load value. In this case, monitor the master-side load or the slave-side load within a preset time period to see if one of them is less than the preset second load value. If so, it means that one of the master server and the slave server has more idle computing resources and can assist the other in running business components, thereby determining that the load balancing condition is met; at the same time, determine the current load that is less than the second load value. Taking the current load that is less than the second load value as the master-side load as an example, the master-side load is less than the second load value, which means that the master server has excess computing resources, and some of the business components on the slave server can be allocated to the master server to assist the slave server in running the business components more smoothly.

[0074] In some embodiments, the load balancing condition may include: the load difference between the master end load and the slave end load is greater than a preset threshold. In this scenario, an embodiment of monitoring whether the master end load and the slave end load within a preset time period meet the load balancing condition may include:

[0075] The load difference between the master end load and the slave end load is determined at a preset time interval. Specifically, the master end load x and the slave end load y are differentiated to obtain the load difference δ, δ=xy.

[0076] Monitor whether the absolute value of the average value of multiple load differences within a preset time period is greater than a preset threshold; the preset time period includes multiple preset time intervals. When implemented, the average value of multiple load differences δ within the preset time period can be calculated. Then the average The absolute value of Compare with the preset threshold t.

[0077] If the absolute value of the average of multiple load differences If the average value of the load difference is greater than the preset threshold value t, it means that there is a load imbalance between the master server and the slave server and it lasts for a period of time, and load balancing is required. Therefore, when the absolute value of the average value of the load difference is greater than the preset threshold value, it is determined that the load balancing condition is met.

[0078] If the absolute value of the average of multiple load differences If it is not greater than the preset threshold t, it means that there is no load imbalance between the master server and the slave server, or the load imbalance only occurs briefly. At this time, load balancing is not required, and the load balancing condition is not met.

[0079] This embodiment can determine which of the master server and the slave server is overloaded based on the positive and negative values ​​of the average values ​​of the multiple load differences, and then load balance the enabled service components on the master server and the slave server.

[0080] Step S108: When the load balancing condition is met, load balancing is performed on the enabled service components on the master server and the slave server.

[0081] According to the above embodiment, when it is determined that the load balancing condition is met, the enabled service components on the master server and the slave server can be load balanced according to the master load and the slave load. In this embodiment, the master load and the slave load are first compared, and then the load balancing embodiment is described according to the two situations that the master load is greater than the slave load, or the slave load is greater than the master load.

[0082] In this embodiment, when the load on the master end is greater than the load on the slave end, at least one first service component to be balanced is selected from the service components enabled on the master server. Service components can generally include two states: enabled and disabled. The same service component is generally enabled on only one terminal. Figure 5 As shown, all the services and applications that can be load balanced in the vehicle are enabled on the vehicle side and disabled on the user side.

[0083] In the implementation process of selecting the first business component, at least one first business component to be balanced can be selected from the business components enabled on the main server according to preset selection indicators; wherein the selection indicators include at least one of the following: arrangement order of the business components, resource occupancy, importance level and usage frequency, etc.

[0084] In one example, among the enabled service components on the primary server, the first two service components, namely, service 1 and service 2, are selected as the first service components to be balanced according to the arrangement order of the service components.

[0085] Then, the first service component is transferred from the master server to the slave server for operation.

[0086] In a specific embodiment, the master server sends the first component identifier of the first service component to the slave server, so that the slave server controls the first service component to enter a waiting-for-balancing state according to the first component identifier.

[0087] In order to more intuitively show the user which first business components are being transferred, in this embodiment, before the master server sends the first component identifier of the first business component to the slave server, the master server can first control the display mode of the first business component on the display interface to change, so as to prompt the first business component to enter the waiting state from the enabled state through the changed display mode. Figure 6 As shown, the first business component can change the original solid-line frame display mode to a dotted-line frame display mode, and the changed dotted-line frame display mode prompts the first business component to enter the waiting state from the enabled state, and the first business component is disabled on the main server at this time. The above display mode changes are only examples, and there can be many other practical applications, such as changing the control display mode from color to gray.

[0088] Similarly, after the slave server controls the first service component to enter the waiting state, it can also control the first service component to change its display mode on the display interface of the slave server, so as to prompt the first service component to enter the waiting state from the disabled state through the changed display mode.

[0089] After the slave server controls the first service component to enter the waiting state, it will feedback a notification to the master server. When the master server receives the notification from the slave server that the first service component has entered the waiting state, it controls the first service component to stop running and enter the disabled state; and sends a notification to the slave server that the first service component has entered the disabled state, so that the slave server starts running the first service component.

[0090] At this point, the load balancing between the master server and the slave server is completed; then, continue to obtain the master load and receive the slave load, monitor whether the master load and the slave load within the preset time meet the load balancing conditions, and if so, load balance the enabled business components on the master server and the slave server.

[0091] In this embodiment, when the load on the slave end is greater than that on the master end, at least one second service component to be balanced is selected from the service components enabled on the slave end, and the second service component is transferred from the slave end to the master end for operation.

[0092] The implementation process of this embodiment is basically the same as the above embodiment. Specifically, it includes: among the enabled business components on the slave server, at least one second business component to be balanced is selected according to a preset selection index. The slave server controls the display mode of the second business component to change on the display interface, so as to prompt the second business component to enter the state to be balanced from the enabled state through the changed display mode. The slave server sends the second component identifier of the second business component to the master server, and the master server controls the second business component to enter the state to be balanced according to the second component identifier, and feeds back a notification to the slave server that the second business component has entered the state to be balanced. The slave server controls the second business component to stop running and enter the disabled state, and sends a notification to the master server that the second business component has entered the disabled state. The master server starts running the second business component.

[0093] In one embodiment, a method for determining a master server and a slave server between a vehicle terminal and a user terminal may also be provided, as shown below.

[0094] A connection is established between the vehicle terminal and the user terminal; after the connection is established, a master server terminal and a slave server terminal are determined from the vehicle terminal and the user terminal according to the following two implementation methods.

[0095] Implementation method 1. After the connection is established, the master server and the slave server are determined from the vehicle terminal and the user terminal according to the preset master-slave relationship. Considering that the vehicle terminal is generally fixed and the number is generally one, while the user terminal may change frequently and the number is not fixed, the vehicle terminal can be preset as the dominant and the user terminal as the subordinate; according to the master-slave relationship, the vehicle terminal is determined as the master server from the vehicle terminal and at least one user terminal, and the other user terminals are slave servers. This embodiment uses the master-slave relationship to quickly determine the master server and the slave server.

[0096] Implementation method 2. Both the vehicle terminal and the user terminal are used as terminals to be elected. The load score of each terminal to be elected is determined according to the preset load index, and the highest load score is determined from the load scores of all terminals to be elected. The load index is the performance information of the service that each terminal to be elected will collect regularly after startup. The load index can include multiple indicators such as CPU utilization, available memory, network bandwidth, disk utilization, etc. The corresponding load score is calculated according to the load index and its preset weight. The higher the load score, the better the performance of the terminal to be elected. The terminal to be elected corresponding to the highest load score is determined as the main server, and the terminals to be elected other than the main server are determined as slave servers.

[0097] This embodiment first calculates the load score according to the load index, and then uses the load score to determine the master server and the slave server. This can increase the possibility of using a high-performance terminal as the master server, thereby improving the load balancing efficiency between the vehicle terminal and the user terminal.

[0098] In summary, the load balancing method for vehicle-machine interconnection provided by the present disclosure includes, first, obtaining the service components deployed simultaneously on the vehicle-machine end and the user end with established connection; and, obtaining the master-end load of the master server end, receiving the slave-end load sent by the slave server end; and then monitoring whether the master-end load and the slave-end load within the preset time length meet the load balancing condition; when the load balancing condition is met, load balancing is performed on the service components enabled on the master server end and the slave server end. It can be seen that, by obtaining the service components deployed simultaneously on the vehicle-machine end and the user end, the technical scheme provides basic support for adjusting the distribution relationship between the service components and the terminals (i.e., the vehicle-machine end and the user end), and then, when it is monitored that the master-end load and the slave-end load meet the load balancing condition, the service components on the vehicle-machine end and the user end can be load balanced, so that the situation that some terminals are highly loaded and some terminals are idle can be prevented, the utilization efficiency of the hardware computing power is improved, the reliability and robustness of the service components running between the vehicle-machine end and the user end are improved, and the probability of service unavailability is reduced.

[0099] Corresponding to the load balancing method for vehicle-machine interconnection provided in the embodiment of the present disclosure, the embodiment of the present disclosure also provides a load balancing device for vehicle-machine interconnection. The device can be applied to the main server, and the main server is one of the vehicle-machine terminal and the user terminal that establish the connection. Figure 7 A structural block diagram of a load balancing device for vehicle-machine interconnection provided in an embodiment of the present disclosure, such as Figure 7 As shown, the load balancing device for vehicle-machine interconnection includes:

[0100] A component acquisition module 202, used to acquire service components deployed simultaneously on the vehicle terminal and the user terminal with which the connection has been established;

[0101] The load acquisition module 204 is used to acquire the master end load of the master server end and receive the slave end load sent by the slave server end; wherein the master server end is one of the vehicle end and the user end, and the slave server end is a terminal of the vehicle end and the user end other than the master server end;

[0102] A monitoring module 206, used to monitor whether the load of the master end and the load of the slave end meet the load balancing condition within a preset time period;

[0103] The load balancing module 208 is used to perform load balancing on the enabled business components on the master server and the slave server when the load balancing condition is met.

[0104] In some embodiments, the monitoring module 206 is further configured to:

[0105] Determine the load difference between the master end load and the slave end load according to a preset time interval;

[0106] Monitoring whether an absolute value of an average value of a plurality of the load differences within a preset time period is greater than a preset threshold; the preset time period includes a plurality of the preset time intervals;

[0107] When the absolute value of the average value of the load difference is greater than a preset threshold, it is determined that the load balancing condition is met.

[0108] In some embodiments, the load balancing module 208 is further configured to:

[0109] Comparing the load of the master end with the load of the slave end;

[0110] In the case where the load of the master end is greater than the load of the slave end, selecting at least one first service component to be balanced from the service components enabled on the master server, and transferring the first service component from the master server to the slave server for operation;

[0111] When the load on the slave end is greater than the load on the master end, at least one second service component to be balanced is selected from the service components enabled on the slave service end, and the second service component is transferred from the slave service end to the master service end for operation.

[0112] In some embodiments, the load balancing module 208 is further configured to:

[0113] Among the service components enabled on the main server, at least one first service component to be balanced is selected according to a preset selection index; wherein the selection index includes at least one of the following: arrangement order, resource occupancy, importance level and usage frequency of the service components.

[0114] In some embodiments, the load balancing module 208 is further configured to:

[0115] Sending a first component identifier of the first service component to the slave server, so that the slave server controls the first service component to enter a waiting state according to the first component identifier;

[0116] When receiving the notification fed back from the server that the first service component has entered the waiting-for-balancing state, controlling the first service component to stop running and enter a disabled state;

[0117] A notification that the first service component has entered a disabled state is sent to the slave server, so that the slave server starts running the first service component.

[0118] In some embodiments, the load balancing module 208 is further configured to:

[0119] The display mode of the first service component on the display interface is controlled to change, so as to prompt the first service component to enter the waiting state from the enabled state through the changed display mode.

[0120] In some embodiments, the apparatus further includes a master-slave determination module, which is configured to:

[0121] Establishing a connection between the vehicle terminal and the user terminal;

[0122] After the connection is established, the master server and the slave server are determined from the vehicle terminal and the user terminal according to a preset master-slave relationship; or,

[0123] The vehicle terminal and the user terminal are both used as terminals to be selected;

[0124] Determine the load score of each of the terminals to be elected according to a preset load indicator, and determine the highest load score from the load scores of all the terminals to be elected;

[0125] The terminal to be elected corresponding to the highest load score is determined as the master server, and the terminals to be elected other than the master server are determined as slave servers.

[0126] The load balancing device for vehicle-machine interconnection disclosed in the above embodiments can execute the load balancing method for vehicle-machine interconnection disclosed in the above embodiments, and has the same or corresponding beneficial effects. To avoid repetition, it will not be described again here.

[0127] The embodiment of the present disclosure also provides a computer-readable storage medium, which stores a program or instruction, and the program or instruction enables a computer to execute the steps of any of the above methods.

[0128] Acquire the service components deployed on both the vehicle terminal and the user terminal that have established the connection;

[0129] Obtaining the master end load of the master server, and receiving the slave end load sent by the slave server; wherein the master server is one of the vehicle terminal and the user terminal, and the slave server is a terminal of the vehicle terminal and the user terminal other than the master server;

[0130] Monitor whether the load of the master end and the load of the slave end meet the load balancing condition within a preset time period;

[0131] When the load balancing condition is met, load balancing is performed on the enabled service components on the master server and the slave server.

[0132] Optionally, when executed by a computer processor, the computer executable instructions can also be used to execute the technical solution of any of the above-mentioned vehicle-machine interconnection load balancing methods provided in the embodiments of the present disclosure, thereby achieving corresponding beneficial effects.

[0133] Through the above description of the implementation method, the technicians in the relevant field can clearly understand that the embodiments of the present disclosure can be implemented with the help of software and necessary general hardware, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the embodiments of the present disclosure is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment of the present disclosure.

[0134] The embodiment of the present disclosure also provides an electronic device, including: one or more processors; a memory for storing one or more programs or instructions; the processor calls the programs or instructions stored in the memory to execute the steps of any of the above methods to achieve corresponding beneficial effects.

[0135] Figure 8 Schematic diagram of the hardware structure of the electronic device provided by the embodiment of the present disclosure. Figure 8 As shown, the electronic device includes one or more processors 301 and a memory 302 .

[0136] The processor 301 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device to perform desired functions.

[0137] The memory 302 may include one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 301 may run the program instructions to implement the load balancing method for vehicle-machine interconnection of the embodiment of the present disclosure described above, and / or other desired functions. Various contents such as input signals, signal components, noise components, etc. may also be stored in the computer-readable storage medium.

[0138] In one example, the electronic device may further include: an input device 303 and an output device 304, and these components are interconnected via a bus system and / or other forms of connection mechanisms (not shown).

[0139] In addition, the input device 303 may also include, for example, a keyboard, a mouse, and the like.

[0140] The output device 304 can output various information to the outside, including the determined distance information, direction information, etc. The output device 304 can include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, and the like.

[0141] Of course, to simplify, Figure 8 Only some of the components related to the present disclosure in the electronic device are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application situations, the electronic device may further include any other appropriate components.

[0142] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0143] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A load balancing method for vehicle-machine interconnection, characterized in that: The method comprises: Obtain the business components deployed on both the vehicle-side and the user-side that have established a connection; Obtaining the master end load of the master server, and receiving the slave end load sent by the slave server; wherein the master server is one of the vehicle terminal and the user terminal, and the slave server is a terminal of the vehicle terminal and the user terminal other than the master server; Monitor whether the load of the master end and the load of the slave end meet the load balancing condition within a preset time period; When the load balancing condition is met, load balancing is performed on the enabled service components on the master server and the slave server.

2. The method according to claim 1, characterized in that The monitoring of whether the load of the master end and the load of the slave end within a preset time period meet a load balancing condition includes: Determine the load difference between the master end load and the slave end load according to a preset time interval; Monitoring whether an absolute value of an average value of a plurality of the load differences within a preset time period is greater than a preset threshold; the preset time period includes a plurality of the preset time intervals; When the absolute value of the average value of the load difference is greater than a preset threshold, it is determined that the load balancing condition is met.

3. The method according to claim 1 or 2, characterized in that: The load balancing of the enabled service components on the master server and the slave server includes: Comparing the load of the master end with the load of the slave end; In the case where the load of the master end is greater than the load of the slave end, selecting at least one first service component to be balanced from the service components enabled on the master server, and transferring the first service component from the master server to the slave server for operation; When the load on the slave end is greater than the load on the master end, at least one second service component to be balanced is selected from the service components enabled on the slave service end, and the second service component is transferred from the slave service end to the master service end for operation.

4. The method according to claim 3, characterized in that The selecting at least one first service component to be balanced from the service components enabled on the primary server includes: Among the service components enabled on the main server, at least one first service component to be balanced is selected according to a preset selection index; wherein the selection index includes at least one of the following: arrangement order, resource occupancy, importance level and usage frequency of the service components.

5. The method according to claim 3, characterized in that: The transferring the first service component from the master server to the slave server for execution includes: Sending a first component identifier of the first service component to the slave server, so that the slave server controls the first service component to enter a waiting state according to the first component identifier; When receiving the notification fed back from the server that the first service component has entered the waiting-for-balancing state, controlling the first service component to stop running and enter a disabled state; A notification that the first service component has entered a disabled state is sent to the slave server, so that the slave server starts running the first service component.

6. The method according to claim 3, characterized in that: The method further comprises: The display mode of the first service component on the display interface is controlled to change, so as to prompt the first service component to enter the waiting state from the enabled state through the changed display mode.

7. The method according to claim 1, characterized in that The method further comprises: Establishing a connection between the vehicle terminal and the user terminal; After the connection is established, the master server and the slave server are determined from the vehicle terminal and the user terminal according to a preset master-slave relationship; or, The vehicle terminal and the user terminal are both used as terminals to be selected; Determine the load score of each of the terminals to be elected according to a preset load indicator, and determine the highest load score from the load scores of all the terminals to be elected; The terminal to be elected corresponding to the highest load score is determined as the master server, and the terminals to be elected other than the master server are determined as slave servers.

8. A load balancing device for vehicle-machine interconnection, characterized in that: The device comprises: A component acquisition module is used to acquire business components deployed on both the vehicle-side and the user-side that have established a connection; A load acquisition module, used to acquire the master end load of the master server end, and receive the slave end load sent by the slave server end; wherein the master server end is one of the vehicle end and the user end, and the slave server end is a terminal of the vehicle end and the user end other than the master server end; A monitoring module, used to monitor whether the load of the master end and the load of the slave end meet the load balancing condition within a preset time period; The load balancing module is used to load balance the service components enabled on the master server and the slave server when the load balancing condition is met.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program or instruction, and the program or instruction enables a computer to execute the steps of the method according to any one of claims 1 to 7.

10. An electronic device, characterized in that: include: one or more processors; A memory for storing one or more programs or instructions; The processor is used to execute the steps of the method according to any one of claims 1 to 7 by calling the program or instruction stored in the memory.

11. A vehicle, characterized in that: The vehicle includes the load balancing device for vehicle-machine interconnection as described in claim 8.