Resource allocation method, resource request method and storage medium

By obtaining the instance type of the target vehicle terminal from the cloud resource allocation system and dynamically switching it, the problem of idle cloud resources is solved, and efficient resource utilization and business continuity are achieved.

CN121967343APending Publication Date: 2026-05-01ZHEJIANG GEELY HLDG GRP CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHEJIANG GEELY HLDG GRP CO LTD
Filing Date
2026-01-13
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Cloud resources remain occupied even when users are not using them continuously, resulting in idle and wasted resources and low resource utilization efficiency.

Method used

By obtaining the target instance type requested by the target vehicle terminal, a matching basic resource instance is selected from the resource pool for allocation, and dynamic switching of instance types is supported, including the use of snapshot data and pre-allocation mechanism, to ensure efficient utilization of resources.

Benefits of technology

It achieves precise and flexible resource allocation, avoids resource misallocation, improves resource utilization and business continuity, and reduces resource waste.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121967343A_ABST
    Figure CN121967343A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of Internet of Vehicles, and discloses a resource allocation method, a resource request method and a storage medium, and the resource allocation method comprises the steps: obtaining a target instance type requested by a target vehicle-mounted terminal; selecting a basic resource instance matched with the target instance type from the resource pool as a target resource instance, and allocating the target resource instance to the target vehicle-mounted terminal, so that the target vehicle-mounted terminal applies the target resource instance; the resource pool comprises basic resource instances of at least two instance types. According to the application, the basic resource instance of the corresponding type matched according to the request of the target vehicle-mounted terminal can be allocated to the target vehicle-mounted terminal, so that allocation according to needs is realized, and the overall utilization rate of resources is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of vehicle networking technology, specifically to resource allocation methods, resource request methods, and storage media. Background Technology

[0002] In the process of automotive intelligence, cloud-based vehicle infotainment technology is gradually becoming a core solution for enhancing the cabin experience. It migrates the computing and storage loads of in-vehicle applications to the cloud, overcoming the performance limitations of in-vehicle hardware and enabling the operation of a wide range of applications. Currently, the mainstream resource allocation method for cloud-based vehicle infotainment systems is as follows: each user needs to occupy a separate resource instance from the cloud resource pool when activating the system to ensure the independence of application operation and data privacy. However, a large number of resource instances remain occupied even when users are not continuously using the system, resulting in idle and wasted cloud resources and low resource utilization efficiency. Summary of the Invention

[0003] This application provides a resource allocation method, a resource request method, and a storage medium to solve the problem of cloud resources being idle and wasted, resulting in low resource utilization efficiency, even when the user is not continuously using the cloud.

[0004] In a first aspect, this application provides a resource allocation method, the method comprising: Obtain the target instance type requested by the target vehicle terminal. The target instance type is used to characterize the sharing characteristics and / or resource characteristics of the basic resource instance. The sharing characteristics indicate whether the basic resource instance can be used in different vehicle terminals, and the resource characteristics indicate other characteristics corresponding to the basic resource instance. Select a basic resource instance from the resource pool that matches the target instance type as the target resource instance, and assign the target resource instance to the target vehicle terminal so that the target vehicle terminal can apply the target resource instance; the resource pool contains basic resource instances of at least two instance types.

[0005] The method provided in this embodiment obtains the target instance type requested by the target vehicle terminal, which characterizes the basic resource instance sharing features and / or resource features, and then selects a matching basic resource instance from the resource pool to allocate to the target vehicle terminal. This ensures that the resource allocation process accurately matches the actual resource needs of the vehicle terminal. By supporting the allocation of basic resource instances of multiple instance types in the resource pool, the differentiated resource usage needs of different vehicle terminals can be met, enabling on-demand allocation of vehicle resources and avoiding the problem of low utilization caused by resource mismatch.

[0006] In an optional implementation, after allocating the target resource instance to the target vehicle terminal, the method further includes: In response to an instance type switching request for the target resource instance, a type switching operation is performed on the target resource instance of the target vehicle terminal; the instance type switching request is triggered by the target vehicle terminal.

[0007] The method provided in this embodiment, by performing a type switching operation on the target resource instance in response to an instance type switching request triggered by the target vehicle terminal after allocating the target resource instance, can support the vehicle terminal to adjust the resource instance type according to changes in demand during service operation. By dynamically switching the resource instance type, it can avoid situations where the vehicle terminal interrupts services or re-initiates resource requests due to instance type mismatch, thereby achieving dynamic adaptability of resource allocation and improving the service continuity and resource usage flexibility of the vehicle terminal.

[0008] In one optional implementation, performing a type switching operation on the target resource instance of the target vehicle terminal includes: In response to the query of snapshot data corresponding to the first alternative resource instance, the first alternative resource instance is allocated to the target vehicle terminal according to the snapshot data; the first alternative resource instance is a basic resource instance with an instance type different from the target resource instance; the snapshot data refers to backup data of the state of the alternative resource instance; In response to the failure to find snapshot data corresponding to the first alternative resource instance, a second alternative resource instance is selected from the resource pool and allocated to the target vehicle terminal; the second alternative resource instance is a basic resource instance in the resource pool with an instance type different from the target resource instance.

[0009] The method provided in this embodiment, by prioritizing the query of snapshot data corresponding to the first alternative resource instance and allocating resources based on the snapshot data when performing a type switching operation, can quickly restore the resource state before the switch and ensure seamless connection of vehicle terminal services. By selecting a second alternative resource instance from the resource pool for allocation when no snapshot data is found, the smooth completion of the type switching operation can be ensured, avoiding switching failure due to missing snapshot data. This achieves high efficiency and reliability in instance type switching and reduces the impact of the switching process on the operation of vehicle terminal services.

[0010] In an optional implementation, before performing a type switching operation on the target resource instance of the target vehicle terminal, the method further includes: Create snapshot data corresponding to the target resource instance; the snapshot data is used to reallocate the target resource instance to the target vehicle terminal when performing a type switching operation on the first alternative resource instance or the second alternative resource instance of the target vehicle terminal; Release the target resource instance back into the resource pool.

[0011] The method provided in this embodiment creates snapshot data corresponding to the target resource instance before performing the type switching operation, which can provide data support for switching back to the instance type of the target resource instance later. By releasing the target resource instance back to the resource pool, the target resource instance can be re-entered into an allocatable state, realizing efficient resource recycling and reuse, and further improving the overall utilization rate of the resource pool.

[0012] In one optional implementation, the target instance type includes a shared type or a dedicated type. The shared type represents the type of basic resource instance that can be used jointly by different vehicle terminals, and the dedicated type represents the type of basic resource instance that the target vehicle terminal exclusively uses.

[0013] The method provided in this embodiment explicitly divides target instance types into shared and exclusive types. Shared instances support shared use by different vehicle terminals, while exclusive instances support exclusive use by the target vehicle terminal. This allows for the allocation of suitable instance types to different business scenarios of vehicle terminals. Multi-terminal reuse of shared basic resource instances improves resource utilization, while exclusive use of exclusive basic resource instances ensures the security and stability of sensitive services, achieving a balance between resource utilization and business security and reliability, and meeting the diverse resource needs of vehicle terminals.

[0014] In one optional implementation, the type of target instance requested by the target vehicle terminal includes: In response to the power-on startup of the target vehicle terminal, within a preset time range after the target vehicle terminal is powered on, it is detected whether a first allocation request sent by the target vehicle terminal is received; In response to receiving a first allocation request from the target vehicle terminal, the instance type indicated by the first allocation request is taken as the target instance type requested by the target vehicle terminal; the first allocation request is a request generated by the target vehicle terminal based on the instance type selected by the user; or... In response to the absence of a first allocation request from the target vehicle terminal, the instance type indicated by the second allocation request is taken as the target instance type requested by the target vehicle terminal; wherein, when the user has set an instance type corresponding to the power-on startup of the target vehicle terminal, the second allocation request is a request generated by the target vehicle terminal based on the instance type corresponding to the power-on startup of the target vehicle terminal set by the user; when the user has not set a target instance type corresponding to the power-on startup of the target vehicle terminal, the second allocation request is a request generated based on a shared type.

[0015] The method provided in this embodiment detects a first allocation request within a preset time range after the target vehicle terminal is powered on and starts up. It then flexibly determines the target instance type based on whether the first allocation request is received and the user's settings, thus prioritizing the fulfillment of the user's personalized resource selection needs. By default allocating a shared type basic resource instance when the user has not set or sent a first allocation request, resource idleness and waste can be reduced. This automates and personalizes resource allocation during the vehicle terminal's power-on startup phase, improving the user experience while ensuring efficient utilization of the resource pool.

[0016] In one optional implementation, the method further includes: In response to the detection that the load of the resource pool meets the high load condition and that the target resource instance used by the target vehicle terminal is of the exclusive type, an instance type switching notification is pushed to the target vehicle terminal; the instance type switching notification is used to prompt the target instance type to be switched to the shared type.

[0017] The method provided in this embodiment detects the load status of the resource pool. When the high load condition is met and the target resource instance used by the target vehicle terminal is of the exclusive type, a notification to switch to the shared type is pushed to the target vehicle terminal. This can guide the target vehicle terminal to switch from the exclusive type to the shared type, alleviate the high load pressure of the resource pool, and realize the dynamic adjustment of the resource pool load.

[0018] In one optional implementation, the method further includes: Obtain the historical switching data of the target vehicle terminal; The handover prediction result corresponding to the target vehicle terminal is determined based on the historical handover data; When the switching prediction result indicates a switching, during the first time period before the predicted switching time indicated by the switching prediction result, a pre-allocated resource instance is determined through a resource instance preparation operation. The pre-allocated resource instance is a basic resource instance corresponding to the instance type after the switching is selected from the resource pool.

[0019] The method provided in this embodiment obtains historical handover data of the target vehicle terminal and determines the handover prediction result. It prepares pre-allocated resource instances in the first time period before the predicted handover time. This can prepare basic resource instances corresponding to the instance type after handover for the target vehicle terminal in advance, reduce the resource matching and allocation time after the handover request is initiated, realize a fast response to resource handover, and further improve the service continuity and resource usage experience of the vehicle terminal.

[0020] In one alternative implementation, the method further includes: If no instance type switching request is received from the target vehicle terminal after the second time period following the predicted switching time, the pre-allocated resource instance will be released back to the resource pool.

[0021] The method provided in this embodiment releases the pre-allocated resource instance back to the resource pool if no instance type switching request is received after the second time period exceeding the predicted switching time. This avoids the pre-allocated resource instance from being idle for a long time due to non-use. By releasing the unused pre-allocated resource instance in a timely manner, the resource instance can re-enter the resource pool to participate in scheduling and be used by other in-vehicle terminals in need. This achieves effective management of the pre-allocated resource instance, ensures the available capacity of the resource pool, and avoids resource waste.

[0022] Secondly, this application provides a resource request method, the method comprising: The target instance type requested by the target vehicle terminal is sent to the resource allocation end; the target instance type is used to characterize the sharing characteristics and / or resource characteristics of the basic resource instance; the sharing characteristics indicate whether the basic resource instance can be used together in different vehicle terminals, and the resource characteristics indicate other characteristics corresponding to the basic resource instance; The application allocates a target resource instance based on the target instance type; the target resource instance is a basic resource instance selected by the resource allocation terminal from the resource pool that matches the target instance type; the resource pool contains basic resource instances of at least two instance types.

[0023] The method provided in this embodiment enables effective interaction between the resource request of the vehicle terminal and the scheduling logic of the resource allocation terminal by sending the target instance type requested by the target vehicle terminal to the resource allocation terminal and applying the target resource instance allocated by the resource allocation terminal. Sending the target instance type requested by the target vehicle terminal to the resource allocation terminal ensures that the resource allocation terminal accurately identifies the resource requirements of the target vehicle terminal, enabling the target vehicle terminal to accurately obtain the required basic resource instance.

[0024] In an optional implementation, after receiving the target resource instance allocated by the resource allocation terminal based on the target instance type, the method further includes: In response to detecting an instance type switching request for the target resource instance, the instance type switching request is sent to the resource allocation terminal; The application allocates an alternative resource instance based on the instance type switching request and sends the target resource instance to the resource allocation terminal so that the resource allocation terminal releases the target resource instance back to the resource pool; the alternative resource instance is a basic resource instance with an instance type different from the target resource instance.

[0025] The method provided in this embodiment, by sending the instance type switching request to the resource allocation end after detecting the instance type switching request, applying the allocated alternative resource instance, and releasing the original target resource instance back to the resource pool, enables the vehicle terminal to adjust the resource instance type in a timely manner according to changes in business needs. By releasing the original target resource instance, timely resource recovery can be achieved, ensuring the resource recycling of the resource pool, realizing the closed-loop execution of instance type switching between the vehicle terminal and the resource allocation end, and improving the resource usage flexibility of the vehicle terminal and the overall scheduling efficiency of the resource pool.

[0026] Thirdly, this application provides a computer-readable storage medium, comprising: computer instructions stored on the computer-readable storage medium, the computer instructions being configured to cause a computer to execute the resource allocation method of the first aspect or any corresponding embodiment thereof, or to execute the resource request method of the second aspect or any corresponding embodiment thereof. Attached Figure Description

[0027] To more clearly illustrate the technical solutions in the specific embodiments of this application or the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0028] Figure 1 This is a schematic diagram illustrating an application scenario according to an embodiment of this application; Figure 2 This is a schematic diagram of resource instance allocation in the related technology according to the embodiments of this application; Figure 3 This is a flowchart of a resource allocation method according to an embodiment of this application; Figure 4 This is a schematic diagram of resource instance allocation corresponding to the resource allocation method according to the embodiments of this application; Figure 5 This is a flowchart of a resource request method according to an embodiment of this application; Figure 6 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of this application. Detailed Implementation

[0029] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0030] It is understood that before using the technical solutions disclosed in the various embodiments of this application, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this application in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.

[0031] As one optional application scenario in the embodiments of this application, such as Figure 1 As shown, the resource allocation system may include at least one terminal device and at least one server. Figure 1 The system is illustrated in the example, which includes a computer 101, a mobile terminal 102, and a server 103, and the terminal devices such as the computer 101 and the mobile terminal 102 are connected to the server 103 through a network 110.

[0032] Specifically, the terminal device can be a vehicle-mounted terminal. Server 103 can be a standalone physical server, a server cluster, a distributed system, or a cloud server providing cloud services. Network 110 can be a wired or wireless network, examples of which include, but are not limited to, the Internet, corporate intranets, local area networks, wide area networks, mobile communication networks, and combinations thereof.

[0033] Figure 2 This is a schematic diagram of resource instance allocation in the related technology according to the embodiments of this application, such as... Figure 2 As shown, each vehicle terminal occupies one resource instance, which remains occupied even when the vehicle terminal is not in continuous use, resulting in idle and wasted cloud resources and low resource efficiency.

[0034] According to an embodiment of this application, a resource allocation method is provided to solve the above-mentioned problems. 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. 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.

[0035] This embodiment provides a resource allocation method. Figure 3 This is a flowchart of a resource allocation method according to an embodiment of this application, such as... Figure 3 As shown, the process includes the following steps: S201: Obtain the target instance type requested by the target vehicle terminal.

[0036] In this embodiment, the target instance type is used to characterize the sharing characteristics and / or resource characteristics of the basic resource instance. The sharing characteristics indicate whether the basic resource instance can be used jointly by different target vehicle terminals, while the resource characteristics represent other characteristics corresponding to the basic resource instance. As an example, the sharing characteristics can be represented by numbers, for example, "1" represents a shared type and "0" represents a dedicated type. As an example, resource characteristics may include resource performance level, resource security level, resource service latency threshold, etc. Resource characteristics can be used in conjunction with sharing characteristics to achieve refined screening of basic resource instances, assisting the resource allocation end in accurately matching the needs of target vehicle terminals and improving the adaptability of resource instance allocation.

[0037] As an example, resource performance levels can be categorized into high-performance, standard, and basic performance levels. The high-performance level corresponds to a high computing power allocation, supporting in-vehicle services with extremely high computing power requirements, such as real-time decision-making for autonomous driving, high-definition video rendering, and multi-task parallel processing. The standard performance level corresponds to a medium computing power allocation, meeting the computing power needs of common in-vehicle functions such as navigation, voice interaction, and online music playback. The basic performance level corresponds to a low computing power allocation, supporting only simple services with low computing power consumption, such as vehicle status monitoring and basic information queries.

[0038] As an example, resource security levels can be categorized as Top Secret, Confidential, and General. Top Secret corresponds to a high-strength security encryption strategy, requiring strong encryption algorithms to meet data storage and processing needs. For example, storing core privacy data such as vehicle owner account information, vehicle control commands, and biometric data requires a Top Secret level resource instance. Confidential corresponds to a basic security encryption strategy, requiring basic encryption and access control capabilities. For example, storing moderately sensitive data such as personalized settings and usage history of in-vehicle terminals requires a Confidential level resource instance. General corresponds to no special security encryption strategy or measures. For example, storing non-privacy public data such as general navigation maps, public music libraries, and weather query results requires a General level resource instance.

[0039] As an example, resource service latency thresholds can be categorized into low-latency, medium-latency, and high-latency levels. For instance, a low-latency level corresponds to a latency threshold of less than or equal to 10ms, matching low-latency optimized network connection configurations (such as using 5G edge computing protocols, dedicated high-priority ports, and no bandwidth limitations), suitable for services such as autonomous driving command response and real-time vehicle status feedback. A medium-latency level corresponds to a latency threshold greater than 10ms and less than or equal to 50ms, matching conventional network connection configurations (such as using standard 5G / 4G protocols, shared ports, and medium bandwidth limitations), suitable for services such as voice interaction and online navigation route planning. A high-latency level corresponds to a latency threshold greater than 50ms, matching ordinary network connection configurations (such as using conventional network protocols, shared low-priority ports, and relaxed bandwidth limitations), suitable for services such as software background updates and offline data synchronization.

[0040] In the embodiments of this application, the target instance type includes a shared type or a dedicated type. The shared type represents the type of basic resource instance that can be used jointly by different target vehicle terminals, while the dedicated type represents the type of basic resource instance that the target vehicle terminal exclusively uses.

[0041] The resource allocation method provided in this application is applied to a resource allocation terminal, which can be a server. The target vehicle terminal establishes a communication connection with the resource allocation terminal through the vehicle network. When the cloud vehicle function is started, the user actively selects the target instance type, or the preset start rules are met, an operation to generate a target allocation request (the target allocation request is either a first allocation request or a second allocation request) is triggered. The target vehicle terminal sends the generated target allocation request to the resource allocation terminal, and the resource allocation terminal obtains the target instance type requested by the target vehicle terminal based on the target allocation request. In this embodiment, as an example, the user can trigger the operation to generate the target allocation request through the interactive interface of the vehicle display screen, voice command triggering, etc. For example, after the user clicks the "Select Target Instance Type" button on the interactive interface of the vehicle display screen, an option menu pops up, such as "Shared Instance - Featured Public Channels" or "Dedicated Instance". After the user selects and confirms, the target vehicle terminal generates a target allocation request according to the user's selected option.

[0042] S202: Select a basic resource instance that matches the target instance type from the resource pool as the target resource instance, and assign the target resource instance to the target vehicle terminal so that the target vehicle terminal can apply the target resource instance.

[0043] In this embodiment, the resource pool contains basic resource instances of at least two instance types. Basic resource instances of the shared type are called shared instances, and basic resource instances of the dedicated type are called dedicated instances. Shared instances support simultaneous or time-sharing access by multiple different vehicle terminals, and the access of a single vehicle terminal will not restrict the usage rights of other vehicle terminals. Once a dedicated instance is assigned to a target vehicle terminal, its usage rights will be exclusively held by that target vehicle terminal and cannot be accessed by other vehicle terminals before being released.

[0044] In this embodiment, the shared type of basic resource instance refers to the basic resource instance that carries public services and general content. It is pre-created and maintained by the resource allocation end, such as resource instances corresponding to general navigation services, public music libraries, and weather query tools. It supports multiple vehicle terminals to access and use at the same time and does not store any user personal data.

[0045] In this embodiment, the dedicated basic resource instance refers to a basic resource instance that carries personalized services and private data. It is exclusively allocated to a single in-vehicle terminal and can store the user's personalized settings, such as seat adjustment memory, interface layout preferences, historical usage records, such as navigation favorites, and private data, such as local files and personal account information, thus meeting the user's needs for privacy and customized services.

[0046] In this embodiment, the relevant data information of the basic resource instance is associated with the unique identifier of the resource instance and stored in a distributed cache or database. The relevant data information of the basic resource instance may include resource performance level, resource security level, resource service latency threshold, and may also include instance status, concurrency limit, real-time concurrency, instance type ("1" indicates shared type, "0" indicates dedicated type), whether the real-time concurrency has reached the concurrency limit, geographical partition, etc. For example, when the instance type is dedicated, the concurrency limit, whether the real-time concurrency has reached the concurrency limit, and the real-time concurrency may not be stored. For example, the instance status corresponding to the shared type may include normal service, restarting, restarting, shutting down, shut down, idle, etc. The instance status corresponding to the dedicated type may include idle, occupied, etc. The unique identifier of the resource instance is used to distinguish different basic resource instances. Geographical partitioning refers to the regional division of basic resource instances in the resource pool based on the physical geographical location of the network nodes. Network nodes refer to hardware devices or server clusters deployed in different geographical partitions that have resource storage, computing power processing, and data interaction capabilities, and are the physical carriers of the basic resource instances. As an example, geographical zoning is often done in a multi-level manner, such as regional level, provincial level, and city level. The regional level covers a large geographical area that includes multiple provinces, the regional level covers a geographical area that includes a specific province, and the city level covers a geographical area that includes a specific city.

[0047] In this embodiment, selecting a basic resource instance matching the target instance type from the resource pool as the target resource instance means that if the target instance type requested by the target vehicle terminal is shared, the resource performance level is confidential, the resource security level is medium latency, and the resource service latency threshold is less than or equal to 10ms, then shared instances with normal service status and real-time concurrency not reaching the concurrency limit are selected from the resource pool to obtain an initial instance set. Further filtering is then performed based on the resource performance level being confidential, the resource security level being medium latency, and the resource service latency threshold being less than or equal to 10ms to obtain the target instance set. If the target instance set includes only one shared instance, that shared instance is used as the target resource instance. If the target instance set includes two or more shared instances, one shared instance can be randomly selected from the target instance set as the target resource instance.

[0048] If the target vehicle terminal requests a dedicated resource with a confidential performance level, medium latency, and a service latency threshold of less than or equal to 10ms, then idle dedicated instances are selected from the resource pool to obtain an initial instance set. Further filtering is then performed based on the confidential performance level, medium latency, and 10ms latency threshold to obtain the target instance set. If the target instance set contains only one dedicated instance, that dedicated instance is used as the target resource instance. If the target instance set contains two or more dedicated instances, one dedicated instance is randomly selected from the target instance set as the target resource instance.

[0049] In addition, a shared instance or a dedicated instance can be selected from the target instance set as the target resource instance according to preset priority rules. As an instance, the preset priority rules include: for shared instances, priority can be given to the shared instance with the closest geographical partition to the target vehicle terminal and the lowest real-time concurrency; for dedicated instances, priority can be given to the dedicated instance with the closest geographical partition to the target vehicle terminal.

[0050] In this embodiment of the application, allocating a target resource instance to a target vehicle terminal means that the resource allocation end establishes a mapping relationship between the target vehicle terminal and the target resource instance, configures parameters such as network connection and access permissions of the target resource instance, sends an instance access instruction to the target vehicle terminal, and the target vehicle terminal accesses the target resource instance according to the instance access instruction, so that the target vehicle terminal can normally access and use the services and content of the target resource instance.

[0051] This embodiment obtains the target instance type requested by the target vehicle terminal, which represents the basic resource instance sharing characteristics and / or resource characteristics, and then selects a matching basic resource instance from the resource pool to allocate to the target vehicle terminal. This enables the resource allocation process to accurately correspond to the actual resource needs of the vehicle terminal. By supporting the allocation of basic resource instances of multiple instance types in the resource pool, it can meet the differentiated resource usage needs of different vehicle terminals, realize on-demand allocation of vehicle resources, and avoid the problem of low utilization caused by resource mismatch.

[0052] In an optional implementation, the resource allocation method further includes: after allocating a target resource instance to a target vehicle terminal, in response to an instance type switching request for the target resource instance, performing a type switching operation on the target resource instance of the target vehicle terminal.

[0053] In this embodiment of the application, the instance type switching request is triggered by the target vehicle terminal.

[0054] In this embodiment, the resource allocation end selects a basic resource instance matching the target instance type from the resource pool as the target resource instance. After allocating the target resource instance to the target vehicle terminal, it checks whether an instance type switching request for the target resource instance has been received from the target vehicle terminal. If an instance type switching request is received, a type switching operation is performed on the target resource instance currently used by the target vehicle terminal. If no instance type switching request is received, the binding relationship between the target vehicle terminal and the target resource instance is maintained. As an example, in this embodiment, the user can trigger the generation of the instance type switching request through the interactive interface of the vehicle display screen, voice command triggering, etc. For example, after clicking the "Target Instance Type Switch" button on the interactive interface of the vehicle display screen, an option menu pops up, such as "Switch to Shared Instance - Featured Public Channel" or "Switch to My Dedicated Instance." After the user selects and confirms, the target vehicle terminal generates an instance type switching request based on the user's selected option. The target vehicle terminal then sends the generated instance type switching request to the resource allocation end. An instance type switching request includes the unique identifier of the target resource instance before the switch, the instance type before the switch, the instance type after the switch, and may also include the unique identifier or resource characteristics of the alternative resource instance after the switch.

[0055] This embodiment, after allocating a target resource instance, responds to the instance type switching request triggered by the target vehicle terminal by performing a type switching operation on the target resource instance. This allows the vehicle terminal to adjust the resource instance type according to changes in demand during business operation. By dynamically switching the resource instance type, it can avoid the situation where the vehicle terminal interrupts business or re-initiates resource requests due to instance type mismatch, thereby achieving dynamic adaptability of resource allocation and improving the business continuity and resource usage flexibility of the vehicle terminal.

[0056] In one alternative implementation, a type switching operation is performed on the target resource instance of the target vehicle terminal, including one of steps Sa1 or Sa2.

[0057] Sa1, in response to finding the snapshot data corresponding to the first alternative resource instance, allocates the first alternative resource instance to the target vehicle terminal based on the snapshot data.

[0058] In this embodiment, the first alternative resource instance is a base resource instance of a different instance type than the target resource instance. Snapshot data refers to backup data of the state of the alternative resource instance.

[0059] In this embodiment of the application, snapshot data refers to backup data created by the resource allocation terminal during the historical use of the first alternative resource instance in the target vehicle terminal, which includes business operation status, user association data and instance configuration parameters. The role of snapshot data is to quickly restore the usage status of the resource instance when performing type switching operation, so as to ensure the continuity of vehicle terminal business operation.

[0060] As an example, the business operation status is the real-time status of the business currently being carried by the resource instance, such as the current location and path planning progress of the navigation service, the playback position and caching progress of the audio and video application, and the sensor data calibration parameters of the autonomous driving assistance function.

[0061] As an example, user-related data refers to the data linked to the target in-vehicle terminal. This data can include personalized settings such as seat adjustment memory, in-vehicle interface layout, and sound preferences; historical usage records such as navigation save points, video / audio playback progress, and application operation logs; and private data such as local cached files, personal account login status, and biometric verification information.

[0062] As an example, instance configuration parameters are the core operational parameters of a resource instance, such as computing power allocation quotas, network connection configurations, and security encryption policies. Network connection configurations may include ports, protocols, and bandwidth limits, while security encryption policies may include encryption key indexes and permission verification rules.

[0063] In this embodiment, as an example, the specific implementation of allocating a first alternative resource instance to a target vehicle terminal based on snapshot data is as follows: The resource allocation terminal selects a first alternative resource instance from the resource pool that matches the instance configuration parameters in the snapshot data, ensuring that the resource performance level, resource security level, and resource service latency threshold of the first alternative resource instance are consistent with the instance configuration parameters in the snapshot data. The resource allocation terminal sends the snapshot data to the network node carrying the first alternative resource instance, loads the instance configuration parameters, restores the service operation status, and synchronizes user-related data. A binding relationship is established between the first alternative resource instance and the target vehicle terminal, network access permissions are configured, and an access command is sent to the target vehicle terminal, enabling the target vehicle terminal to seamlessly access and use the service.

[0064] In this embodiment, as an example, the snapshot data of a shared instance may only include instance configuration parameters and service operation status, such as the global traffic condition cache of a public navigation service or the playlist index of a public music library. Since the shared instance is shared by multiple terminals and not bound to a single user, it does not include user-related data. The snapshot data of a dedicated instance may include service operation status, user-related data, and instance configuration parameters. The snapshot data of a shared instance adopts a globally shared storage mode, and is used by all in-vehicle terminals, without needing separate storage for a single in-vehicle terminal. The snapshot data of a dedicated instance adopts a terminal-specific storage mode. The snapshot data of each dedicated instance is associated with the unique identifier of the target in-vehicle terminal, and the snapshot data of different in-vehicle terminals are isolated from each other, only allowed to be accessed when the corresponding in-vehicle terminal switches instance types.

[0065] Sa2, in response to the failure to find snapshot data corresponding to the first alternative resource instance, selects a second alternative resource instance from the resource pool and assigns it to the target vehicle terminal.

[0066] In this embodiment of the application, the second alternative resource instance is a basic resource instance in the resource pool that has a different instance type from the target resource instance.

[0067] In this embodiment, a base resource instance matching the unique identifier of the switched alternative resource instance can be selected from the resource pool as the second alternative resource instance. Alternatively, a base resource instance matching the switched instance type can be selected from the resource pool to obtain an initial instance set, which can then be further filtered based on resource characteristics to obtain a target instance set. Finally, a base resource instance can be selected from the target instance set as the second alternative resource instance.

[0068] The resource allocation terminal initializes the second alternative resource instance, such as loading basic operating parameters, configuring network connections (e.g., port, protocol, bandwidth limits), and setting access permissions (e.g., permission verification rules). If it is a dedicated instance, it also needs to initialize the user-associated data storage space. After initialization, it establishes a binding relationship with the target vehicle terminal and sends an access command to the target vehicle terminal, enabling the target vehicle terminal to access and use the service.

[0069] Compared to resource instance allocation based on non-snapshot data (i.e., the initialization configuration process in step Sa2), resource instance allocation based on snapshot data (step Sa1) can reduce the waiting time during the switchover process. Step Sa2 requires executing a complete initialization configuration process; if it is a dedicated instance, additional user-associated data storage space needs to be initialized. Only after completing the above initialization can a binding relationship be established with the target vehicle terminal, and an access command be sent to the target vehicle terminal. Step Sa1, on the other hand, reuses pre-created snapshot data, which can directly load the stored instance configuration parameters and user-associated data without re-initializing basic operating parameters, network connections, and permissions, or re-initializing storage space, thereby reducing the waiting time during the switchover process.

[0070] In this embodiment, when the instance type of the target resource instance is exclusive, the type switching operation needs to switch the instance type used by the target vehicle terminal from exclusive to shared, and the instance type of the first alternative resource instance or the second alternative resource instance is shared. When the instance type of the target resource instance is shared, the type switching operation needs to switch the instance type used by the target vehicle terminal from shared to exclusive, and the instance type of the first alternative resource instance or the second alternative resource instance is exclusive.

[0071] In this embodiment, resource instances can be quickly reallocated based on pre-created snapshot data, ensuring the continuity of type switching operations and the smoothness of the user experience, and reducing the waiting time during the switching process.

[0072] In an optional implementation, the resource allocation method further includes: creating snapshot data corresponding to the target resource instance before performing a type switching operation on the target resource instance of the target vehicle terminal; and releasing the target resource instance back to the resource pool.

[0073] In this embodiment of the application, the snapshot data is used to reallocate the target resource instance to the target vehicle terminal when performing a type switching operation on the first alternative resource instance or the second alternative resource instance of the target vehicle terminal.

[0074] In this embodiment, after allocating a target resource instance of the dedicated instance type to the target vehicle terminal at the resource allocation end, if the user wants to switch to the shared type, before performing the type switching operation on the target resource instance of the target vehicle terminal, it is necessary to create snapshot data corresponding to the dedicated instance type. This allows the user to quickly switch back to the dedicated type based on the snapshot data when they want to switch back to the dedicated instance. Similarly, before performing the type switching operation on the alternative resource instance (first alternative resource instance or second alternative resource instance) of the target vehicle terminal, it is also necessary to create snapshot data corresponding to the alternative resource instance and release the alternative resource instance back to the resource pool.

[0075] In this embodiment, snapshot data corresponding to the target resource instance is created. Specifically, the resource allocation terminal communicates with the network node carrying the basic resource instance to collect the instance configuration parameters and service operation status of the target resource instance in real time. Furthermore, when the target resource instance is of the dedicated type, user-related data also needs to be collected. Incremental collection can be used, collecting only the data that has changed compared to the last snapshot creation, reducing resource consumption. After collection, the snapshot data is encrypted and stored in the target storage area of ​​the resource allocation terminal, indexed by the unique identifier of the target vehicle terminal, instance type, creation timestamp, and the unique identifier of the resource instance.

[0076] This embodiment creates snapshot data corresponding to the target resource instance before performing the type switching operation, which provides data support for switching back to the instance type of the target resource instance later. By releasing the target resource instance back to the resource pool, the target resource instance can re-enter an allocatable state, realizing efficient resource recycling and reuse, and further improving the overall utilization rate of the resource pool.

[0077] In one optional implementation, the type of target instance requested by the target vehicle terminal in S201 includes: In response to the power-on startup of the target vehicle terminal, within a preset time range after the target vehicle terminal powers on, it is detected whether the first allocation request sent by the target vehicle terminal is received.

[0078] In response to receiving a first allocation request from the target vehicle terminal, the instance type indicated in the first allocation request is taken as the target instance type requested by the target vehicle terminal. The first allocation request is a request generated by the target vehicle terminal based on the instance type selected by the user. Alternatively, In response to the absence of a first allocation request from the target vehicle terminal, the instance type indicated by the second allocation request is taken as the target instance type requested by the target vehicle terminal. Specifically, if the user has configured an instance type corresponding to the target vehicle terminal's power-on startup, the second allocation request is generated by the target vehicle terminal based on the user-configured instance type. If the user has not configured a target instance type corresponding to the target vehicle terminal's power-on startup, the second allocation request is generated based on a shared type.

[0079] In this embodiment, after the target vehicle terminal powers on, it checks whether a first allocation request sent by the target vehicle terminal is received within a preset time range after the target vehicle terminal powers on. If the first allocation request is received, the instance type in the first allocation request is taken as the target instance type requested by the target vehicle terminal. Alternatively, if the first allocation request is not received, the instance type in the second allocation request is taken as the target instance type requested by the target vehicle terminal. The preset time range can be set and modified according to actual needs.

[0080] As an example, to improve user experience, for frequent users, the cloud-based vehicle system function can be pre-activated when the car door is detected to be unlocked. Allocation will be prioritized based on the first allocation request generated according to the instance type selected by the user, or a second allocation request generated according to the instance type set by the user. If the user has not set an instance type, allocation will be prioritized based on the shared type. This meets the user's need for immediate use, and prioritizing allocation based on the shared type when the user has not set an instance type reduces the occupation of resource instances.

[0081] This embodiment designs differentiated allocation logic for the target vehicle terminal power-on startup scenario. It supports users actively selecting instance types, and when users have set an instance type corresponding to the target vehicle terminal power-on startup, it prioritizes the allocation of the user-set instance type. When users have not set an instance type corresponding to the target vehicle terminal power-on startup, it prioritizes the allocation of shared types, which can quickly allocate resource instances, balance flexibility and startup efficiency, and adapt to different user operating habits.

[0082] In one optional implementation, the resource allocation method further includes: In response to the detection that the resource pool's load meets high load conditions and that the target resource instance used by the target vehicle terminal is of the dedicated type, an instance type switch notification is pushed to the target vehicle terminal. The instance type switch notification is used to prompt the user to switch the target instance type to the shared type.

[0083] In this embodiment of the application, the instance type switching notification is used to indicate that the resource pool is under high load and to prompt the user to switch the instance type to a shared type.

[0084] In this embodiment, when the load of the resource pool meets the high load condition, the target vehicle terminal using the dedicated instance is actively guided to switch to the shared instance, thereby reducing resource contention, avoiding response delay, and reducing the load pressure on the resource pool.

[0085] In this embodiment, the resource allocation terminal monitors the load of the resource pool in real time, such as instance occupancy, CPU utilization, and memory utilization. When any of these load indicators reaches the corresponding preset high load threshold, it is determined that the load of the resource pool meets the high load condition. At this time, an instance type switching notification can be pushed to all vehicle terminals using the dedicated instance. The instance type switching notification may be "The current system is busy. Switching to the selected public channel will provide a smoother experience".

[0086] Upon receiving a switching notification result from the target vehicle terminal based on the instance type switching notification, the system determines whether to switch the target vehicle terminal to the shared instance based on the switching notification result. The switching notification result includes acceptance or rejection. If accepted, the target vehicle terminal is switched to the shared instance. If rejected, the binding relationship between the target vehicle terminal and the underlying resource instance is maintained.

[0087] The method provided in this embodiment detects the load status of the resource pool. When the high load condition is met and the target resource instance used by the target vehicle terminal is of the exclusive type, a notification to switch to the shared type is pushed to the target vehicle terminal. This can guide the target vehicle terminal to switch from the exclusive type to the shared type, alleviate the high load pressure of the resource pool, and realize the dynamic adjustment of the resource pool load.

[0088] Figure 4 This is a schematic diagram of resource instance allocation corresponding to the resource allocation method in the embodiments of this application, such as... Figure 4 As shown, a shared instance can be used by multiple target vehicle terminals. A dedicated instance can be used by a single target vehicle terminal.

[0089] In an alternative implementation, the resource allocation method further includes Sb1 to Sb4.

[0090] Sb1: Obtain historical switching data of the target vehicle terminal.

[0091] In this embodiment, historical switching data includes the time point of the historical instance type switch, the instance type before the switch, the instance type after the switch, the unique identifier of the resource instance before the switch, the unique identifier of the resource instance after the switch, and the switching trigger scenario. Historical switching data may also include the current resource instance usage duration. As an example, the switching trigger scenario includes the vehicle's current geographical location, such as a commuting route, a shopping mall parking lot, a highway section, or a remote suburb; network signal strength, such as full signal, strong, medium, weak, or no signal; and the user's recent service needs, such as navigation planning, online music playback, high-definition video viewing, private data querying, and office document processing.

[0092] Sb2: Determine the handover prediction result corresponding to the target vehicle terminal based on historical handover data.

[0093] In this embodiment, the handover prediction result includes whether to switch or not, the predicted handover time, and the instance type after the handover. The handover prediction result may also include the unique identifier of the resource instance before the handover and the unique identifier of the resource instance after the handover.

[0094] The resource allocation module analyzes historical failover data, constructs a predictive rule base, and stores it on the server. It then determines the failover prediction result based on this rule base. For example, if multiple time points with the same failover trigger scenario are within a similar interval, the predicted failover time can be determined based on these time points; for instance, the average of these multiple failover time points can be used as the predicted failover time. A similar interval refers to a time length between the earliest and latest times among multiple time points that is less than a preset time threshold, such as 10 minutes. The predictive rule base can include multiple predictive rules stored in a correspondence relationship. Each predictive rule includes the failover prediction conditions stored in a correspondence relationship, and the following conditions must be met: the instance type after failover, and the unique identifier of the resource instance after failover.

[0095] As an example, the switching prediction conditions can include multiple switching prediction indicators, such as similarity interval matching degree, instance type before switching, unique identifier of resource instance before switching, similarity index of switching trigger scenario, etc. The switching prediction indicators are assigned corresponding weights, and the switching prediction probability is calculated by weighted summation. If the switching prediction probability is greater than or equal to the preset probability threshold, the instance type is determined to switch. If the switching prediction probability is less than the preset probability threshold, the instance type is determined not to switch. The preset probability threshold can be set and modified according to actual needs.

[0096] As another example, the switching prediction conditions can include the instance type before the switch, the unique identifier of the resource instances before the switch being the same, and the current time being within the similarity range of the prediction rule.

[0097] Sb3: When the handover prediction result indicates a handover, during the first time period before the predicted handover time indicated by the handover prediction result, a pre-allocated resource instance is determined through the resource instance preparation operation.

[0098] In this embodiment, the pre-allocated resource instance is a basic resource instance selected from the resource pool corresponding to the instance type after the switch. When the switch prediction result indicates no switch, the binding relationship between the target vehicle terminal and the currently used basic resource instance is maintained.

[0099] In this embodiment, the resource instance preparation operation further includes creating snapshot data corresponding to the currently used basic resource instance. For example, if the basic resource instance currently used by the target vehicle terminal is of the dedicated type, the resource instance preparation operation also includes creating snapshot data corresponding to that dedicated instance.

[0100] This embodiment predicts the handover result corresponding to the target vehicle terminal based on historical handover data and prepares resource instances in advance, thereby shortening the time spent on resource instance allocation during handover and improving the smoothness of handover.

[0101] Sb4: If no instance type switching request is received from the target vehicle terminal after the second time period exceeding the predicted switching time, the pre-allocated resource instance will be released back to the resource pool.

[0102] In this embodiment of the application, after the second time period exceeding the predicted switching time, if an instance type switching request sent by the target vehicle terminal is received and the instance type in the received instance type switching request sent by the target vehicle terminal is not the switched instance type in the switching prediction result, then the pre-allocated resource instance is released back to the resource pool.

[0103] In this embodiment, the first time period and the second time period can be set and modified according to actual needs. For example, if the predicted switchover time is 15:14:00, the first time period before the predicted switchover time can be within 5 minutes before 15:14:00, and the resource instance preparation operation can be performed within those 5 minutes. For example, the resource instance preparation operation can be performed at the first moment within 5 minutes before the predicted switchover time of 15:14:00, such as 15:13:00. The time interval between the first moment and the predicted switchover time can be set and modified according to actual needs. For example, if the predicted switchover time is 15:14:00, the second time period after the predicted switchover time can be within 5 minutes after 15:14:00, and the resource instance preparation operation can be performed within those 5 minutes. For example, the resource instance preparation operation can be performed at the second moment within 5 minutes after the predicted switchover time of 15:14:00, such as 15:15:00. The time interval between the second moment and the predicted switchover time can be set and modified according to actual needs.

[0104] In this embodiment, if no instance type switching request is received after the second time period exceeding the predicted switching time, the pre-allocated resource instance will be released back to the resource pool to avoid long-term idle resource instances, ensure the dynamic balance of the resource pool, balance the smoothness of switching and the efficiency of resource utilization, and avoid waste caused by excessive pre-allocation.

[0105] In an alternative implementation, the resource allocation method further includes Sc1 to Sc4.

[0106] Sc1: When the target instance type used by the target vehicle terminal is shared, if a data upload request is received from the target vehicle terminal, the data upload request is verified and the verification result is obtained.

[0107] In this embodiment of the application, the data upload request includes terminal data to be uploaded.

[0108] Sc2: Receive terminal data when the verification result is successful.

[0109] Sc3: Do not receive terminal data when the verification result is "verification failed".

[0110] In this embodiment, the data upload verification request includes source verification, target verification, and data verification. If all three verifications pass, the verification result is "verification passed." If any one of these verifications fails, the verification result is "verification failed."

[0111] As an example, source-side verification can include binding relationship verification and access environment verification. Binding relationship verification can, for example, verify that the user's unique identifier and the device identifier are bound together. Verifying the access environment of the target vehicle terminal can, for example, determine whether it is a trusted environment by verifying the device's security certificate and the whitelist to which the access IP belongs.

[0112] As an example, target verification can include instance type permission verification, such as querying the data receiving whitelist preset by the shared instance to confirm whether the type of terminal data to be uploaded (such as public navigation data, general music resources) is within the whitelist range.

[0113] As an example, data validation can include data type validation, data compliance validation, and data encryption validation. Data type validation, for example, involves parsing the data format of the terminal data, identifying data tags, and determining whether the terminal data is public data (such as public points of interest information, general weather data) or private data (such as user address books, personal travel records). Data compliance validation, for example, checks whether the terminal data contains sensitive information (such as ID card numbers, bank card numbers) and whether there are any formatting errors or malicious code. Data encryption validation, for example, verifies whether the encryption method of the terminal data to be uploaded is consistent with the encryption methods supported by the shared instance.

[0114] In this embodiment of the application, the requests received by the resource allocation end (such as target allocation request, instance type switching request, first allocation request, second allocation request, data upload request, etc.) also include the unique identifier of the currently allocated resource instance, device identifier, such as vehicle identification number (VIN) or vehicle hardware serial number (SN), and user unique identifier, such as account ID.

[0115] In this embodiment, when the target instance type used by the target vehicle terminal is a shared type, if a data upload request is received from the target vehicle terminal, the data upload request needs to be verified to ensure the security of the terminal data.

[0116] This embodiment provides a resource request method. Figure 5 This is a flowchart of a resource request method according to an embodiment of this application, which is applied to an in-vehicle terminal. Figure 5 As shown, the process includes the following steps: S301, send the target instance type requested by the target vehicle terminal to the resource allocation end.

[0117] In this embodiment, the target instance type is used to characterize the shared characteristics and / or resource characteristics of the basic resource instance. Shared characteristics indicate whether the basic resource instance can be used jointly by different vehicle terminals, while resource characteristics represent other characteristics corresponding to the basic resource instance. The relevant descriptions of shared characteristics and resource characteristics are as described in the resource allocation method above and will not be repeated here.

[0118] As an example, users can trigger the generation of a target allocation request through the interactive interface of the in-vehicle display, voice commands, or other means. The target allocation request includes the target instance type requested by the target in-vehicle terminal. After the target allocation request is generated, it is sent to the resource allocation end.

[0119] For example, when a user clicks the "Select Target Instance Type" button on the interactive interface of the vehicle display screen, an option menu pops up, such as "Shared Instance - Featured Public Channels" or "Dedicated Instance". After the user selects and confirms, the target vehicle terminal generates a target allocation request based on the user's selected option.

[0120] S302, The application resource allocation terminal allocates target resource instances based on the target instance type.

[0121] In this embodiment, the target resource instance is a basic resource instance selected by the resource allocation end from the resource pool that matches the target instance type. The resource pool contains basic resource instances of at least two instance types.

[0122] In this embodiment, the target resource instance allocated by the target vehicle terminal application resource allocation terminal based on the target instance type refers to the instance access instruction sent by the resource allocation terminal, after which the target vehicle terminal establishes a secure communication link with the network node to which the target resource instance belongs through the vehicle network, and calls upon the computing power, storage, and service capabilities of the target resource instance. For example, business interaction data (such as operation instructions and usage records) can be synchronized to the target resource instance to achieve normal service use and real-time data interaction.

[0123] This embodiment enables effective interaction between the vehicle terminal's resource request and the resource allocation terminal's scheduling logic by sending the target instance type requested by the target vehicle terminal to the resource allocation terminal and applying the target resource instance allocated by the resource allocation terminal. Sending the target instance type requested by the target vehicle terminal to the resource allocation terminal ensures that the resource allocation terminal accurately identifies the target vehicle terminal's resource requirements, enabling the target vehicle terminal to accurately acquire the required basic resource instances.

[0124] In an optional implementation, the resource request method further includes: after receiving a target resource instance allocated by a resource allocator based on a target instance type, in response to detecting an instance type switching request for the target resource instance, sending an instance type switching request to the resource allocator. The alternative resource instance allocated by the resource allocator based on the instance type switching request is then applied, and the target resource instance is sent to the resource allocator, so that the resource allocator releases the target resource instance back to the resource pool.

[0125] In this embodiment of the application, the alternative resource instance is a basic resource instance of a different instance type than the target resource instance.

[0126] As an example, users can trigger the generation of an instance type switching request through the in-vehicle display's interactive interface, voice commands, or other means. For instance, after clicking the "Target Instance Type Switch" button on the in-vehicle display's interactive interface, a menu of options appears, such as "Switch to Shared Instance - Featured Public Channel" or "Switch to My Dedicated Instance." After the user selects and confirms, the target in-vehicle terminal generates an instance type switching request based on the user's selection. The target in-vehicle terminal then sends the generated instance type switching request to the resource allocation terminal. The instance type switching request includes the unique identifier of the target resource instance before the switch, the instance type before the switch, the instance type after the switch, and may also include the unique identifier or resource characteristics of the alternative resource instance after the switch.

[0127] This embodiment sends the instance type switching request to the resource allocation end after detecting the instance type switching request, applies the allocated alternative resource instance, and releases the original target resource instance back to the resource pool. This allows the vehicle terminal to adjust the resource instance type in a timely manner according to changes in business needs. By releasing the original target resource instance, timely resource recovery can be achieved, ensuring the resource recycling of the resource pool. This realizes the closed-loop execution of instance type switching between the vehicle terminal and the resource allocation end, improving the resource usage flexibility of the vehicle terminal and the overall scheduling efficiency of the resource pool.

[0128] In an optional implementation, the resource request method further includes: upon receiving an instance type switching notification pushed by the resource allocation terminal, in response to detecting that the switching notification result is acceptance, sending an instance type switching request to the resource allocation terminal, applying the alternative resource instance (the alternative resource instance is of shared type) allocated by the resource allocation terminal based on the instance type switching request, and sending the target resource instance (the target resource instance is of dedicated type) to the resource allocation terminal, so that the resource allocation terminal releases the target resource instance back to the resource pool. In response to detecting that the switching notification result is rejection, sending a rejection switching request to the resource allocation terminal, so that the resource allocation terminal maintains the binding relationship between the target vehicle terminal and the target resource instance.

[0129] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.

[0130] The following is a detailed reference. Figure 6This diagram illustrates a suitable structural schematic for implementing the electronic device described in the embodiments of this application. The electronic device may include a processor (e.g., a central processing unit, graphics processor, etc.) 601, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 602 or a program loaded from memory 608 into random access memory (RAM) 603. The RAM 603 also stores various programs and data required for the operation of the electronic device. The processor 601, ROM 602, and RAM 603 are interconnected via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0131] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; memory devices 608 including, for example, magnetic tapes, hard disks, etc.; and communication devices 609. Communication device 609 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although... Figure 6 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown, and more or fewer devices may be implemented or have instead.

[0132] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 609, or installed from memory 608, or installed from ROM 602. When the computer program is executed by processor 601, it performs the functions defined in the resource allocation method or resource request method of embodiments of this application.

[0133] Figure 6 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0134] This application also provides a vehicle that includes the resource allocation device or electronic device described above, so that the vehicle can implement the resource allocation method or resource request method of the above examples.

[0135] This application also provides a computer-readable storage medium. The methods described in this application can be implemented in hardware or firmware, or implemented as recordable on a storage medium, or implemented as computer code downloaded over a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc. Further, the storage medium may also include combinations of the above types of memory. It is understood that computers, processors, microprocessors, or programmable hardware include storage components capable of storing or receiving software or computer code. When the software or computer code is accessed and executed by the computer, processor, or hardware, the resource allocation method or resource request method shown in the above embodiments is implemented.

[0136] A portion of this application can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to this application through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.

[0137] Although embodiments of this application have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of this application, and all such modifications and variations fall within the scope defined by the appended claims.

Claims

1. A resource allocation method, characterized in that, The method includes: Obtain the target instance type requested by the target vehicle terminal. The target instance type is used to characterize the sharing characteristics and / or resource characteristics of the basic resource instance. The sharing characteristics indicate whether the basic resource instance can be used in different vehicle terminals, and the resource characteristics indicate other characteristics corresponding to the basic resource instance. Select a basic resource instance from the resource pool that matches the target instance type as the target resource instance, and assign the target resource instance to the target vehicle terminal so that the target vehicle terminal can apply the target resource instance; the resource pool contains basic resource instances of at least two instance types.

2. The method according to claim 1, characterized in that, After allocating the target resource instance to the target vehicle terminal, the method further includes: In response to an instance type switching request for the target resource instance, a type switching operation is performed on the target resource instance of the target vehicle terminal; the instance type switching request is triggered by the target vehicle terminal.

3. The method according to claim 2, characterized in that, The step of performing a type switching operation on the target resource instance of the target vehicle terminal includes: In response to the query of snapshot data corresponding to the first alternative resource instance, the first alternative resource instance is allocated to the target vehicle terminal according to the snapshot data; the first alternative resource instance is a basic resource instance with an instance type different from the target resource instance; the snapshot data refers to backup data of the state of the alternative resource instance; In response to the failure to find snapshot data corresponding to the first alternative resource instance, a second alternative resource instance is selected from the resource pool and allocated to the target vehicle terminal; the second alternative resource instance is a basic resource instance in the resource pool with an instance type different from the target resource instance.

4. The method according to claim 3, characterized in that, Before performing a type switching operation on the target resource instance of the target vehicle terminal, the method further includes: Create snapshot data corresponding to the target resource instance; the snapshot data is used to reallocate the target resource instance to the target vehicle terminal when performing a type switching operation on the first alternative resource instance or the second alternative resource instance of the target vehicle terminal; Release the target resource instance back into the resource pool.

5. The method according to any one of claims 1-4, characterized in that, The target instance type includes a shared type or a dedicated type. The shared type represents the type of basic resource instance that can be used jointly by different vehicle terminals, while the dedicated type represents the type of basic resource instance that the target vehicle terminal exclusively uses.

6. The method according to claim 1, characterized in that, The target instance type requested by the target vehicle terminal includes: In response to the power-on startup of the target vehicle terminal, within a preset time range after the target vehicle terminal is powered on, it is detected whether a first allocation request sent by the target vehicle terminal is received; In response to receiving a first allocation request from the target vehicle terminal, the instance type indicated by the first allocation request is taken as the target instance type requested by the target vehicle terminal; the first allocation request is a request generated by the target vehicle terminal based on the instance type selected by the user; or... In response to the absence of a first allocation request from the target vehicle terminal, the instance type indicated by the second allocation request is taken as the target instance type requested by the target vehicle terminal; wherein, when the user has set an instance type corresponding to the power-on startup of the target vehicle terminal, the second allocation request is a request generated by the target vehicle terminal based on the instance type corresponding to the power-on startup of the target vehicle terminal set by the user; when the user has not set a target instance type corresponding to the power-on startup of the target vehicle terminal, the second allocation request is a request generated based on a shared type.

7. The method according to claim 1, characterized in that, The method further includes: In response to the detection that the load of the resource pool meets the high load condition and that the target resource instance used by the target vehicle terminal is of the exclusive type, an instance type switching notification is pushed to the target vehicle terminal; the instance type switching notification is used to prompt the target instance type to be switched to the shared type.

8. The method according to claim 1, characterized in that, The method further includes: Obtain the historical switching data of the target vehicle terminal; The handover prediction result corresponding to the target vehicle terminal is determined based on the historical handover data; When the switching prediction result indicates a switching, during the first time period before the predicted switching time indicated by the switching prediction result, a pre-allocated resource instance is determined through a resource instance preparation operation. The pre-allocated resource instance is a basic resource instance corresponding to the instance type after the switching is selected from the resource pool.

9. The method according to claim 8, characterized in that, The method further includes: If no instance type switching request is received from the target vehicle terminal after the second time period following the predicted switching time, the pre-allocated resource instance will be released back to the resource pool.

10. A resource request method, characterized in that, The method includes: The target instance type requested by the target vehicle terminal is sent to the resource allocation end; the target instance type is used to characterize the sharing characteristics and / or resource characteristics of the basic resource instance; the sharing characteristics indicate whether the basic resource instance can be used together in different vehicle terminals, and the resource characteristics indicate other characteristics corresponding to the basic resource instance; The application allocates a target resource instance based on the target instance type; the target resource instance is a basic resource instance selected by the resource allocation terminal from the resource pool that matches the target instance type; the resource pool contains basic resource instances of at least two instance types.

11. The method according to claim 10, characterized in that, After receiving the target resource instance allocated by the resource allocation terminal based on the target instance type, the process further includes: In response to detecting an instance type switching request for the target resource instance, the instance type switching request is sent to the resource allocation terminal; The application allocates an alternative resource instance based on the instance type switching request and sends the target resource instance to the resource allocation terminal so that the resource allocation terminal releases the target resource instance back to the resource pool; the alternative resource instance is a basic resource instance with an instance type different from the target resource instance.

12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to perform the resource allocation method of any one of claims 1 to 9, or the resource request method of any one of claims 10 to 11.