A Smart Property Service Resource Scheduling Method Based on Reinforcement Learning
By combining the improved RWKV model with the frost-ice optimization algorithm, the problem of inconsistent handling of prerequisite states in the resource scheduling of smart property services was solved, achieving accurate state inheritance and reducing resource conflicts, thereby improving scheduling adaptability and execution efficiency.
Patent Information
- Application Number
- CN202611331626.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-31
- Publication Date
- 2026-11-17
AI Technical Summary
Existing smart property service resource scheduling methods are unable to uniformly handle the effective intervals of different preconditions and their combined action time, leading to task out-of-bounds, resource conflicts and execution interruptions, and lacking a closed loop for correcting scheduling strategies based on actual execution results.
By combining the improved RWKV model with the frost-ice optimization algorithm, the service access spatiotemporal segments are divided by the service execution prerequisite state, candidate scheduling actions are generated, and the action output parameters are updated according to the actual execution reward, so as to realize the dynamic scheduling of property service tasks and resources.
It improves the accuracy of state inheritance, reduces resource conflicts, enhances scheduling adaptability and execution efficiency, and improves the utilization rate of property service resources.
Smart Images

Figure CN123117660A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent property service resource scheduling technology, and in particular to an intelligent property service resource scheduling method based on reinforcement learning. Background Technology
[0002] Existing smart property service resource scheduling typically arranges personnel, equipment, and service order based on task priority, execution time period, service location, and resource availability, using manual rules, heuristic algorithms, or general prediction models. While such methods can accomplish basic task allocation, they often rely on independent judgments regarding execution prerequisites such as access control permits, work qualifications, area accessibility, and equipment availability, making it difficult to uniformly handle the effective intervals of different prerequisite states and their combined duration.
[0003] During continuous scheduling, execution prerequisites that remain valid after the previous task has ended may be reused by the next task, while some prerequisites may have become invalid. Existing methods typically retain or clear the entire historical task state, making it difficult to inherit valid information according to the prerequisite state. This can easily lead to the loss of usable states or invalid states continuing to participate in scheduling.
[0004] In addition, existing optimization methods mostly evaluate candidate schedules based on the planning results, without verifying the candidate actions and the corresponding model states in sync. They also lack a closed loop for correcting scheduling strategies based on actual execution results, making it difficult to adjust subsequent tasks and resource arrangements in a timely manner after tasks go out of bounds, resource conflicts, or execution interruptions.
[0005] Therefore, how to provide a smart property service resource scheduling method based on reinforcement learning is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0006] One objective of this invention is to propose a smart property service resource scheduling method based on reinforcement learning. This invention employs a combination of an improved RWKV model and a frost-ice optimization algorithm. It divides the service access spatiotemporal segments by service execution prerequisite states and reorganizes the matrix value states and word shift states according to the task state address inheritance relationship to generate candidate scheduling actions. On this basis, it utilizes scheduling rewards to execute hard frost-ice puncture and forward greedy selection, and updates the action output parameters based on the actual execution rewards, thereby realizing the dynamic scheduling of property service tasks and resources. It has the advantages of accurate state inheritance, fewer resource conflicts, strong scheduling adaptability, and high execution efficiency.
[0007] A smart property service resource scheduling method based on reinforcement learning according to an embodiment of the present invention includes the following steps: S1. Collect property information, link property service tasks with execution constraints, and form property operation objects; S2. Merge execution constraints are the prerequisite states for service execution, and divide the service access spatiotemporal segments according to the effective interval; S3. Write the task into the service access time-space segment that matches the duration and prerequisite status, and establish the task status address acceptance relationship according to the remaining validity. S4. Improve the RWKV model by mapping the premise states to the WKV matrix row range according to the succession relationship, read the matrix row from the corresponding address, reorganize the task predecessor matrix value state according to the original row order, and synchronously read the corresponding channel word shift state. S5. The time mixing module recursively calculates the result based on the task predecessor matrix value state and the channel word shift state, saves the result to the new task state address, updates the address corresponding to the valid prerequisite state and clears the invalid address, and generates candidate scheduling actions. S6. Calculate the scheduling reward by deducting the time for out-of-bounds and resource conflicts based on the task completion time. The Frost Ice Optimization Algorithm performs hard Frost Ice piercing on the candidate scheduling actions and new state addresses simultaneously. The optimized scheduling actions and corresponding addresses are determined through temporary state recursion and forward greedy selection. S7. Bind property service resources according to optimized scheduling actions, and update the segment operation status according to access and execution events; S8. Execution rewards are generated based on the running status and task results. The difference between the execution rewards and the scheduling rewards is used to update the action output parameters of the improved RWKV model. Addresses of the preconditions that can be accepted are retained. Unfinished tasks are rearranged and resources are released to form the next round of scheduling status.
[0008] Optionally, S1 specifically includes: S11. Collect property information, unify time benchmarks and spatial location identifiers, merge service objects, records with the same content and overlapping time periods to form basic property information; S12. Group the basic property information according to the service recipient, service location and service content. Group records with continuous execution time into the same property service task and separate records with interrupted time to form property service tasks. S13. Based on the overlapping of service locations and effective time periods, extract the execution constraints corresponding to each property service task from the property basic information, associate the property service tasks with the execution constraints, and form property operation objects.
[0009] Optionally, S2 specifically includes: S21. Collect the execution constraints in the property operation objects according to the property service tasks, unify the start and end times and spatial locations of the execution constraints, and arrange the execution constraints in chronological order; S22. Merge execution constraints that are in the same spatial location, have the same constraint content, and have consecutive effective times, record the start and end times of the merge result, and form the service execution prerequisite state; S23. Divide the continuous intervals according to the start and end times of the effective intervals of the service execution prerequisite states for the same task, retain the intervals that are commonly valid for each state and associate them with spatial locations to form a service access spatiotemporal segment.
[0010] Optionally, S3 specifically includes: S31. Read the task execution duration and service execution prerequisite status, determine the task execution interval within the service access time-space segment, and retain the segment that is covered by the effective interval of each prerequisite status. S32. Write the property service tasks into the reserved fragment and assign task status addresses, and arrange the tasks at the same service location according to the start time. S33. Extract the remaining valid intervals of each prerequisite state in reverse chronological order from the end time of the preceding task, and find the intersection with the current task execution interval. S34. When the intersection covers the current task execution range and the corresponding prerequisite state content and service location are the same, the address of the most recent preceding task state is used as the source address of the current task's corresponding prerequisite state. If no match is found, the addresses remain independent, forming a task state address succession relationship.
[0011] Optionally, the improved RWKV model includes an input embedding layer, multiple RWKV blocks connected in sequence, an output normalization layer, and an output header.
[0012] Optionally, S4 specifically includes: S41. The WKV header of each RWKV block is divided into continuous row ranges with the key vector dimension as the row and the value vector dimension as the column, according to the service execution prerequisite state, and each row range is corresponding to the same index term shift channel. S42. Change the path of reading the matrix value status of the time mixing module as a whole to reading by row range, and determine the source task status address of each row range according to the task status address concatenation relationship. S43. Read the corresponding matrix row of the same WKV header from the source task status address, keep the column index unchanged, and write it to the corresponding position of the current task according to the original row index; S44. When the source address is not formed, the source address is invalid, or the matrix row is missing, the same index row of the model initialization matrix value state is used to fill in the missing matrix row, which together with the read matrix row forms the task predecessor matrix value state. S45. Read the corresponding channel of the input vector of the same RWKV block from the source address of each matrix row. If missing, fill in the missing channel with the same index as the input of the model initialization and reorganize the channel word shift state according to the original index.
[0013] Optionally, S5 specifically includes: S51. The input embedding layer generates the first RWKV block input. Each RWKV block mixes and projects the current block input with the channel word shift state to form the receiving vector, key vector, value vector and gate vector. S52. Read the time decay vector of the WKV header, transpose the key vector and multiply it by the value vector to form a key-value outer product matrix, multiply the time decay vector row by row into the task predecessor matrix value state and superimpose the outer product matrix to form the update matrix value state. S53. Read the time priority vector of the WKV header, multiply it row by row into the key-value outer product matrix, add it to the state of the task predecessor matrix value, and then multiply it by the receiving vector to form the WKV header read result. S54. Save the updated matrix value state and the corresponding RWKV block current input to the new task state address, and use the current block input as the channel word shift state. S55. If the prerequisite state is still valid when the task ends, update the corresponding address to the new state address of the task and the original line range and synchronize the corresponding channel. If the prerequisite state is invalid, delete the corresponding address. The S56 and WKV head readout results are normalized, gated modulation, and output projection. The output head generates the action probability of task execution time and resource selection, and extracts candidate scheduling actions according to the action probability.
[0014] Optionally, S6 specifically includes: S61. Write the candidate scheduling action parameters and the corresponding new status address of the task into the individual position vector in the order of the task. S62. The scheduling reward is formed by deducting the segment out-of-bounds time and resource conflict time from the task completion time. The scheduling reward is used as the individual fitness and normalized according to the population extreme value. When the extreme values are the same, one is taken. S63. When the random number between zero and one is lower than the normalized fitness, perform hard frost puncture and simultaneously replace the action parameters and new state address of the same task in the best individual. S64. Copy the current state of the improved RWKV model to form a temporary state copy. Recursively follow the order of the replaced tasks and the new state address. If the address is not hit, the matrix row is missing, or the premise state is invalid, restore the content before replacement. S65. Recalculate the scheduling reward. If the reward increases, retain the replacement; otherwise, restore. This completes the forward greedy selection. After the iteration ends, read the action with the largest reward and its corresponding address to form the optimized scheduling action and its corresponding new state address.
[0015] Optionally, S7 specifically includes: S71. Read the task execution interval and resource selection from the optimized scheduling action, allocate property service resources to the corresponding tasks, and record the occupied interval in the corresponding segment of the task service location; S72. Match the access event according to the service location and event time, and write the access time into the corresponding fragment; S73. Receive the execution start and end events, take the later of the admission time and the execution start time as the actual start time, read the execution end time and the task execution result, calculate the out-of-bounds duration and correct it according to the segment boundary to form the actual execution interval; S74. Record the overlapping duration of the same resource in the actual execution intervals of different tasks as the resource conflict duration, and write the actual execution interval, task execution result, out-of-bounds duration and resource conflict duration into the corresponding segment to form the segment running status.
[0016] Optionally, S8 specifically includes: S81. Distinguish between completed and incomplete tasks based on task execution results. Deduct the time spent on out-of-bounds segments and resource conflicts from the actual execution time of completed tasks to form an execution reward. S82. When the end time of the prerequisite state is later than the actual end time of the task, retain the new state address and row range corresponding to the optimized scheduling action to form a prerequisite state address that can be accepted; otherwise, delete the corresponding address. S83. Adjust the resource occupation end time according to the actual end time of the task, delete the occupation record after the adjusted time, and release resources that are not associated with other tasks; S84. Deduct the actual execution time from the unfinished task duration, retain the unoccupied interval that can continuously accommodate the remaining time and whose premise state is valid, and arrange the tasks according to the earliest start time. S85. Read the action probability generated by the optimized scheduling action from the output header, multiply the difference between the execution reward and the scheduling reward by the gradient of the logarithm of the action probability with respect to the output header parameters, and update the output header parameters along the resulting gradient. S86. Associate the arranged unfinished tasks with the available prerequisite state address, reserved fragments, and allocable resources to form the next round of property service resource scheduling state.
[0017] The beneficial effects of this invention are: This invention forms service execution prerequisite states by merging the execution constraints corresponding to property service tasks, and divides service access time and space segments according to the effective interval of each prerequisite state, so that property service tasks can be arranged within the time range that meets the execution duration and prerequisite states, reducing scheduling mismatch caused by prerequisite state failure, service location mismatch or execution time conflict.
[0018] This invention improves the RWKV model by reading the historical matrix rows corresponding to different premise states according to the task state address and reorganizing them in the original row order. At the same time, it synchronously inherits the word shift state, so that the still valid premise states can be continued at the state granularity and the invalid states can be cleared in time. This avoids the information mixing caused by the overall retention or overall discarding of historical task states and improves the accuracy of state inheritance between consecutive tasks.
[0019] This invention further utilizes the frost-ice optimization algorithm to synchronously optimize candidate scheduling actions and their corresponding state addresses, and reduces fragment out-of-bounds and resource conflicts through scheduling rewards, temporary state recursion, and forward greedy selection; it combines actual execution results to form execution rewards and update action output parameters, enabling the scheduling strategy to be continuously adjusted according to task execution, thereby improving the utilization rate of property service resources, task completion efficiency, and dynamic scheduling adaptability. Attached Figure Description
[0020] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is an overall flowchart of a smart property service resource scheduling method based on reinforcement learning proposed in this invention; Figure 2 This is a schematic diagram of the structure of the improved RWKV model of the intelligent property service resource scheduling method based on reinforcement learning proposed in this invention. Figure 3 This is a schematic diagram illustrating the task state address assignment and state reorganization of a smart property service resource scheduling method based on reinforcement learning proposed in this invention. Detailed Implementation
[0021] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0022] refer to Figures 1-3 A smart property service resource scheduling method based on reinforcement learning includes the following steps: S1. Collect property information, link property service tasks with execution constraints, and form property operation objects; S2. Merge execution constraints are the prerequisite states for service execution, and divide the service access spatiotemporal segments according to the effective interval; S3. Write the task into the service access time-space segment that matches the duration and prerequisite status, and establish the task status address acceptance relationship according to the remaining validity. S4. Improve the RWKV model by mapping the premise states to the WKV matrix row range according to the succession relationship, read the matrix row from the corresponding address, reorganize the task predecessor matrix value state according to the original row order, and synchronously read the corresponding channel word shift state. S5. The time mixing module recursively calculates the result based on the task predecessor matrix value state and the channel word shift state, saves the result to the new task state address, updates the address corresponding to the valid prerequisite state and clears the invalid address, and generates candidate scheduling actions. S6. Calculate the scheduling reward by deducting the time for out-of-bounds and resource conflicts based on the task completion time. The Frost Ice Optimization Algorithm performs hard Frost Ice piercing on the candidate scheduling actions and new state addresses simultaneously. The optimized scheduling actions and corresponding addresses are determined through temporary state recursion and forward greedy selection. S7. Bind property service resources according to optimized scheduling actions, and update the segment operation status according to access and execution events; S8. Execution rewards are generated based on the running status and task results. The difference between the execution rewards and the scheduling rewards is used to update the action output parameters of the improved RWKV model. Addresses of the preconditions that can be accepted are retained. Unfinished tasks are rearranged and resources are released to form the next round of scheduling status.
[0023] In this embodiment, S1 specifically includes: Property information is obtained from the service acceptance platform, staff scheduling system, access control system, equipment monitoring terminal and material management system. Service requests and access events are collected using event triggering. Equipment status and resource status are collected according to the update cycle of the corresponding source system. The time of each record is converted to a millisecond timestamp under a unified time zone. The service object identifier uses the unique number of the source system. The service content code uses the property business directory code. The spatial location identifier is composed of the building code, floor code, area code and equipment location code in sequence. Records that cannot complete time conversion or location parsing retain the original content and stop participating in this processing.
[0024] After unifying the time reference and spatial location, the service object identifier, service content code, and spatial location identifier are used as duplicate judgment items; when the three items are consistent and the two occurrence time periods overlap, the earlier start time and the later end time are taken as the effective time period after merging, and the status value with the later update time is retained to form the basic property information.
[0025] Property basic information is grouped by service recipient, service location and service content. Records in the same group are arranged in ascending order of start time. When the start time of the next record is not later than the end time of the previous record plus the larger collection period of the two types of records, the execution time is considered continuous and they are classified into the same property service task. If the start time exceeds this time, the property service task is re-established from the next record.
[0026] Execution constraints are extracted from status records that have the same spatial location as or cover the property service task, or whose effective time period intersects with the task execution interval. The extracted objects are those that can prohibit the task from entering, prevent the task from starting, or interrupt the continuous execution of the task. The task identifier is written into the corresponding execution constraint record and the start and end times and spatial locations of the constraint are saved. If no execution constraint is found, the property service task is retained as a task without external execution constraints, forming a property operation object.
[0027] In this embodiment, S2 specifically includes: The scheduling window starts at the scheduling trigger time and ends at the start time plus the window duration. In one implementation, the window duration can be 8 hours. The execution constraint start time is the event when the same constraint type and the controlled object switch from an invalid state to a valid state. The opposite state event is the event when the same constraint type and the controlled object switch from a valid state to an invalid state.
[0028] The execution constraint end time is preferentially taken as the opposite state event time. When the state record carries a valid end time, the earlier value between the opposite state event time and the valid end time is taken. If neither type of time exists, the most recent valid state acquisition time plus the maximum update cycle of the source system is taken. If no state update is received after the time exceeds this time, the valid interval is terminated, and the execution constraints are then arranged in ascending order of start time.
[0029] Consistency of execution constraints is determined by the identical constraint type, controlled object, allowed state, and prohibited state. Identity of spatial location is determined by the identical unified spatial location identifier. The effective time is considered continuous if the start time of the next record is not later than the end time of the previous record and the sum of the larger collection periods of the two records; otherwise, it is merged again from the next record.
[0030] After merging execution constraints that are spatially identical, have the same content, and are valid for consecutive times, the earliest start time is taken as the start time of the service execution prerequisite state, and the latest end time is taken as the end time of the service execution prerequisite state, while retaining the corresponding spatial location and constraint content; records with discontinuous time are formed into service execution prerequisite states respectively.
[0031] For the service execution prerequisite states associated with the same property service task, all start and end times are used as state change times. The state change times are deduplicated and arranged in ascending order. Two adjacent state change times constitute a candidate continuous interval. When the start time of a candidate continuous interval is no earlier than the start time of each prerequisite state and the end time is no later than the end time of each prerequisite state, all prerequisite states are considered to be valid in that interval.
[0032] After the common effective interval is associated with the spatial location of the property service task, a service access spatiotemporal segment is formed. When there is no state change between adjacent common effective intervals, they are merged. When the property service task is not associated with external execution constraints, the current round of scheduling window is directly associated with the spatial location of the task to form a service access spatiotemporal segment.
[0033] When a property service task is associated with execution constraints but no common valid interval is obtained, a service access spatiotemporal segment is not formed. The property service task and the corresponding service execution prerequisite state are retained, and the calculation is recalculated upon receiving a new execution constraint event.
[0034] In this embodiment, S3 specifically includes: The execution time of property service tasks is first read from the confirmed standard working hours in the service work order; if the work order does not record the standard working hours, the median of the actual execution time of the 30 most recent completed tasks with the same service content and service location is calculated. If the sample is less than 5 items, the working hours recorded in the equipment maintenance manual or property operation specifications are read.
[0035] If standard working hours, historical samples, and work specifications cannot provide the execution duration, the property service task will be marked as pending confirmation of working hours and will not be written into the service access time-space segment; the execution duration will be re-determined after receiving manual confirmation of working hours or new execution records of similar tasks.
[0036] The service admission spatiotemporal segment uses the segment start time as the candidate start time, and adds the candidate start time to the task execution duration to obtain the candidate end time. When the candidate interval overlaps with the task already written to the same service location, the start time is moved to the latest end time of the overlapping task and the end time is recalculated until there is no longer any overlap.
[0037] If the start time of the task execution interval is not earlier than the start time of the prerequisite state for each service execution, and the end time is not later than the end time of the prerequisite state for each service execution, the task execution interval is considered to be jointly covered; if the end time exceeds the end time of the segment, writing to the current segment stops, and the search for the next service admission spatiotemporal segment continues.
[0038] The same service location is identified using a unified spatial location identifier. When the building code, floor code, area code, and equipment location code are all consistent, the location is considered to be the same. When the prerequisite status is recorded to the area level, the task location code is identified by taking the area code as the superior code, which means that the spatial range covers the task location.
[0039] After a task is written to a reserved fragment, a unique task status address is assigned by an address counter. The address counter increments by 1 for each allocation completed. The address mapping table stores the task status address, task identifier, service location, task execution range, and associated prerequisite status. If the write operation fails, the address allocation is revoked and the unwritten task status is retained.
[0040] The task status address inheritance relationship is established based on the execution prerequisite status of each service associated with the current task. The preceding tasks are retrieved from the nearest to the furthest according to their end time. The end time of the preceding task is used as the start time of the remaining valid interval, and the end time of the corresponding prerequisite status is used as the end time of the remaining valid interval. If the end time is not later than the start time, it is determined that there is no remaining valid interval.
[0041] When the remaining valid interval intersects with the current task execution interval, the later of the start times of the two intervals is taken as the start time of the intersection, and the earlier of the end times of the two intervals is taken as the end time of the intersection. If the start time of the intersection is not later than the start time of the current task and the end time of the intersection is not earlier than the end time of the current task, the intersection is considered to completely cover the current task execution interval.
[0042] If the normalized type, controlled object, and state value of the preceding task and the current task's corresponding premise state are all the same, and the service location is the same or the premise state space range covers the current task's location, the state address of the first preceding task that satisfies the judgment is recorded as the source address of the current task's corresponding premise state; if no preceding task that satisfies the judgment is found, the current task's state address remains independent and is recorded with a no-source marker, ultimately forming a task state address succession relationship.
[0043] In this embodiment, the improved RWKV model includes an input embedding layer, multiple RWKV blocks connected in sequence, an output normalization layer, and an output header: The original RWKV model consists of an input embedding layer, cascaded RWKV blocks, an output normalization layer, and an output header. The input sequence passes through a time mixing module and a channel mixing module in sequence. The output of each module is added to the module input residual. The matrix value state and the input of the previous time step are continuously recursively derived with the sequence position.
[0044] The original RWKV model reads the matrix value status and the previous input from the same preceding position at the current sequence position; the property service task needs to take over the regional access, equipment shutdown, personnel qualification and resource availability status from different historical tasks respectively, and the overall reading will simultaneously bring in the invalidated status or cover the still valid status.
[0045] The improved positioning is set in the state reading path and state saving path of the time mixing module; the matrix value state is divided into matrix row segments along the row direction, which are corresponding to the service execution prerequisite state. Different matrix row segments can be read from different task state addresses, and the corresponding channel in the previous input maintains the same source as the matrix row segment.
[0046] The improved RWKV model consists of an input embedding layer, multiple RWKV blocks connected in sequence, an output normalization layer, and an output header.
[0047] Each RWKV block includes a first normalization layer, a time mixing module, a first residual connection, a second normalization layer, a channel mixing module, and a second residual connection.
[0048] The temporal mixing module includes word shifting, receive vector projection, key vector projection, value vector projection, gated vector projection, multi-head WKV operator, matrix value state, head normalization, and output projection.
[0049] The channel mixing module includes word shifting, receive vector projection, key vector projection, and value vector projection.
[0050] The input embedding layer converts property service tasks, service locations, execution intervals, service execution prerequisite states, candidate resources, and source task status addresses into task inputs of a unified dimension; the RWKV block sequentially extracts the time sequence information between tasks and the channel combination information within the same task; the output normalization layer unifies the numerical scale of each channel; and the output header generates the task execution time and the action score for resource selection.
[0051] Each RWKV block first sends the current block input to the first normalization layer. The normalization result enters the time mixing module. The time mixing result is added to the current block input channel by channel through the first residual connection. The added result enters the second normalization layer and the channel mixing module. The channel mixing result is added again channel by channel through the second residual connection. The resulting vector is used as the input of the next RWKV block.
[0052] In one implementation, the task input dimension can be 256-dimensional. The task type, service location, service execution prerequisite state set, candidate resource set, execution interval, and source task state address set are successively converted into 32-dimensional, 32-dimensional, 64-dimensional, 64-dimensional, 32-dimensional, and 32-dimensional vectors, and then concatenated in a fixed order to form a 256-dimensional floating-point vector.
[0053] For each service execution prerequisite state, the prerequisite state type, controlled object category, and state value are accessed in the embedding table respectively. The three embedding results are added channel by channel to form a 64-dimensional state vector. The remaining valid duration of the prerequisite state divided by the sum of the remaining valid durations of all prerequisite states is used as the weight to sum the state vectors channel by channel. When the sum of the remaining valid durations is 0, it is written into a 64-dimensional zero vector.
[0054] For each candidate resource, the resource category, qualification code, and occupancy status are accessed in the embedding table. The embedding results are summed channel by channel to form a 64-dimensional resource vector. The summation of all candidate resource vectors is divided by the number of candidate resources. When the number of candidate resources is 0, a 64-dimensional zero vector is written and a "no available resource" flag is written.
[0055] The execution interval is calculated by dividing the offset of the start time relative to the beginning of the scheduling window and the task execution time by the length of the scheduling window, respectively. The two values are restricted to the range of 0 to 1 and then fed into a linear projection to form a 32-dimensional time vector.
[0056] For each source task status address, the existence of the source is extracted, the matrix row start point is divided by the number of WKV header rows, the matrix row end point is divided by the number of WKV header rows, and the interval between the end time of the source task and the start time of the current task is divided by the scheduling window length. These four values are linearly projected to form a 32-dimensional address vector. Multiple source addresses are averaged per channel, and when there is no source address, a 32-dimensional zero vector is written.
[0057] In one embodiment, the improved RWKV model sets up 8 RWKV blocks with a hidden dimension of 256. Each temporal mixing module sets up 8 WKV headers, and each WKV header receives a 32-dimensional key vector and a 32-dimensional value vector. The batch input format is a three-dimensional floating-point tensor composed of the batch number, the task sequence length, and the hidden dimension.
[0058] The task sequence length can be 128. If there are fewer than 128 tasks, zero vectors are added to the end and invalid task markers are written. When reading invalid task markers, the RWKV block keeps the matrix value state and word shift state unchanged. If there are more than 128 tasks, they are split into consecutive scheduling windows, and adjacent windows are connected by the valid task state address.
[0059] The first and second normalization layers calculate the mean and variance for each of the 256 channels of each task. The mean is subtracted from each channel, then divided by the square root of the sum of the variance and the stability constant. Finally, the result is multiplied by the trainable scaling parameter and a trainable bias is added. In one implementation, the stability constant can be 10⁻⁵, the initial value of the scaling parameter is 1, and the initial value of the bias is 0.
[0060] The time mixing module sets raw mixing parameters of length 256 for the receive, key, value, and gated branches respectively. The initial value of the raw mixing parameters is 0 and is converted into mixing coefficients in the range of 0 to 1 by the Sigmoid function. The current block input is multiplied by the mixing coefficient channel by channel, and the channel word shift state is multiplied by 1 and subtracted from the mixing coefficient channel by channel. The two are added together and then entered into the receive vector projection, key vector projection, value vector projection, and gated vector projection respectively.
[0061] The receiving vector projection, key vector projection, value vector projection, and gated vector projection all receive 256-dimensional inputs and output 256-dimensional vectors. The output vectors are rearranged into eight 32-dimensional heads. The receiving vector controls the reading intensity of the value state of the matrix. The key vector and value vector form the outer product of the written matrix. The gated vector is nonlinearly compressed by SiLU and then modulated to output each head.
[0062] The matrix value state of each WKV header is a 32×32 floating-point matrix, with row indices corresponding to key vector channels and column indices corresponding to value vector channels; the matrix value state of the 8 headers is stored as an 8×32×32 tensor, and each task state address stores the matrix value state of each RWKV block and the 256-dimensional word shift state respectively.
[0063] The service execution prerequisite states are arranged in ascending order of start time. If the start times are the same, they are arranged in ascending order of prerequisite state type encoding. The number of basic rows is obtained by dividing the 32 matrix rows by the number of prerequisite states. The remainders that cannot be divided are increased by 1 row from the first item in the arrangement. Thus, each prerequisite state obtains a continuous and non-overlapping range of matrix rows.
[0064] The associated records of matrix row segments and task status addresses include the RWKV block index, WKV header index, matrix row start point, matrix row end point, and source task status address; the corresponding channel word shift states use the same start and end indices to ensure that matrix rows and input channels with the same premise state are read from the same task status address.
[0065] The channel mixing module performs word shifting on the second-layer normalization result, interpolating the current input and the previous input through trainable coefficients channel by channel; the receiving vector is projected to generate a gated vector, the key vector is projected to generate an intermediate vector, the intermediate vector is processed by squared ReLU nonlinearity and then enters the value vector projection, and the value vector is multiplied channel by channel with the gated vector compressed by Sigmoid.
[0066] The model parameters consist of the weights of the input embedding layer, each RWKV block, and the output header; the linear projection matrix is initialized using a truncated normal distribution with a mean of 0 and a standard deviation of 0.02. Initial values exceeding plus or minus 2 times the standard deviation are resampled, the linear bias is set to 0, and the layer normalization scaling parameter is set to 1.
[0067] During model initialization, the time decay parameter flattens all WKV header row positions into consecutive position numbers based on the header index and the row index within the header. The position number is divided by the total number of rows minus 1 to obtain a normalized position in the range of 0 to 1. The original time decay parameter is taken as -6 plus 5 times the normalized position. The actual time decay value is taken as the opposite of the exponent of the original parameter and then the exponentiation is performed to keep the actual decay value in the range of 0 to 1.
[0068] The time priority parameter corresponds one-to-one with the matrix row of each WKV header. The initial value is 0. During training, it is updated together with the time decay parameter and the projection parameter. During the online running phase, the time decay parameter and the time priority parameter saved after training are directly read.
[0069] The training data comes from property service acceptance records, staff scheduling records, equipment operation records, access control events, resource occupancy records, and task execution results. After the completion time of each data source is unified, the spatial location is coded, and the tasks are associated, the training sequence is formed in ascending order of the task start time. All records generated by the same work order are only included in the same dataset.
[0070] In one implementation, the training set, validation set, and test set can account for 70%, 15%, and 15% of the complete task sequence, respectively. When dividing the sequence, the tasks are first divided according to their occurrence order, and then it is checked whether the same work order crosses sets. If a cross-set occurs, the complete work order is moved to the set with the earlier time to avoid the same task information from participating in training and validation at the same time.
[0071] The task execution time label is obtained by subtracting the start time of the scheduling window from the actual start time, dividing by 5 minutes, and rounding down. The label range is limited to 0 to 95. If the calculation result is less than 0 or greater than 95, the time classification loss of the task is not calculated, and the resource selection label is still generated according to the index of the actual executed resource in the candidate resource table.
[0072] Multi-resource collaboration tasks concatenate actual resource combinations in ascending order of resource identifiers as a single combined resource and assign an independent index to the candidate resource table; if an actual resource or combined resource does not enter the candidate resource table, the resource classification loss for that task is not calculated.
[0073] Candidate resources meet the following criteria: resource qualification code includes task requirement code; there is a reachable path from the current location of the resource to the service location of the task in the property space connection diagram; the expected arrival time is not later than the start time of the candidate task; and there is no occupied record in the candidate execution interval. When there are more than 64 candidate resources, they are first sorted in ascending order by expected arrival time. If the expected arrival times are the same, they are sorted in ascending order by reachable path length. The top 64 candidate resources are retained.
[0074] In one implementation, the scheduling window is set to 8 hours and divided into 96 execution time categories in 5-minute intervals. When there are fewer than 64 candidate resources, a 64-dimensional zero vector is used to supplement the candidate resource sequence to 64 resource positions. The output scores corresponding to the supplemented resource positions and the execution times that exceed the service admission time-space segment are written as -109. Softmax normalization is then performed to form the task execution time probability and resource selection probability.
[0075] The training first involves supervised pre-training, and the output head generates a 96-dimensional execution time score and a 64-dimensional resource selection score. The two score vectors are normalized to probabilities by Softmax, and the negative logarithms of the probabilities corresponding to the actual time index and the actual resource index constitute the time classification loss and the resource classification loss, respectively.
[0076] After supervised pre-training, reinforcement learning training is performed. The model generates candidate scheduling actions and obtains optimized scheduling actions through frost optimization. After the task is executed, the execution reward is calculated. The execution reward is subtracted from the scheduling reward of the same optimized scheduling action to form the reward difference.
[0077] Read the maximum absolute value of the reward difference in the current batch. If the maximum value is greater than 0, divide each reward difference by the maximum value and limit it to the range of -1 to 1. If the maximum value is equal to 0, set the normalized reward difference to 0. The strategy loss is the negative of the normalized reward difference multiplied by the natural logarithm of the joint probability of the optimized scheduling action.
[0078] The total loss is composed of the sum of the time classification loss, the resource classification loss, and the strategy loss. In one implementation, the weights of the three items are fixed at 0.4, 0.4, and 0.2. When a time label or resource label is missing, the corresponding classification loss is set to 0, and its weight is normalized according to the original weight ratio of the remaining effective loss, so that the sum of the effective loss weights remains at 1.
[0079] The AdamW optimizer is used for training. The initial learning rate can be 0.0001, the first moment estimation coefficient can be 0.9, the second moment estimation coefficient can be 0.999, and the weight decay coefficient can be 0.01. Each batch can take 32 task sequences. When the gradient norm exceeds 1, all gradients will be reduced to norm 1 to avoid parameter mutation caused by abnormal rewards in a single batch.
[0080] Supervised pre-training can be performed for 20 rounds, while reinforcement learning training can be performed for up to 80 rounds. In the first 5 rounds, the learning rate is linearly increased from 0 to the initial learning rate, and in the remaining rounds, it is decayed to 0.000001 in a cosine manner. After each round, the total loss, average execution reward, task on-time completion rate, and resource conflict rate are calculated on the validation set.
[0081] Training is considered converged when the total loss decreases by less than 0.001 and the average execution reward increases by less than 0.2% for eight consecutive rounds of validation, and the resource conflict rate does not increase; if the convergence condition is not met after 80 rounds, the model parameters saved in the round with the highest execution reward and the lowest resource conflict rate are read.
[0082] After training, the input embedding table, RWKV block parameters, time decay parameters, time priority parameters, output header parameters, and feature normalization parameters are saved. During runtime, the same feature arrangement, dimension, and masking method as in the training phase are used to output the task execution time and the action probability of resource selection for candidate scheduling action generation.
[0083] In this embodiment, S4 specifically includes: The ordinary RWKV model reads the matrix value state stored at the previous position and the input at the previous time step at each sequence position. All rows and all word shift channels in the same matrix have the same source. Property service tasks have multiple service execution prerequisite states with different validity periods and sources. The overall reading will inherit both the invalid and valid states, or overwrite the still inheritable states when switching sources.
[0084] The improved RWKV model changes the state entry of the time mixing module to a line-by-line reading entry. Each RWKV block stores an independent matrix value state and the input of the previous time step. Before the current task starts recursion, the task predecessor matrix value state and channel word shift state are established for each of the RWKV blocks.
[0085] The number of WKV headers is obtained by dividing the hidden dimension by the single header dimension. The matrix value state of each WKV header is a two-dimensional floating-point matrix multiplied by the single header dimension. In one embodiment, the hidden dimension can be 256 and the single header dimension can be 32, thus setting 8 WKV headers, each WKV header corresponding to a 32×32 matrix.
[0086] The WKV header uses the key vector dimension as the matrix rows and the value vector dimension as the matrix columns. The i-th row of the matrix stores the historical cumulative result of the i-th channel of the key vector with respect to all value vector channels. When reading a row, all columns of that row are read at the same time, without splitting the content in the column direction.
[0087] The service execution prerequisite state code is determined by the normalized state type, the controlled object category, and the state value. The state codes that appear in the training data are written into the state code table, and unregistered state codes are added. The number of state codes is recorded as the total number of state categories. The single-head dimension is taken as the smallest integer multiple of 8, which is not less than the total number of state categories. The hidden dimension is obtained by multiplying the number of WKV heads by the single-head dimension.
[0088] The base row number is obtained by dividing all rows of the single-head matrix by the total number of state categories. The remainder is increased by 1 row for each category starting from the first position of the state codes in ascending order, thus generating a fixed and non-overlapping range of consecutive rows. During runtime, the row range corresponding to the unregistered state code is used for unregistered states, without changing the matrix row indexes of other states.
[0089] In one implementation, when the total number of state categories is 5 and the single header dimension is 32, the first two categories are allocated 7 rows each, and the remaining three categories are allocated 6 rows each; the row start and row end points of each state category are written into the row range mapping table and kept consistent in all tasks, RWKV blocks and WKV headers.
[0090] The token shift channels and matrix rows are associated with the same index. The local i-th row of the h-th WKV header corresponds to the i-th channel within the range of the h-th header channel in the current RWKV block hidden vector. The range of continuous matrix rows thus corresponds to the range of continuous token shift channels. Both use the same service execution prerequisite state type as the search key.
[0091] The task status address succession relationship uses the current task identifier and service execution prerequisite status type as the search terms to return the status address of the most recent preceding task. When there are multiple saved records, the record with the closest preceding task end time and no later than the current task start time is selected, and the source prerequisite status end time must also be no earlier than the current task end time.
[0092] The source task state address records the state version corresponding to the input embedding layer, each RWKV block, time decay parameter, and time priority parameter. Output header parameters are not included in the state version. When updating output header parameters online, the state version remains unchanged. The state version is incremented only when the parameters that can generate matrix value state or channel term shift state are changed.
[0093] If the address record does not exist, the status version is inconsistent with the current status version, or the end time of the source task is later than the start time of the current task, or the end time of the prerequisite status is earlier than the end time of the current task, the source task status address is considered invalid.
[0094] The model initialization matrix value state establishes an all-zero matrix for each RWKV block and each WKV header when the model starts. The matrix dimension is consistent with the corresponding WKV header. The model initialization input is an all-zero vector with the same hidden dimension, which serves as supplementary content when the source address is not formed or the source content is missing.
[0095] The task predecessor matrix value state corresponding to the current task is first copied to the model initialization matrix value state, and then the execution prerequisite states of each service are processed in ascending order according to the starting index of the row range. For each row range processed, the matrix content of the same RWKV block, the same WKV header and the same row index in the source address is read.
[0096] Matrix row reading is performed row by row, starting from the first row of the row range. Each row reads all value vector columns and writes them to the same row position in the value state of the predecessor matrix. The writing process keeps the row index and column index unchanged and does not perform averaging, interpolation or cross-row mixing, so matrix rows from different source addresses can maintain their original positions within the same matrix.
[0097] When the source address is not formed or has expired, the current row range directly retains the row with the same index in the initialization matrix; when the source matrix is missing a corresponding row, the row range exceeds the matrix boundary, or the number of data read is not equal to the product of the number of rows and the number of columns, the corresponding row of the initialization matrix is used to fill in the gaps, without affecting the matrix rows that have already been written to other source addresses.
[0098] If the number of matrix elements in a source matrix row is not equal to the product of the number of rows and columns, or if the matrix elements contain non-numeric and infinite values, only the range of rows where the exception occurred is revoked and the same index row in the model initialization matrix value state is restored. The consecutive rows occupied by the same service execution prerequisite state must all come from the same task state address. If some matrix rows are read normally while others are exceptions, the entire range of consecutive rows is uniformly restored to the model initialization matrix value state to avoid mixing different sources within the same service execution prerequisite state.
[0099] The channel word shift state first copies the model initialization input, and then reads the previous input vector stored in the same source address and the same RWKV block according to the matrix row range; the corresponding channel is taken from the same index position of the source vector and written back to the original position of the current vector, so that the matrix row and the word shift channel maintain the consistency of source.
[0100] If the source address lacks the input vector from the previous moment, the input vector dimension is inconsistent with the hidden dimension, or the corresponding channel exceeds the boundary, the current channel range is supplemented using the same index channel of the model initialization input; other source addresses retain the written results for their corresponding channels and do not back up the whole due to local missing data.
[0101] After all row and channel ranges are processed, each RWKV block obtains the task predecessor matrix value state and channel term shift state corresponding to its own level. The two types of states, together with the current task input, are encapsulated as the recursive input of the time mixing module, so that the current task starts to calculate from the historical state where the sources of failure have been filtered out.
[0102] Compared to existing models, the improvement lies in the cross-task state entry point of the time mixing module. The original single-source complete state inheritance connection is transformed into a multi-source inheritance connection between matrix rows and corresponding input channel granularity. Different semantic regions thus have independent sources and independent failure boundaries. This change in internal connection allows valid premise states to be continuously retained, while failed states only exit the corresponding local state range. At the same time, the original key-value outer product, time decay, and readout operator of the WKV header remain unchanged, thereby improving the accuracy and separability of cross-task state inheritance while maintaining linear recursion efficiency.
[0103] In this embodiment, S5 specifically includes: The ordinary RWKV model completes matrix recursion at each sequence position with a single preceding state and overwrites the original matrix value state with the current recursion result. When multiple service execution prerequisite states have different end times, writing back the entire matrix cannot maintain the validity period of the historical information corresponding to each prerequisite state.
[0104] The RWKV model retains the original key-value outer product, time decay, and receive readout operators in the time-mixing module. The state write-back path is changed to a combination of complete state addition and storage and matrix row range address update. After the current task completes the recursion, an independent new task state address is generated. Each prerequisite state only changes its own row range and the address of the corresponding channel.
[0105] The first RWKV block input is generated by the input embedding layer, and the inputs of the remaining RWKV blocks are output by the second residual connection of the previous RWKV block; the current block input and the channel word shift state are both floating-point vectors with the same hidden dimension, which can be 256-dimensional in one implementation.
[0106] The temporal mixing module reads the received mixing coefficients, key mixing coefficients, value mixing coefficients, and gated mixing coefficients respectively. Each type of coefficient is a 256-dimensional training parameter. The current block input is multiplied by the corresponding coefficient channel by channel, and the channel word shift state is multiplied by 1 and subtracted from the corresponding coefficient channel by channel. The two results are added to form the four types of mixed inputs.
[0107] The four types of mixed inputs are multiplied by a 256×256 receive projection matrix, key projection matrix, value projection matrix, and gated projection matrix, respectively, and then superimposed with corresponding biases to form 256-dimensional receive vectors, key vectors, value vectors, and gated vectors; each vector is continuously split into in-header vectors according to the number of WKV headers.
[0108] In one implementation, eight WKV headers are set, each header obtaining a 32-dimensional receive vector, a 32-dimensional key vector, a 32-dimensional value vector, and a 32-dimensional gate vector; the splitting order is consistent with the WKV header index when the matrix value state is saved, and no cross-header swap is performed.
[0109] The key-value outer product matrix is calculated independently within each WKV header. The i-th channel of the key vector is multiplied by the j-th channel of the value vector, and the product is written in the i-th row and j-th column. After multiplying all channels pairwise, a 32×32 key-value outer product matrix is formed, with the matrix rows corresponding to the key vector channels and the matrix columns corresponding to the value vector channels.
[0110] The time decay vector is generated by the 32-dimensional trainable decay parameters stored in each WKV header. The original decay parameters are first exponentially taken, then negatively taken, and then exponentially taken again to obtain a 32-dimensional value between 0 and 1. The i-th time decay value is multiplied into all columns of the i-th row of the task predecessor matrix value.
[0111] The task predecessor matrix value state after row-by-row decay is added position by position to the key-value outer product matrix to obtain the update matrix value state of the current WKV header; the addition only occurs at positions where both row and column indices are the same, and does not change the matrix row range corresponding to the service execution prerequisite state.
[0112] The time priority vector is read from the 32-dimensional head parameters saved after model training. The i-th time priority value is multiplied into all columns of the i-th row of the key-value outer product matrix. The multiplication result is added position by position to the undecayed task predecessor matrix value to form the current task readout matrix.
[0113] The received vector is split into WKV headers and the linear projection result is maintained. Sigmoid compression is not performed. The 1×32 row vector is directly multiplied by the 32×32 readout matrix. During the calculation, each channel of the received vector is multiplied by the corresponding row of the readout matrix and the results are accumulated column by column to form a 1×32 WKV header readout result.
[0114] The gated vector is processed by the SiLU function and multiplied channel by channel with the head normalization result. The output intensity of each channel is controlled by the gated branch, and then the output is projected to restore the 256-dimensional time mixing result.
[0115] The time mixing result is added to the current block input channel by channel through the first residual connection. The addition result enters the second normalization layer and the channel mixing module. The channel mixing result is written to the next RWKV block through the second residual connection. The output of the last RWKV block enters the output normalization layer and the output header.
[0116] The new state address of the task is allocated by the address counter. The address counter reads the current maximum address value and increments by 1, while writing the task identifier, model version and current recursion sequence number. If the address value already exists or the storage write fails, the allocation is revoked, and the current task is kept from generating a new state address.
[0117] The new state address of the task stores the update state of all RWKV blocks. Each RWKV block stores the update matrix value state of all WKV headers and the channel word shift state formed by the current block input. In one embodiment, the 8 RWKV blocks respectively store 8 sets of 32×32 matrices and 1 256-dimensional input vector.
[0118] After the complete state write is completed, calculate the amount of stored data. The amount of matrix data should be equal to the product of the number of RWKV blocks, the number of WKV headers, the number of matrix rows, and the number of matrix columns. The amount of channel data should be equal to the product of the number of RWKV blocks and the hidden dimension. If the amounts are inconsistent, delete the incomplete writes and reallocate the new state address for the task.
[0119] The validity of the premise state is determined by comparing the task end time with the premise state end time. If the premise state end time is later than the task end time, it is considered still valid. If the two are the same or the premise state end time is earlier, it is considered invalid. The comparison uses a millisecond timestamp under a unified time base.
[0120] If the premise state is still valid, update the source address of the corresponding state type in the address mapping table to the new task state address, while retaining the original matrix row start and end points; the corresponding word shift channels use the same start and end indices and the same new task state address, so the matrix row and channel continue to maintain the same origin.
[0121] When a prerequisite state fails, only the address pointer and row range association of the corresponding state type in the address mapping table are deleted, and the complete matrix value state already saved in the new state address of the task is not modified; the same complete state is retained if it is still referenced by other valid prerequisite states or candidate scheduling actions.
[0122] After the address mapping table is updated, the output header maps the output of the last RWKV block to a 96-dimensional task execution time score and a 64-dimensional resource selection score. The scores corresponding to the execution time exceeding the service admission spatiotemporal segment, the supplementary position marked with invalid resources, and the resource position with occupied records in the candidate execution interval are written as -109. The remaining positions retain the output header to calculate the score. Then, Softmax normalization is performed on the 96-dimensional task execution time score and the 64-dimensional resource selection score to form the task execution time probability and the resource selection probability.
[0123] The candidate scheduling action extracts a valid index from the task execution time probability and the resource selection probability, and binds the extraction result to the new state address of the task; when all resource indexes are masked, no current task action is generated, the current task remains in the pending scheduling state and the established new state address is retained for rereading in the next round.
[0124] Compared to existing models, the improvements lie in the state lifecycle management interface of the temporal hybrid module. The matrix value state is changed from being overwritten in place by a single sequence to being saved as an immutable complete snapshot. The ownership of the service execution prerequisite state is changed from being uniformly assigned to the entire matrix to being assigned to the independent address of the matrix row range and the corresponding input channel. This internal organizational change refines the memory lifecycle of the temporal hybrid recursion from the granularity of the entire matrix to the granularity of the semantic row range, enabling different prerequisite states to continue, fail, and migrate independently, while maintaining the original key-value outer product and linear temporal recursion path unchanged. This enhances the accuracy of cross-task state reuse and avoids the overwriting of the overall existing memory caused by local failures.
[0125] In this embodiment, S6 specifically includes: This implementation uses the population initialization, hard frost puncture, and forward greedy selection of the frost optimization algorithm as the scheduling action optimization path. The soft frost search trigger coefficient is set to 0, and no continuous coordinate perturbation is performed on the discrete execution time index, resource selection index, and task new state address. This setting ensures that the task action and the task new state address always participate in the update with bound units, avoiding actions that cannot correspond to the model state due to continuous position changes.
[0126] The Frost-Ice Optimization Algorithm receives candidate scheduling actions and corresponding new task state addresses generated by the improved RWKV model. Each candidate scheduling action includes the execution time index and resource selection index of each property service task, and the new task state address points to the model state saved when the corresponding action was generated.
[0127] Individual location vectors are arranged in ascending order of task start time for property service tasks. Each task is written with the execution time index, resource selection index, and new task status address in sequence. The three items of the same task are kept adjacent. The new task status address is only replaced synchronously with the corresponding action parameters and does not participate in the numerical value calculation.
[0128] When the number of candidate scheduling actions is less than the population size, new candidate scheduling actions are extracted from the task execution time probability and resource selection probability generated by the output header, without directly modifying the parameters of the already extracted actions; after each extraction, the execution time is recursively performed in an independent temporary state and the corresponding new task state address is assigned until the number of individuals reaches the population size.
[0129] Once the number of candidate scheduling actions reaches the population size, extraction stops. Each individual stores a complete task sequence, action parameters, and the new task state address corresponding to the action generation process, avoiding mismatch between action parameters and model state sources during the initialization phase.
[0130] In one implementation, the population size can be 30, and each individual stores the complete task sequence and the corresponding new task state address; the random generator generates values between 0 and 1 using a uniform distribution, and the random seed is obtained by converting the batch identifier of the current round of scheduling, and the random sequence remains consistent when the same batch is run repeatedly.
[0131] The scheduling reward is calculated in minutes. First, the duration of the task that is fully executed in the candidate scheduling action is accumulated. If the task start time is not earlier than the segment start time, the task end time is not later than the segment end time, and all prerequisite states are valid during the execution, the corresponding task duration is included in the task completion duration.
[0132] The duration of a segment going out of bounds is obtained by adding the difference between the start time of the task and the start time of the segment and the difference between the end time of the task and the end time of the segment; if there is no corresponding time difference for going out of bounds, it is recorded as 0; if both ends of the same task go out of bounds, the time difference is calculated separately and then summed.
[0133] The resource conflict duration is calculated based on the same property service resource. The task execution intervals associated with the resource are arranged in ascending order of start time. When the start time of the later execution interval is earlier than the end time of the current occupation, the length of the overlapping interval is taken into the conflict duration, and the end time of the current occupation is updated to the later value of the two end times.
[0134] The scheduling reward is obtained by subtracting the total time spent on out-of-bounds segments and the time spent on resource conflicts from the time spent completing the task. If there are incomplete tasks, they are not included in the corresponding task time. If there are out-of-bounds segments or resource conflicts, the corresponding time is still deducted, so that the individual evaluation reflects both the amount of task completion and the unexecutable occupancy.
[0135] Individual fitness is directly derived from scheduling rewards. First, the minimum and maximum fitness values of the current population are read. The current individual fitness is subtracted from the minimum value and then divided by the difference between the maximum and minimum values to obtain a normalized fitness between 0 and 1. When the maximum and minimum values are the same, they are uniformly set to 1.
[0136] Hard frost puncture uses tasks as the replacement unit, generating a random number between 0 and 1 for each task of the current individual; when the random number is lower than the normalized fitness of the current individual, it reads the execution time index, resource selection index and new task status address of the same task in the best individual, and synchronously overwrites the corresponding content of the current individual.
[0137] Synchronous overlay does not split task actions and new task state addresses. When the execution time index or resource selection index is replaced, the address corresponding to the optimal individual must be written at the same time. If the address writing fails, all replacements of the current task are revoked to avoid the scheduling action reading model state that is inconsistent with its own generation process.
[0138] The temporary state copy replicates the current state of the improved RWKV model before the first puncture. The replicated content includes the matrix value state of each RWKV block, the channel lexical shift state, the task state address mapping table, and the current candidate task order. Each individual uses an independent copy and does not modify the actual running state.
[0139] After replacement, individuals are entered into temporary state copies in ascending order of task execution time, and if they are the same, they are processed in ascending order of task identifier; each task first reads the corresponding task new state address, then calls the matrix row range reading and channel word shift state recombination process, and the resulting task predecessor state enters the time mixing module for recursion.
[0140] If the new state address of the task is not hit, the following judgments are made: the address mapping table does not have a corresponding record, the state version saved at the address is inconsistent with the current state version, the number of saved RWKV blocks is inconsistent with the model configuration, or the number of saved data is inconsistent with the model configuration. If any of these situations occur, the current individual recursion is stopped, and the individual position vector and temporary state copy before the puncture are restored.
[0141] Missing matrix rows are determined by the following criteria: the number of rows stored at the source address is less than the length of the corresponding row range; the number of matrix columns is inconsistent with the single-head dimension of the WKV header; the number of matrix elements is not equal to the product of the number of rows and the number of columns; or the matrix elements contain non-numeric or infinite values. If any of these conditions occur, the content before the puncture is directly restored, and the current optimization result is not supplemented using the initialization matrix.
[0142] The failure of the premise state is determined by comparing the end time of the premise state with the end time of the candidate task. If the end time is not later than the end time of the candidate task, the premise state is considered to be in failure. If the spatial location of the premise state cannot cover the service location of the task, the recursion is also stopped and the content before the puncture is restored.
[0143] After all tasks are completed and the temporary recursion is performed, the scheduling reward is recalculated. If the new reward is greater than the reward before the puncture, the replaced individual position vector and temporary state copy are retained; if the new reward is not greater than the reward before the puncture, the original individual and original copy are restored, thus completing a positive greedy selection.
[0144] In one implementation, the maximum number of iterations can be 80, and all individuals are processed sequentially in each round; if the maximum reward of the population increases by less than 0.1 minutes for 10 consecutive rounds, the process ends early; if the early termination judgment is not met, the process continues to the maximum number of rounds.
[0145] After the iteration is completed, the individual with the highest scheduling reward is read. If the rewards are the same, the individual with the shorter resource conflict duration is selected first. If they are still the same, the individual with the earlier completion time of all tasks is selected. Finally, the corresponding action parameters and the new state address of the task are read to form the optimized scheduling action and the corresponding new state address.
[0146] Compared with the traditional frost-ice optimization algorithm, this implementation adapts the execution paths of individual encoding, hard frost puncture, and forward greedy selection. Individual positions are changed from independent numerical components to bound units composed of candidate scheduling actions and new task state addresses. Hard frost puncture uses bound units as the minimum replacement object, and forward greedy selection decides whether to retain or roll back after the temporary state copy has completed address reading and model recursion. This modification ensures that the position update process maintains the consistency between scheduling actions and model states, and eliminates candidate results with invalid addresses, missing matrix rows, and expired premise states before fitness comparison, thereby improving the executability and search effectiveness of the frost-ice optimization algorithm in state-dependent property resource scheduling.
[0147] In this embodiment, S7 specifically includes: The optimized scheduling action includes the execution time index and resource selection index of the property service task; the execution time index is converted into the task start time and the task execution duration is added to obtain the planned end time, and the resource selection index accesses the candidate resource table to obtain the property service resources.
[0148] Before allocating property service resources, verify the resource eligibility, service location accessibility, and occupancy records within the planned execution interval. If all three conditions are met, establish the association between the resource and the task. If the index is out of bounds, the resource is invalid, or the occupancy interval overlaps, do not establish the association, keep the task in a pending scheduling state, and return to re-optimize.
[0149] The resource occupancy interval starts at the planned start time and ends at the planned end time. Together with the task identifier and resource identifier, it is written into the service access spatiotemporal segment corresponding to the service location. The occupancy records of the same resource are arranged in ascending order of start time to facilitate correction after the execution event arrives.
[0150] Access events are generated by access control systems, work permit terminals, or equipment control terminals. The event content includes service location, task identifier, event time, and access result. A successful match is determined when the task identifier is consistent and the event location is the same as or covers the task service location.
[0151] When multiple access events occur for the same task, first delete duplicate records with the same event source, event time, and access result, and then sort them in ascending order by event time; read the first record with an access result of "allow" and an event time that is within the service access time-space segment, and determine the corresponding event time as the access time.
[0152] If no valid admission event is matched, the task remains in an unadmitted state, and the resource usage record is retained until the planned start time. If the task is still not admitted when the planned start time arrives, both the actual start time and the actual end time are written as the planned start time, the task execution result is written as incomplete, and the resource usage end time is corrected to the planned start time, so that the corresponding resource enters the release judgment.
[0153] Execution events include execution start events, execution end events, and task execution results. Event times are uniformly converted to the same time base as the service admission spatiotemporal segment. Events for the same task are arranged in ascending order of occurrence time, and duplicate events retain the record with the earlier reception time.
[0154] The original actual start time is the later of the admission time and the execution start time to avoid the task being counted as execution before it has been admitted; the original actual end time is the time recorded by the execution end event. If no end event is received, the end time of the segment is used as the statistical cutoff time for this round and the task result is recorded as incomplete.
[0155] When the original actual start time is earlier than the segment start time, the segment start time minus the original actual start time gives the front-end out-of-bounds duration; when the original actual end time is later than the segment end time, the original actual end time minus the segment end time gives the back-end out-of-bounds duration. The two are added together to form the segment out-of-bounds duration.
[0156] The actual start time is the later of the original actual start time and the segment start time, and the actual end time is the earlier of the original actual end time and the segment end time. If the actual end time is not later than the actual start time, the actual execution time is recorded as 0 and the task result is recorded as incomplete.
[0157] After the actual execution interval is formed, the start and end times of the original resource-occupied interval are replaced with the actual start time and the actual end time. The task execution result is read from the completion status returned by the job terminal. If the completion status exists and the actual start time and the actual end time are both valid, the completion result is retained. If the completion status is missing, the actual end time is not later than the actual start time, or the job terminal returns an incomplete status, it is recorded as incomplete.
[0158] The duration of resource conflicts is calculated based on the actual execution interval associated with the same property service resource, and is first arranged in ascending order of start time. When the start time of the next execution interval is earlier than the end time of the current occupation, the duration of the next execution interval from the start time to the earlier of the two end times is taken as the overlap duration, and the overlap durations are added together.
[0159] When multiple actual execution intervals overlap continuously, the current end time of occupation is always updated to the maximum value among the end times of the processed intervals to avoid the same overlapping part being accumulated repeatedly; when there are no overlapping intervals, the resource conflict duration is recorded as 0.
[0160] The fragment execution status is written with the admission time, actual execution interval, task execution result, fragment out-of-bounds duration, resource conflict duration, and resource occupancy status. After writing, an index is built with the task identifier and fragment identifier so that the task execution result enters the execution reward calculation and the actual end time enters the address reservation and resource release processing.
[0161] In this embodiment, S8 specifically includes: The segment execution status provides the task execution result, actual start time, actual end time, segment out-of-bounds duration, and resource conflict duration; the actual execution duration is obtained by subtracting the actual start time from the actual end time, and if the actual end time is missing, the actual execution duration is recorded as 0.
[0162] If the task execution result is completed and the actual end time is later than the actual start time, the property service task is recorded as a completed task; if both conditions are not met at the same time, it is recorded as an incomplete task, and the task identifier, actual execution time and original task execution time are retained.
[0163] The execution reward is calculated based on the tasks included in the same round of optimized scheduling action. The actual execution time of all completed tasks is added together, and then the time of all segment out-of-bounds and resource conflict is subtracted. All durations are uniformly converted to minutes, and the calculation results retain positive and negative values and are entered into the action output parameter update.
[0164] It can take the premise state address as the new state address corresponding to the optimized scheduling action as the inspection object, and compare the end time of the premise state of service execution with the actual end time of the task one by one; if the former is later than the latter, the new state address, RWKV block index, WKV header index and matrix row start and end index are retained.
[0165] If the end time of the precondition is no later than the actual end time of the task, delete the corresponding address pointing to and the matrix row range association, and delete the word shift channel association with the same index; if the complete matrix value state is still referenced by other valid row ranges, continue to save it, and release the corresponding storage content when the reference count drops to 0.
[0166] The resource occupation end time is changed from the planned end time to the actual end time of the task. If the actual end time is earlier than the planned end time, the occupation record between the two is deleted. If the actual end time is later than the planned end time, the occupation interval is extended and the calculated resource conflict duration is retained.
[0167] Resource release starts by searching for the occupancy records of the same property service resources from the actual end time of the task. If no other tasks are found to be continuously occupying the resource after that time, the resource status is changed to allocable. If there are still occupancy records, the earliest available time of the resource is written as the latest end time in the existing occupancy interval.
[0168] The remaining execution time of an unfinished task is obtained by subtracting the actual execution time from the original task execution time. If the result is less than 0, it is taken as 0. If the remaining execution time is 0 but the task execution result is not completed, the remaining execution time is taken as a single time interval of the scheduling time category, which is 5 minutes in one implementation, and the task is reserved as a task to be verified.
[0169] The unoccupied interval of the service access spatiotemporal segment is obtained by subtracting all resource-occupied intervals from the effective interval of the segment. First, overlapping or end-to-end occupied intervals are merged, and then the blank interval between the segment start time, the boundary of each merged interval, and the segment end time is taken.
[0170] If the length of the unoccupied interval is not less than the remaining execution time, and the execution prerequisite states of all services associated with the task are continuously valid within the range formed by the start point of the interval and the start point plus the remaining execution time, the corresponding service admission spatiotemporal segment is retained; if there is no segment that meets the range, the task remains in the pending scheduling state.
[0171] The earliest start time of each reserved segment is the later value between the start time of the unoccupied interval and the earliest available time of the property service resources. If the sum of the resulting time and the remaining execution time does not exceed the end time of the unoccupied interval, it is considered that the task can be continuously accommodated.
[0172] Unfinished tasks are sorted in ascending order by earliest start time. If the earliest start times are the same, they are sorted in descending order by remaining execution time. If they are still the same, they are sorted in ascending order by task acceptance time. The sorting result determines the task reading order in the next round of scheduling.
[0173] When generating optimized scheduling actions, the output header saves the probability of task execution time and the probability of resource selection, respectively, and reads the corresponding probability after the execution feedback arrives; in one embodiment, when the probability is lower than 10-8, it is taken as 10-8 to avoid invalid values when calculating the logarithm.
[0174] The joint logarithmic probability of an optimized scheduling action is obtained by adding the natural logarithm of the probability at task execution time to the natural logarithm of the resource selection probability. The execution reward minus the scheduling reward of the same optimized scheduling action forms the reward difference. The policy update loss is the negative of the reward difference multiplied by the joint logarithmic probability.
[0175] The policy update loss is inversely derived from the output head weight matrix and bias vector. When the reward difference is positive, gradient descent increases the probability of the corresponding optimized scheduling action; when the reward difference is negative, gradient descent decreases the probability of the corresponding optimized scheduling action.
[0176] Online parameter updates use the AdamW optimizer. In one implementation, the learning rate can be 0.00001. When the gradient norm exceeds 1, all gradients are proportionally reduced to norm 1. After each round of scheduling, gradient descent is performed once, updating only the output header weights and biases, without modifying the input embedding layer and RWKV block parameters.
[0177] The next round of property service resource scheduling status will be based on the sorted unfinished tasks as the main index. Each task will be associated with its remaining execution time, the address of the prerequisite status that can be accepted, the service access spatiotemporal segment that can continuously accommodate the task, and the allocable property service resources.
[0178] When multiple available fragments exist for the same task, the fragment with the earliest start time is selected; when multiple allocable resources exist, the resource with the earliest available time is selected. If any of the address, fragment, or resource is missing, a missing flag is retained, and invalid associations are not written to the task.
[0179] After all tasks are associated, the task arrangement results, address mapping, unoccupied segments, earliest available resource time, and updated output header parameters are encapsulated together as the next round of property service resource scheduling status, which is used for the generation of candidate scheduling actions and status acceptance in the next round.
[0180] Example 1: To verify the feasibility of this invention in practice, it was applied to a comprehensive property service project. This project includes equipment inspection, fault repair, public area cleaning, and operational verification tasks. Resources involved in scheduling include maintenance personnel, cleaning personnel, testing equipment, and specialized tools. Some maintenance tasks require simultaneous fulfillment of area access requirements, equipment shutdown, personnel qualifications, tool availability, and safety isolation status. Existing fixed-rule scheduling typically re-verifies all execution prerequisites during task switching, which can easily lead to situations where still-valid access status is not accepted, or outdated equipment shutdown status continues to participate in task scheduling. This results in increased waiting time, overlapping resource usage, and task execution boundary violations.
[0181] In a continuous task test, the system first assigned an equipment inspection task, followed by a component replacement task. The equipment inspection actually lasted 26.4 minutes. At the end, area access, equipment shutdown, and personnel qualifications remained valid. Tool availability and safety isolation statuses originated from the job preparation task. The improved RWKV model uses a 256-dimensional hidden state and 8 WKV headers. Each WKV header's matrix value state contains 32 rows, divided into 7 rows, 7 rows, 6 rows, 6 rows, and 6 rows according to the 5 service execution prerequisite states. The component replacement task reads the 20 rows of the matrix corresponding to the first 3 states from the equipment inspection task's state address, and the remaining 12 rows from the job preparation task's state address. Simultaneously, it reads the corresponding word shift channels and reassembles the task's predecessor matrix value state according to the original row indices. The output header generates three candidate scheduling actions with corresponding scheduling rewards of 37.6, 39.1, and 38.4, respectively. The Frost Ice optimization algorithm simultaneously adjusts the task start time, resource selection, and new task state address. After temporary state recursion and forward greedy selection, an optimized scheduling action with a scheduling reward of 40.2 is obtained. The component replacement task actually executes for 39.7 minutes, and no resource overlap occurs during execution. After execution, the system updates the output header parameters based on the difference between the execution reward and the scheduling reward.
[0182] To verify the scheduling effect of the present invention under continuous task and resource competition conditions, 900 property service tasks that were not included in the training set and validation set were selected for independent operation test, including 286 equipment maintenance tasks, 214 equipment inspection tasks, 238 public area cleaning tasks, and 162 operation verification tasks; 347 tasks had two or more service execution prerequisite states, and 193 tasks had similar resource competition.
[0183] The source address of the prerequisite status is reviewed by two property operation personnel, who combine the original access event, equipment status record and task execution interval. If the review results are inconsistent, a third person will re-verify. The fixed rule scheduling method, the unimproved RWKV scheduling method and the method of this invention use the same task request, resource configuration, prerequisite status and event record.
[0184] Each method was run independently 10 times on the same computing device. Table 1 records the arithmetic mean of the 10 results. The time taken for a single scheduling calculation is counted from the start of task data input to the end of the generation of all task scheduling actions. The task waiting time is calculated from the task acceptance time to the actual start time. The test results are shown in Table 1. Table 1 Comparison of the Operational Effectiveness of Property Service Resource Scheduling under Multiple Prerequisites
[0185] As shown in Table 1, the method of this invention outperforms both the fixed-rule scheduling method and the unmodified RWKV scheduling method in terms of on-time task completion rate, prerequisite state acceptance accuracy, resource conflict rate, average waiting time, and effective resource utilization. The fixed-rule scheduling method primarily allocates tasks based on task priority and resource availability, failing to adequately handle the continuation and failure of multiple execution prerequisite states across different tasks. Its on-time task completion rate is 89.4%, prerequisite state acceptance accuracy is 82.1%, resource conflict rate reaches 6.8%, and average waiting time is 36.7 minutes. The unmodified RWKV scheduling method can utilize historical task states for continuous decision-making, increasing the on-time task completion rate to 92.7% and reducing the resource conflict rate to 4.1%. However, its overall reliance on the previous task model state still makes it prone to carrying over failed prerequisite states into the current task, resulting in a prerequisite state acceptance accuracy of only 89.6%. This invention's method reads valid matrix rows from different task state addresses and reassembles the task predecessor matrix values according to the WKV matrix row range corresponding to the service execution prerequisite states. This achieves a prerequisite state acceptance accuracy of 96.8%, a task on-time completion rate of 96.1%, a resource conflict rate reduced to 1.6%, an average waiting time shortened to 22.4 minutes, and a resource utilization rate increased to 83.6%. The on-time task completion rate is obtained by dividing the number of tasks completed within the required time period by the total number of tasks. The prerequisite state acceptance accuracy is obtained by dividing the number of prerequisite states with correctly matched source addresses by the total number of accepted states. The resource conflict rate is obtained by dividing the number of tasks with overlapping occupancy by the total number of tasks. The resource utilization rate is obtained by dividing the actual resource service time by the schedulable time. Although the single scheduling calculation time of this invention is 1.83 seconds, higher than the 0.34 seconds of the fixed rule scheduling method and the 1.28 seconds of the unimproved RWKV scheduling method, the increased calculation time is traded for a lower resource conflict rate, shorter task waiting time, and higher task completion quality, resulting in a more stable overall scheduling effect.
[0186] This embodiment unifies the actual execution conditions of property tasks by using service execution prerequisite states and service access spatiotemporal segments. This allows area access, equipment downtime, personnel qualifications, tool availability, and security isolation states to participate in scheduling according to valid intervals. The improved RWKV model changes the overall reading path of matrix value states to reading by matrix row ranges. Based on the task state address inheritance relationship, it extracts still valid historical states and reassembles the task predecessor matrix value states according to the original row index. At the same time, it simultaneously reassembles the word shift channel to avoid the overall clearing of valid states or the overall inheritance of invalid states. The output header generates candidate scheduling actions for task execution time and resource selection based on the reassembled model state. The frost-ice optimization algorithm performs hard frost-ice puncture on the candidate actions and corresponding new state addresses simultaneously. It verifies the address validity, matrix row integrity, and prerequisite state validity in the temporary state copy and retains the results with higher scheduling rewards through positive greedy selection. After the task is actually executed, the system generates an execution reward based on the segment running state and updates the output header parameters using the difference between the execution reward and the scheduling reward. This allows the scheduling strategy to be continuously corrected according to the actual task completion status, out-of-bounds situations, and resource conflicts. Therefore, this embodiment can improve the accuracy of accepting continuous tasks under multiple preconditions, reduce redundant resource occupation and invalid waiting, and enhance the adaptability of smart property service resource scheduling to task changes and on-site execution deviations.
[0187] The above are merely preferred embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A method for scheduling resources for intelligent property services based on reinforcement learning, characterized in that, Includes the following steps: S1. Collect property information, link property service tasks with execution constraints, and form property operation objects; S2. Merge execution constraints are the prerequisite states for service execution, and divide the service access spatiotemporal segments according to the effective interval; S3. Write the task into the service access time-space segment that matches the duration and prerequisite status, and establish the task status address acceptance relationship according to the remaining validity. S4. Improve the RWKV model by mapping the premise states to the WKV matrix row range according to the succession relationship, read the matrix row from the corresponding address, reorganize the task predecessor matrix value state according to the original row order, and synchronously read the corresponding channel word shift state. S5. The time mixing module recursively calculates the result based on the task predecessor matrix value state and the channel word shift state, saves the result to the new task state address, updates the address corresponding to the valid prerequisite state and clears the invalid address, and generates candidate scheduling actions. S6. Calculate the scheduling reward by deducting the time for out-of-bounds and resource conflicts based on the task completion time. The Frost Ice Optimization Algorithm performs hard Frost Ice piercing on the candidate scheduling actions and new state addresses simultaneously. The optimized scheduling actions and corresponding addresses are determined through temporary state recursion and forward greedy selection. S7. Bind property service resources according to optimized scheduling actions, and update the segment operation status according to access and execution events; S8. Execution rewards are generated based on the running status and task results. The difference between the execution rewards and the scheduling rewards is used to update the action output parameters of the improved RWKV model. Addresses of the preconditions that can be accepted are retained. Unfinished tasks are rearranged and resources are released to form the next round of scheduling status. 2.The method of claim 1, wherein, S1 specifically includes: S11. Collect property information, unify time benchmarks and spatial location identifiers, merge service objects, records with the same content and overlapping time periods to form basic property information; S12. Group the basic property information according to the service recipient, service location and service content. Group records with continuous execution time into the same property service task and separate records with interrupted time to form property service tasks. S13. Based on the overlapping of service locations and effective time periods, extract the execution constraints corresponding to each property service task from the property basic information, associate the property service tasks with the execution constraints, and form property operation objects. 3.The method of claim 1, wherein, S2 specifically includes: S21. Collect the execution constraints in the property operation objects according to the property service tasks, unify the start and end times and spatial locations of the execution constraints, and arrange the execution constraints in chronological order; S22. Merge execution constraints that are in the same spatial location, have the same constraint content, and have consecutive effective times, record the start and end times of the merge result, and form the service execution prerequisite state; S23. Divide the continuous intervals according to the start and end times of the effective intervals of the service execution prerequisite states for the same task, retain the intervals that are commonly valid for each state and associate them with spatial locations to form a service access spatiotemporal segment. 4.The method of claim 1, wherein, S3 specifically includes: S31. Read the task execution duration and service execution prerequisite status, determine the task execution interval within the service access time-space segment, and retain the segment that is covered by the effective interval of each prerequisite status. S32. Write the property service tasks into the reserved fragment and assign task status addresses, and arrange the tasks at the same service location according to the start time. S33. Extract the remaining valid intervals of each prerequisite state in reverse chronological order from the end time of the preceding task, and find the intersection with the current task execution interval. S34. When the intersection covers the current task execution range and the corresponding prerequisite state content and service location are the same, the address of the most recent preceding task state is used as the source address of the current task's corresponding prerequisite state. If no match is found, the addresses remain independent, forming a task state address succession relationship.
5. The intelligent property service resource scheduling method based on reinforcement learning according to claim 1, characterized in that, The improved RWKV model includes an input embedding layer, multiple RWKV blocks connected in sequence, an output normalization layer, and an output header.
6. The intelligent property service resource scheduling method based on reinforcement learning according to claim 1, characterized in that, S4 specifically includes: S41. The WKV header of each RWKV block is divided into continuous row ranges with the key vector dimension as the row and the value vector dimension as the column, according to the service execution prerequisite state, and each row range is corresponding to the same index term shift channel. S42. Change the path of reading the matrix value status of the time mixing module as a whole to reading by row range, and determine the source task status address of each row range according to the task status address concatenation relationship. S43. Read the corresponding matrix row of the same WKV header from the source task status address, keep the column index unchanged, and write it to the corresponding position of the current task according to the original row index; S44. When the source address is not formed, the source address is invalid, or the matrix row is missing, the same index row of the model initialization matrix value state is used to fill in the missing matrix row, which together with the read matrix row forms the task predecessor matrix value state. S45. Read the corresponding channel of the input vector of the same RWKV block from the source address of each matrix row. If missing, fill in the missing channel with the same index as the input of the model initialization and reorganize the channel word shift state according to the original index.
7. The intelligent property service resource scheduling method based on reinforcement learning according to claim 1, characterized in that, S5 specifically includes: S51. The input embedding layer generates the first RWKV block input. Each RWKV block mixes and projects the current block input with the channel word shift state to form the receiving vector, key vector, value vector and gate vector. S52. Read the time decay vector of the WKV header, transpose the key vector and multiply it by the value vector to form a key-value outer product matrix, multiply the time decay vector row by row into the task predecessor matrix value state and superimpose the outer product matrix to form the update matrix value state. S53. Read the time priority vector of the WKV header, multiply it row by row into the key-value outer product matrix, add it to the state of the task predecessor matrix value, and then multiply it by the receiving vector to form the WKV header read result. S54. Save the updated matrix value state and the corresponding RWKV block current input to the new task state address, and use the current block input as the channel word shift state. S55. If the prerequisite state is still valid when the task ends, update the corresponding address to the new state address of the task and the original line range and synchronize the corresponding channel. If the prerequisite state is invalid, delete the corresponding address. The S56 and WKV head readout results are normalized, gated modulation, and output projection. The output head generates the action probability of task execution time and resource selection, and extracts candidate scheduling actions according to the action probability.
8. The intelligent property service resource scheduling method based on reinforcement learning according to claim 1, characterized in that, S6 specifically includes: S61. Write the candidate scheduling action parameters and the corresponding new status address of the task into the individual position vector in the order of the task. S62. The scheduling reward is formed by deducting the segment out-of-bounds time and resource conflict time from the task completion time. The scheduling reward is used as the individual fitness and normalized according to the population extreme value. When the extreme values are the same, one is taken. S63. When the random number between zero and one is lower than the normalized fitness, perform hard frost puncture and simultaneously replace the action parameters and new state address of the same task in the best individual. S64. Copy the current state of the improved RWKV model to form a temporary state copy. Recursively follow the order of the replaced tasks and the new state address. If the address is not hit, the matrix row is missing, or the premise state is invalid, restore the content before replacement. S65. Recalculate the scheduling reward. If the reward increases, retain the replacement; otherwise, restore. This completes the forward greedy selection. After the iteration ends, read the action with the largest reward and its corresponding address to form the optimized scheduling action and its corresponding new state address.
9. The intelligent property service resource scheduling method based on reinforcement learning according to claim 1, characterized in that, Specifically, S7 includes: S71. Read the task execution interval and resource selection from the optimized scheduling action, allocate property service resources to the corresponding tasks, and record the occupied interval in the corresponding segment of the task service location; S72. Match the access event according to the service location and event time, and write the access time into the corresponding fragment; S73. Receive the execution start and end events, take the later of the admission time and the execution start time as the actual start time, read the execution end time and the task execution result, calculate the out-of-bounds duration and correct it according to the segment boundary to form the actual execution interval; S74. Record the overlapping duration of the same resource in the actual execution intervals of different tasks as the resource conflict duration, and write the actual execution interval, task execution result, out-of-bounds duration and resource conflict duration into the corresponding segment to form the segment running status.
10. The intelligent property service resource scheduling method based on reinforcement learning according to claim 1, characterized in that, S8 specifically includes: S81. Distinguish between completed and incomplete tasks based on task execution results. Deduct the time spent on out-of-bounds segments and resource conflicts from the actual execution time of completed tasks to form an execution reward. S82. When the end time of the prerequisite state is later than the actual end time of the task, retain the new state address and row range corresponding to the optimized scheduling action to form a prerequisite state address that can be accepted; otherwise, delete the corresponding address. S83. Adjust the resource occupation end time according to the actual end time of the task, delete the occupation record after the adjusted time, and release resources that are not associated with other tasks; S84. Deduct the actual execution time from the unfinished task duration, retain the unoccupied interval that can continuously accommodate the remaining time and whose premise state is valid, and arrange the tasks according to the earliest start time. S85. Read the action probability generated by the optimized scheduling action from the output header, multiply the difference between the execution reward and the scheduling reward by the gradient of the logarithm of the action probability with respect to the output header parameters, and update the output header parameters along the resulting gradient. S86. Associate the arranged unfinished tasks with the available prerequisite state address, reserved fragments, and allocable resources to form the next round of property service resource scheduling state.
