Virtual and real task planning alignment method based on cooperation of large and small models
By constructing a large language model and congestion impact subgraph, combined with the grounding action conversion mechanism, the deviation problem of task allocation from the simulator to the real environment is solved, and more accurate space-time trajectory estimation and task allocation are achieved, which improves the reliability and efficiency of the crowdsourcing system.
Patent Information
- Application Number
- CN202510562238.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2025-08-15
AI Technical Summary
When the prior art transfers the simulator-trained RL model to a real environment, there is a significant travel time deviation, which cannot effectively capture dynamic information and personalized preferences of real road conditions, resulting in inaccurate task allocation.
A virtual and real task planning alignment method based on large language models is constructed, combined with congestion impact subgraphs and grounding action conversion mechanisms, and through iterative learning of human preferences, the task planning strategy of the simulation environment is adjusted to improve the accuracy of space-time trajectory estimation.
It improves the intelligence and adaptability of task allocation, improves the overall reliability and execution efficiency of crowdsourcing systems, and solves the task allocation problem in complex crowdsourcing environments.
Smart Images

Figure CN120494359A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of task allocation and artificial intelligence technology, and specifically to a virtual-real task planning alignment method for collaborative large and small models, which improves the accuracy of spatiotemporal trajectory estimation, thereby effectively solving the task allocation problem in complex crowdsourcing environments. Background Art
[0002] Reinforcement learning methods have recently achieved remarkable success in solving the challenge of task allocation, a key issue in sustaining the operation of spatial crowdsourcing platforms, through trial and error in simulators. However, due to the differences in system dynamics between training simulators and actual road conditions, significant performance gaps can occur when transferring RL models trained in simulators to real-world environments. The discrepancy in travel time is a key factor contributing to the gap between simulation and reality, as travel time calculations in simulations typically rely on simplified distance-time relationships or fixed traffic parameters, failing to capture the dynamics of real-world road conditions.
[0003] Existing travel time estimation research can be divided into two categories: data-driven and learning-based methods. Data-driven methods typically divide routes into discrete segments and use rule-based statistical or spatiotemporal pattern analysis techniques to predict the travel time of each segment. The above methods ignore the dynamics and uncertainties of traffic systems, such as intersections and traffic light delays, which reduces the accuracy of segment information and leads to cumulative bias. In addition, when considering routes as simple sequences of segments, studies often ignore the impact of personalized preferences on travel time. For example, workers may prioritize time-efficient routes during peak hours and distance-efficient routes during off-peak hours. In contrast, learning-based methods can directly predict the travel time of the entire route by leveraging deep learning models to implicitly capture the interactive relationships between intersections and segments. However, accurate predictions by this method usually require a large amount of real data covering the distribution of cities. Therefore, narrowing the gap between simulation and reality by adjusting travel time still faces the following challenges: (1) Real-world data with system dynamics are scarce, making it challenging to accurately estimate travel time in a real-world environment with limited data; (2) Since workers have different preferences for travel routes in different scenarios, which significantly affects the estimation of travel time, how to effectively capture preferences is another challenge. Summary of the Invention
[0004] The purpose of the present invention is to address the above-mentioned problems and provide a virtual-reality task planning alignment method that collaborates with large and small models. By combining the reasoning ability of a large language model and a simulation-reality mapping optimization strategy, the accuracy of spatiotemporal trajectory estimation is improved. The planning execution strategy is dynamically adjusted through a grounded action conversion mechanism to achieve intelligent and adaptive scheduling of crowdsourcing tasks, thereby improving the overall reliability and execution efficiency of the crowdsourcing system.
[0005] In order to achieve the above object, the technical solution of the present invention is:
[0006] A virtual-real task planning alignment method for large and small model collaboration, the method comprises the following steps:
[0007] S1. Build a spatiotemporal trajectory prediction model for virtual and real tasks based on a large language model. Utilize its contextual reasoning capability to infer more accurate spatiotemporal trajectory estimation results based on the congestion impact subgraph (CIS).
[0008] S2. A virtual-real task planning alignment mechanism based on grounded action conversion is established to learn preferences from human feedback, enabling the large-scale language LLM model to iteratively learn human preferences through interaction, and use this knowledge to fine-tune the generation and enhancement of alignment between employee travel time and real-world settings, by adjusting the task planning strategy in the simulation environment to make it more consistent with the traffic evolution laws in the real world.
[0009] As an improvement to the above technical solution, in step S1, the spatiotemporal trajectory prediction model for virtual and real tasks is established based on the Markov decision process (MDP). The crowdsourcing platform is regarded as an intelligent agent, and the real-time state is observed. The worker-task matching decision is made in a trial-and-error manner. The state of the intelligent agent is designed as a combined feature vector, which includes all worker information (worker location) and unassigned task information (request location, deadline). The state space S, action space A, and reward function R of the Markov decision process (MDP) are defined as follows:
[0010] State space S: At any time slice t, state s t ∈S is represented as a six-tuple s t = <D Γ ,L Γ ,L W ,l Γ ,l W ,t>, where D Γ is the deadline distribution of unassigned tasks Γ, L Γ is the location distribution of unassigned tasks Γ, L W represents the location distribution of idle workers W, l Γ represents the location of the task τ∈Γ, l W is the position of worker w∈W;
[0011] Action space A: During the time interval Δt, the crowdsourcing platform accumulates a batch of unassigned tasks Γ and a set of idle workers W; for each task τ∈Γ, observe the current state s t , select an action a according to the learned strategy π t ;
[0012] Reward function R: The agent is in state s t Execute action a t Afterwards, you will get reward r t , to reflect the difference between the task benefit and the travel cost of the assigned workers.
[0013] As an improvement to the above technical solution, action a t is defined as {0, 1}, where 1 indicates that worker w is assigned to τ and 0 indicates that it is not assigned; the reward is set to r = R(w, τ) = ρ τ -κ·T wτ .
[0014] As an improvement to the above technical solution, in step S1, the congestion impact subgraph is identified by using the Monte Carlo graph search-based identification (MCGS-CI) algorithm to obtain the simulation environment E sim Model, the specific steps are:
[0015] S101. Initial graph G based on the global transportation network =<V,E,U> Start initialization, where V represents the set of traffic intersections, E represents the road connection relationship, and U is the road attribute weight;
[0016] Taking the position of workers w As the starting node, the location of the task l τ Initialize as the target node; edge e ij The weight uij∈U of ∈E in the initial graph G is initialized as
[0017] Among them, l ij For road e ij Length, v ij is the historical average speed, q ij is the traffic flow, q max is the maximum road carrying capacity, η∈[0,1] adjusts the congestion impact and is a hyperparameter that balances travel time and congestion level;
[0018] S102, node selection, from worker position l W Start; Based on the confidence bound UCB strategy, the search is guided to expand to high-impact paths. The score of each candidate subpath is calculated as:
[0019]
[0020] in, is the average score of child node v, n is the number of visits to the parent node, n v is the number of visits to node v, and α controls the weight factor of exploration-exploitation balance;
[0021] S103, expansion, when encountering an unexpanded node, incorporate the adjacent nodes into the graph G;
[0022] S104, simulation: In the simulation phase, an extension node is added to the graph G from the current node and the feasibility of performing the simulation behavior evaluation;
[0023] S105, backtracking update (feedback): adjust the weight of the search path, strengthen the high-impact path, and finally output the optimal congestion impact subgraph CIS that affects the spatiotemporal trajectory of the docking task, denoted as
[0024] As an improvement to the above technical solution, the expansion refers to first determining whether there is a path that passes through the expansion node and can reach the target node. r The path is used to check whether the extended node is valid. If it exists, the algorithm quantifies the contribution of the congested node, assigns it a weight, and incorporates its corresponding edges and nodes into the graph G;
[0025] If the path P(l w →l τ ) is affected by congestion, then the road weight is updated:
[0026]
[0027] Among them, l ij For road e ij Length, v ij is the historical average speed, q ij is the traffic flow, q max is the maximum road carrying capacity, and η∈[0,1] adjusts the congestion impact.
[0028] As an improvement to the above technical solution, in step S1, the spatiotemporal trajectory estimation result is derived based on the large language model (LLM) inference, and the specific steps are:
[0029] The prompt template of the large language model LLM is defined as
[0030] <question><[Context]> <response>;
[0031] in <question>It is the spatiotemporal trajectory reasoning task of LLM, and <[Context]> is about worker-task pairs, traffic conditions, and domain information. <response>Specifies the format of LLM generation for any worker-task pair Spatiotemporal trajectory estimation after inference
[0032] Among them D t Encoding contextual knowledge;
[0033] As an improvement to the above technical solution, the contextual knowledge includes weather conditions, traffic density and time of day.
[0034] As an improvement to the above technical solution, the step S2, aligning the virtual and real task planning based on the ground action conversion, is to align the simulation environment E established based on the Markov decision process MDP. sim The conversion function P of the model φ (s′|s, a) and the real environment E real The transfer function of the model is P * (s′|s, a) alignment to adjust the simulation environment E sim Model; adjust the target optimization simulation environment transfer function to:
[0035]
[0036] Among them, P * Represents the transition probability distribution function of the real environment, P φ represents the transfer probability distribution function of the simulation environment, and d(·) is used to quantify the difference between the two; the real environment E real The transfer function is P * (s′|s,α), where P * (s′|s,a) is performed on a real-world trajectory dataset D real ={o1, o2, ..., o I }, where each trajectory In the real environment E real The estimation is performed by executing a series of states and actions collected by the policy π;
[0037] The adjustment rules are:
[0038] in, represents the forward model, x t Represents the relevant embedded features. The loss is optimized by minimizing the mean squared error: in, represents the trajectory sampled from the real environment;
[0039] Finally, through the reverse model Prediction Simulation Environment E sim In the state s t Towards state Transition grounding action
[0040] As an improvement to the above technical solution, the real environment E real It is the actual operating environment of the real world, which includes real physical characteristics and real sensor data, where the dynamic distribution of the real environment P real It is defined by the interaction between the agent and the environment.
[0041] As an improvement to the above technical solution, in the process of empty trajectory inference, based on the human preference learning mechanism HPLM, a preference vector p is introduced to enable the large language model LLM to estimate travel time according to human preferences and dynamically adjust priorities such as time and distance; preference vector p = (p1, p2, ..., p n ), where p∈[0, 1] represents the importance of a specific factor derived from human feedback;
[0042] The model input is: <cis> <locations> <traffic> <weather> <day> <time> ;
[0043] Leverage the Large Language Model (LLM) combined with user preference data to optimize spatiotemporal trajectory estimation:
[0044]
[0045] Given a preference dataset where x i Indicates the input prompt for LLM. Indicates non-preferred output, Represents the preference output, the optimal LLM strategy π * The following preference probabilities are met:
[0046] Where δ is the logic function, π * is the optimized model, π1 is the basic LLM strategy, and ω controls the preference adjustment amplitude.
[0047] As an improvement to the above technical solution, the preference probability p * The negative log-likelihood loss function is:
[0048]
[0049] in is a reward model that scores the output of the LLM to align it with human preferences.
[0050] Compared with the prior art, the present invention includes but is not limited to the following advantages and positive effects:
[0051] To address the dynamics and uncertainties in crowdsourcing task allocation, this paper constructs a virtual-real task planning alignment framework, which comprises three core modules: an RL (reinforcement learning) model decision module, a virtual-real task alignment module based on a large language model, and a human feedback module. The RL model decision module dynamically allocates tasks to workers based on the real-time observation status of the crowdsourcing platform. The virtual-real task alignment module based on the large language model consists of two parts: improving the accuracy of spatiotemporal trajectory estimation by constructing a traffic congestion impact subgraph and proposing a grounded action conversion mechanism to adjust task planning strategies in the simulation environment. Finally, the human feedback module enables the large language model to learn human preferences through interactive iteration.
[0052] This invention breaks through the limitations of traditional crowdsourcing scheduling systems in terms of dynamic adaptation and human-machine collaboration. It combines the reasoning ability of large language models and simulation-reality mapping optimization strategies, it iteratively learns user preferences, combines congestion impact subgraphs and external environment data, improves the accuracy and adaptability of spatiotemporal trajectory reasoning, and provides efficient prediction support and technical solutions for the intelligent allocation of tasks in complex crowdsourcing scenarios such as shared travel, emergency material allocation, and express delivery. It improves the accuracy of spatiotemporal trajectory estimation, effectively solves the problem of task allocation in complex crowdsourcing environments, and improves the overall reliability and execution efficiency of crowdsourcing systems. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0054] Figure 1 The overall architecture of virtual-real task planning and alignment for large and small models proposed by the present invention;
[0055] Figure 2 This is a schematic diagram of the congestion subgraph construction structure based on Monte Carlo graph search proposed in the present invention;
[0056] Figure 3 This is a schematic diagram of the structure of the grounding action conversion mechanism based on a large model proposed in the present invention; DETAILED DESCRIPTION
[0057] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts, any modifications, equivalent replacements, improvements, etc., shall be included in the scope of protection of the present invention.
[0058] To facilitate understanding of the present invention by persons skilled in the art, the following definitions are first given of the technical terms involved in the present invention:
[0059] 1. Road network: The road network is defined as a weighted graph G =<V,E,U> , where v i ∈V represents a crossroads, e ij ∈E represents the connection intersection v i and v j The road, u ij ∈U is e ij The weight of the road is determined by factors such as road length and road type.
[0060] 2. Spatial task: A spatial task can be represented as a four-tuple τ = <l τ , t τ , d τ , ρ τ >, where l τ ∈V represents the location of the task, t τ represents the release time, d τ represents the task deadline, ρ τ is the reward for task services. Once a task is published, the platform will assign workers to move to the task location and complete the task.
[0061] 3. Worker: A worker can be represented as a triple w= <l w , c w , s w >, l w ∈V is the position of the worker, c w Indicates the worker's status, i.e., idle or busy, s w Indicates the worker's service scope.
[0062] 4.RTA issues:
[0063] Given a set of workers W and a set of spatial tasks Γ, the problem aims to find an allocation plan using RL model-based methods The total revenue of the platform is E M maximize:
[0064]
[0065] Where (w, τ) is a valid worker-task pair that satisfies the spatiotemporal constraints, R(w, τ) = ρ τ -κ·T wτ is the profit function, T wτ w is the travel time to complete the task, and k is the travel cost per unit time.
[0066] Figure 1 The overall architecture of the present invention is shown, which includes the following steps:
[0067] Step S1: Task allocation RL model decision: It enables the model to dynamically allocate tasks to workers based on real-time observation status, with the goal of maximizing the total revenue of the platform.
[0068] Step S2: LLMs-based simulation-to-real transfer module: It leverages the large language model to fit the simulation-to-real gap by adjusting the simulation dynamics to be consistent with the real-world dynamics, ensuring a more reliable strategy.
[0069] Step S3: Learning preferences from human feedback: This enables the large language model to learn human preferences through interactive iterations and use this knowledge to fine-tune its generated content, improving the fit between workers’ travel times and real-world settings.
[0070] In step S1, the RTA problem is modeled by a Markov decision process (MDP):
[0071] Agent: The crowdsourcing platform is viewed as an agent that learns optimization strategies by interacting with the environment. It observes the real-time status and makes decisions on worker-task matching in a trial-and-error manner.
[0072] State: At any time slice t, state s t ∈S can be represented as a six-tuple s t = <D Γ , L Γ , L W , l Γ , l W , t>, where D Γ is the deadline distribution of unassigned tasks Γ, L Γ is the location distribution of unassigned tasks Γ, L W represents the location distribution of idle workers W, l Γ represents the location of the task τ∈Γ, l W is the position of worker w∈W.
[0073] Action: The action space is: During the time interval Δt, the crowdsourcing platform accumulates a batch of unassigned tasks Γ and a set of idle workers W. For each task τ∈Γ, the agent observes the current state s t , select an action a according to the learned strategy π t Action a t is defined as {0, 1}, where 1 indicates that worker w is assigned to τ and 0 indicates that it is not assigned.
[0074] Reward: The agent is in state s t Execute action a t Afterwards, you will get reward r t , which is designed to reflect the difference between the task benefit and the travel expenses of the assigned worker. The reward is set to r = R(w,τ) = ρ τ -κ·T wτ
[0075] Through the above Markov decision modeling, the constructed network is as follows Figure 1 As shown in the RL model decision in , the present invention adopts the deep Q network (DQN) to optimize the RL strategy of the RTA problem.
[0076] Through the above design, the present invention can effectively handle the task allocation problem in the crowdsourcing platform and realize intelligent and precise decision-making of task allocation.
[0077] Step S2 first establishes a congestion influence subgraph (CIS), which represents the minimum traffic subgraph that affects the travel time from the worker location to the task location. To address this problem, this paper proposes a Monte Carlo graph search-based congestion influence subgraph identification (MCGS-CI) algorithm for CIS identification.
[0078] MCGS-CI algorithm starts from the initial graph G=<V,E,U> Let V be the set of traffic intersections, E be the road segment with weight U, and U be the road attribute weight (such as historical average speed, flow, congestion index). Figure 2 As shown, the MCGS-CI algorithm starts from the starting point l w To the end τ The core steps of building a CIS are as follows:
[0079] Initialize the initialization graph G with worker position l W is the starting point, the task location is l Γ is the target node. ij The weight u of ∈E ij ∈U is initialized as:
[0080]
[0081] where l ij For section e ij The length of v ij For section e ij The historical average driving speed, q ij Indicates road segment e ij The historical average traffic volume, q max Indicates road segment e ij The maximum capacity of η∈[0,1] is a hyperparameter that balances travel time and congestion level.
[0082] Node selection: From worker position l W Initially, the algorithm guides the search to expand to high-impact paths based on the upper confidence bound UCB strategy. The score of the candidate subpath v is calculated as:
[0083]
[0084] in is the average score of child node v, n represents the number of visits to v's parent node, n v represents the number of visits to child node v, and α is the weight factor for balancing exploration-exploitation.
[0085] Extension: When the algorithm encounters an unexpanded node, it merges the adjacent nodes into the graph G, e.g. Figure 2 The nodes v9 and v are shown 10 .
[0086] Simulation: In the simulation phase, the algorithm adds an extension node to the graph G from the current node and performs simulation behavior evaluation. It first determines whether there is a path through the extension node that can reach the target node l. Γ The path to check whether the extended node is valid. If it exists, the algorithm quantifies the contribution of the congested node and assigns a weight to it, and incorporates its corresponding edges and nodes into the graph G. w →l τ ) is affected by congestion, then the road weight is updated:
[0087]
[0088] Among them, l ij For road e ij Length, v ij is the historical average speed, q ij is the traffic flow, q max is the maximum road carrying capacity, and η∈[0,1] adjusts the congestion impact.
[0089] Backtracking update: adjust the weight of the search path, strengthen the high-impact path, and finally output the optimal CIS that affects the spatiotemporal trajectory of the docking task, denoted as
[0090] Afterwards, this paper proposes a method based on a large language model to estimate the travel time from the worker location to the task location under realistic road conditions, which uses CIS and structured context information to achieve accurate travel time estimation. The prompt template of the large language model is defined as
[0091] <question><[Context]> <response>
[0092] in <question>It is the spatiotemporal trajectory reasoning task of LLM, such as estimating the travel time from the worker location to the task location. <[Context]> is about the worker-task pair, traffic conditions and domain information. <response>Specify the generation format of LLM, i.e. the spatiotemporal trajectory estimation after inference For any worker-task pair LLM performs contextual learning through structured input and uses existing data to infer real-time and spatial trajectories:
[0093]
[0094] Among them D t Encode contextual knowledge, such as weather conditions and traffic density.
[0095] Next, the present invention proposes a virtual-real task planning alignment method based on ground action transformation (GAT), such as Figure 3 As shown, it will simulate the environment E sim Modeled as a Markov decision process (MDP), its state transfer function is defined as P φ (s'|s,a), and the real environment E real The transfer function is P * (s'|s,a), where P * (s'|s,a) through the real execution trajectory D real ={(s t ,a t ,s t+1 )} and optimize the simulation environment transfer function based on the following objectives:
[0096]
[0097] Transformation of model g by grounding action φ Adjust the simulation decision to match the state transition of the real environment. The update rule is as follows:
[0098]
[0099] Step S103: Learning preferences from human feedback: This enables the large language model to learn human preferences through interactive iterations and use this knowledge to fine-tune its generated content, enhancing the fit between workers' travel time and real-world settings.
[0100] Step S103 is to enable the large language model to estimate travel time according to human preferences, that is, to dynamically adjust the priorities of time and distance, and propose a human preference learning mechanism (HPLM). This mechanism introduces a preference vector p = (p1, p2, ..., p n ), where p∈[0,1] represents the importance of a specific factor derived from human feedback. In spatiotemporal trajectory reasoning, the model input includes:
[0101] <cis> <locations> <traffic> <weather> <day> <time>< / time> < / day> < / weather> < / traffic> < / locations> < / cis> < / response> < / question> < / response> < / question>
[0102] Leverage the Large Language Model (LLM) combined with user preference data to optimize spatiotemporal trajectory estimation:
[0103]
[0104] Given a preference dataset where x i Indicates the input prompt for LLM. Indicates non-preferred output, Represents the preference output, the optimal LLM strategy π * The following preference probabilities are met:
[0105]
[0106] Where δ is the logic function, π * is the optimized model, π1 is the basic LLM strategy, and ω controls the preference adjustment amplitude.
[0107] In order to fine-tune the LLM preference policy π p , this invention defines a probability based on preference p * The negative log-likelihood loss function is:
[0108]
[0109] in is a reward model that scores the output of the LLM to align it with human preferences. This loss function guides the LLM to assign higher probabilities to preferred responses while minimizing the probability of unpopular responses. The policy π is iteratively updated by the HPLM p ,LLM can adapt to subtle preference changes affected by environmental factors, thus producing more accurate and context-aware travel time estimates.
[0110] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention. < / time> < / day> < / weather> < / traffic> < / locations> < / cis> < / response> < / question> < / response> < / question>
Claims
1. A virtual-real task planning and alignment method for large and small model collaboration, characterized by: The steps include: S1. Build a spatiotemporal trajectory prediction model for virtual and real tasks based on a large language model. Utilize its contextual reasoning capability to infer more accurate spatiotemporal trajectory estimation results based on the congestion impact subgraph (CIS). S2. Build a virtual-real task planning alignment mechanism based on grounded action conversion, learn preferences from human feedback, enable large-scale language LLM models to iteratively learn human preferences through interaction, and use this knowledge to fine-tune the generation and enhancement of alignment between employee travel time and real-world settings, by adjusting the task planning strategy in the simulation environment to make it more consistent with the traffic evolution laws in the real world.
2. The method for aligning virtual and real task planning using large and small models as claimed in claim 1, characterized in that: In step S1, a spatiotemporal trajectory prediction model for virtual and real tasks is established based on a Markov decision process (MDP). The crowdsourcing platform is considered as an intelligent agent, and its real-time status is observed. A decision on worker-task matching is made in a trial-and-error manner. The state of the intelligent agent is designed as a combined feature vector, which includes all worker information and unassigned task information. The state space S, action space A, and reward function R of the Markov decision process MDP are defined as: State space S: At any time slice t, state s t ∈S is represented as a six-tuple s t = <D Γ , L Γ , L W , l Γ , l W , t>, where D Γ is the deadline distribution of unassigned tasks Γ, L Γ is the location distribution of unassigned tasks Γ, L W represents the location distribution of idle workers W, l Γ represents the location of the task τ∈Γ, l W is the position of worker w∈W; Action space A: During the time interval Δt, the crowdsourcing platform accumulates a batch of unassigned tasks Γ and a set of idle workers W; for each task τ∈Γ, observe the current state s t , select an action a according to the learned strategy π t ; Reward function R: The agent is in state s t Execute action a t Afterwards, you will get reward r t , to reflect the difference between the task benefit and the travel cost of the assigned worker; action a t is defined as {0,1}, where 1 indicates assigning worker w to τ and 0 indicates not assigning it; the reward is set to r = R(w,τ) = ρ τ -κ·T wτ .
3. The method for aligning virtual and real task planning using large and small models as claimed in claim 2, characterized in that: In step S1, the congestion impact subgraph is identified by using a Monte Carlo graph search algorithm to obtain a simulation environment E sim Model, the specific steps are: S101. Initial graph G based on the global transportation network =<V,E,U> Start initialization, where V represents the set of traffic intersections, E represents the road connection relationship, and U is the road attribute weight; Taking the position of workers w As the starting node, the location of the task l τ Initialize as the target node; edge e ij The weight uij∈U of ∈E in the initial graph G is initialized as Among them, l ij For road e ij Length, v ij is the historical average speed, q ij is the traffic flow, q max is the maximum road carrying capacity, η∈[0,1] adjusts the congestion impact and is a hyperparameter that balances travel time and congestion level; S102, node selection, from worker position l W Start; Based on the confidence bound UCB strategy, the search is guided to expand to high-impact paths. The score of each candidate subpath is calculated as: in, is the average score of child node v, n is the number of visits to the parent node, n v is the number of visits to node v, and α controls the weight factor of exploration-exploitation balance; S103, expansion, when encountering an unexpanded node, incorporate the adjacent nodes into the graph G; S104, simulation: In the simulation phase, an extension node is added to the graph G from the current node and the feasibility of performing the simulation behavior evaluation; S105, backtracking update (feedback): adjust the weight of the search path, strengthen the high-impact path, and finally output the optimal congestion impact subgraph CIS that affects the spatiotemporal trajectory of the docking task, denoted as 4. The method for aligning virtual and real task planning using large and small models as claimed in claim 3 is characterized by: The expansion is to first determine whether there is a path that passes through the expansion node and can reach the target node l Γ The path is used to check whether the extended node is valid. If it exists, the algorithm quantifies the contribution of the congested node, assigns it a weight, and incorporates its corresponding edges and nodes into the graph G; If the path P(l w →l τ ) is affected by congestion, then the road weight is updated: Among them, l ij For road e ij Length, v ij is the historical average speed, q ij is the traffic flow, q max is the maximum road carrying capacity, and η∈[0,1] adjusts the congestion impact.
5. The method for aligning virtual and real task planning using large and small models as claimed in claim 4, characterized in that: In step S1, the spatiotemporal trajectory estimation result is inferred based on the large language model (LLM). The prompt template of the large language model (LLM) is defined as: <question><[Context]> <response> ;< / response> < / question> in <question>It is the spatiotemporal trajectory reasoning task of LLM, and <[Context]> is about worker-task pairs, traffic conditions, and domain information. <response>Specifies the format of LLM generation for any worker-task pair Spatiotemporal trajectory estimation after inference < / response> < / question> Among them D t Encoding contextual knowledge.
6. The method for aligning virtual and real task planning for large and small models as claimed in claim 1, characterized in that: The step S2, aligning the virtual and real task planning based on the ground action conversion, is to align the simulation environment E established based on the Markov decision process MDP. sim The conversion function P of the model φ (s′|s, a) and the real environment E real The transfer function of the model is P * (s′|s, a) alignment to adjust the simulation environment E sim Model; adjust the target optimization simulation environment transfer function to: Among them, P * Represents the transition probability distribution function of the real environment, P φ represents the transfer probability distribution function of the simulation environment, and d(·) is used to quantify the difference between the two; the real environment E real The transfer function is P * (s′|s,α), where P * (s′|s,a) is performed on a real-world trajectory dataset D real ={o1, o2, ..., o I }, where each trajectory In the real environment E real The estimation is performed by executing a series of states and actions collected by the policy π; The adjustment rules are: in, represents the forward model, x t Represents relevant embedded features; Optimize the loss by minimizing the mean squared error: in, represents the trajectory sampled from the real environment; Finally, through the reverse model Prediction Simulation Environment E sim In the state s t Towards state Transition grounding action 7. The method for aligning virtual and real task planning for large and small models as claimed in claim 6, characterized in that: Real environment E real It is the actual operating environment of the real world, which includes real physical characteristics and real sensor data, where the dynamic distribution of the real environment P real It is defined by the interaction between the agent and the environment.
8. The method for aligning virtual and real task planning for large and small models as claimed in claim 6, characterized in that: In the process of empty trajectory reasoning, based on the human preference learning mechanism HPLM, the preference vector p is introduced to enable the large language model LLM to estimate travel time according to human preferences and dynamically adjust the priorities such as time and distance; the preference vector p = (p1, p2, ..., p n ), where p∈[0,1] represents the importance of a specific factor derived from human feedback; The model input is: <cis> <locations> <traffic> <weather> <day> <time> ; < / time> < / day> < / weather> < / traffic> < / locations> < / cis> Leverage the Large Language Model (LLM) combined with user preference data to optimize spatiotemporal trajectory estimation: Given a preference dataset where x i Indicates the input prompt for LLM. Indicates non-preferred output, Represents the preference output, the optimal LLM strategy π * The following preference probabilities are met: Where δ is the logic function, π * is the optimized model, π1 is the basic LLM strategy, and ω controls the preference adjustment amplitude.
9. The method for aligning virtual and real task planning using large and small models as claimed in claim 8, characterized in that: Preference probability p * The negative log-likelihood loss function is: in is a reward model that scores the output of the LLM to align it with human preferences.