Bus scheduling method based on comparative learning and self-supervised time series clustering

Based on a bus scheduling method based on the comparative learning and self -supervision time sequence clustering class, the problem of low efficiency and accuracy of existing technology when dealing with large -scale flow changes data, and realizing more efficient and accurate passenger traffic characteristics analysis and bus scheduling Essence

CN119378844AActive Publication Date: 2025-01-28YANCHENG INST OF TECH +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411254112.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-09
Publication Date
2025-01-28
Estimated Expiration
2044-09-09

AI Technical Summary

Technical Problem

The prior art is inefficient in processing large-scale flow of people, has low information accuracy, and subsequent transportation scheduling is not suitable.

Method used

Adopting a bus scheduling method based on the comparative learning and self -supervision time sequence clustering class, the passenger traffic sequence of passenger traffic sequences intersects the sub -sequence of passenger traffic sequences, calculate the comparison loss, reconstruction loss and cluster loss, and the reverse communication optimization network to obtain different time to obtain different time Passenger flow characteristics of the section and conduct bus scheduling.

Benefits of technology

Improve the mining efficiency and accuracy of passenger traffic characteristics information, and improve the appropriateness of subsequent bus scheduling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119378844A_ABST
    Figure CN119378844A_ABST
Patent Text Reader

Abstract

The invention provides a bus scheduling method based on comparative learning and self-supervised time sequence clustering, and the method comprises the steps: obtaining a passenger flow intersection subsequence of a passenger flow time sequence; obtaining an original sequence potential representation and a sub-sequence potential representation according to the passenger flow time sequence and the passenger flow intersecting sub-sequence; calculating comparison loss according to the subsequence potential representation; calculating reconstruction loss and clustering loss according to the potential representation of the original sequence; performing back propagation optimization on the network by combining the comparison loss, the reconstruction loss and the clustering loss, and obtaining a passenger flow clustering result; and carrying out bus scheduling according to a passenger flow clustering result. According to the bus scheduling method based on comparative learning and self-supervised time series clustering, a passenger flow clustering result is obtained and bus scheduling is carried out by combining comparative loss, reconstruction loss and clustering loss back propagation optimization network, the mining efficiency and precision of passenger flow characteristic information are improved, and the suitability of subsequent bus scheduling is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of intelligent bus dispatching, and in particular to a bus dispatching method based on contrastive learning and self-supervised time series clustering. Background Art

[0002] Smart public transportation is an important development direction of urban public transportation systems. It integrates advanced information technology to realize intelligent dispatching and management of public transportation vehicles and improve the utilization rate of public transportation vehicles. It is of great significance to alleviate urban traffic congestion, improve the quality of public transportation services and enhance the attractiveness of public transportation.

[0003] Passenger flow on bus routes is a typical time series data. In the construction of smart cities, intelligent bus scheduling is a key component. By predicting passenger flow trends, it can assist bus scheduling decisions.

[0004] Time series clustering is an analytical method for time series data that aims to reveal the inherent structure of data over time by identifying similar behavioral patterns. This method is widely used in many fields, including but not limited to trend forecasting in financial markets, seasonal pattern recognition in climatology, gene expression analysis in biology, fault detection in industrial monitoring, etc. By clustering time series data, we can discover the regularity and periodicity phenomena hidden behind the data, which is of great significance for understanding and predicting future development trends.

[0005] Deep learning models can automatically learn complex features in data and are very suitable for processing data with high nonlinearity. Among them, contrastive learning, as a powerful self-supervised learning method, has been shown to effectively learn useful representations from unlabeled data. Through contrastive learning, the model can learn to distinguish between similar and dissimilar samples, which is particularly useful for time series data because it can capture the implicit temporal dependencies in the data.

[0006] The invention patent with application number: CN202011215298.X discloses a method for joint scheduling of urban public transportation resources, wherein the method includes: based on the recorded data of crowd flow at different times and places and the changes in passenger flow carried by various types of transportation vehicles, a demand flow diagram for people taking transportation that changes over time is pre-constructed; then, the current station status and the future predicted flow diagram are used as the current system status, and reinforcement learning technology is used to coordinate and efficiently schedule the current multiple transportation systems.

[0007] However, the above-mentioned prior art needs to perform data mining and analysis on the recorded changes in passenger flow when constructing the demand flow diagram of people taking transportation based on the recorded changes in passenger flow. The traditional data mining method faces the problems of low efficiency and low accuracy of mining information when processing large-scale passenger flow change data. Furthermore, the subsequent scheduling of transportation is not suitable.

[0008] In view of this, a bus scheduling method based on contrastive learning and self-supervised time series clustering is urgently needed to at least address the above shortcomings. Summary of the invention

[0009] One of the purposes of the present invention is to provide a bus scheduling method based on contrastive learning and self-supervised time series clustering, to obtain passenger flow intersection subsequences of passenger flow time series; to calculate contrast loss based on subsequence potential representation of passenger flow intersection subsequences; to calculate reconstruction loss and clustering loss based on original sequence potential representation of passenger flow time series; to obtain passenger flow characteristics corresponding to different time periods and perform bus scheduling by combining contrast loss, reconstruction loss and clustering loss back propagation optimization network, thereby improving the mining efficiency and accuracy of passenger flow characteristic information and improving the suitability of subsequent bus scheduling.

[0010] The bus dispatching method based on contrastive learning and self-supervised time series clustering provided by the embodiment of the present invention includes:

[0011] Obtaining a passenger flow time series; the passenger flow time series includes: one-to-one corresponding historical moments and the number of passengers;

[0012] Randomly crop the passenger flow time series to obtain the passenger flow intersection subsequences;

[0013] Input the passenger flow time series and the passenger flow intersection subsequence into the encoder to obtain the original sequence potential representation and the subsequence potential representation;

[0014] Calculate the contrast loss based on the subsequence latent representation;

[0015] Calculate the reconstruction loss based on the potential representation of the original sequence;

[0016] Cluster the potential representation of the original sequence and calculate the clustering loss;

[0017] The contrast loss, reconstruction loss and clustering loss are combined to back propagate and optimize the network to obtain the passenger flow clustering result; the passenger flow clustering result is: the passenger flow characteristics corresponding to different time periods;

[0018] Bus dispatch is carried out according to the passenger flow clustering results.

[0019] Preferably, the passenger flow time series is randomly trimmed to obtain a passenger flow intersection subsequence, including:

[0020] Randomly select the clipping length and starting position of the passenger flow time series;

[0021] Randomly select the extension start and end positions and offsets;

[0022] After all selections are completed, a list of cropping indexes is generated;

[0023] According to the clipping index list, the passenger flow intersection subsequence is extracted from the passenger flow time series.

[0024] Preferably, the encoder performs the following operations:

[0025] Mask the latent vector at randomly selected timestamps of the input sequence to obtain an enhanced contextual view;

[0026] According to the context view, each channel of the time series is subjected to independent FFT transformation to obtain a comprehensive frequency domain representation F;

[0027] Calculate the power spectrum of the integrated frequency domain representation and determine the dominant frequency components;

[0028] Adaptively filter out the high-frequency components in the power spectrum and obtain F filtered ;

[0029] Based on the global filter W G Learning from the comprehensive frequency domain representation F to obtain the first filtering feature;

[0030] Based on the local filter W L From the adaptively filtered data F filtered Learning in the process, obtaining the second filtering feature;

[0031] Integrate the first filter feature and the second filter feature to obtain frequency domain data;

[0032] Convert the frequency domain data back to the time domain based on inverse fast Fourier transform to obtain reshaped time domain data;

[0033] Pass the reshaped time domain data of the enhanced representation into the convolutional layer;

[0034] The output of the convolutional layer is residually connected to the input sequence, and the number of output channels is adjusted through 1×1 convolution to output the potential representation of the input sequence. The convolutional layer consists of three layers of expanded one-dimensional convolutions with an exponential increase of 2, and each layer is supplemented by a ReLU activation function.

[0035] Preferably, the contrast loss is calculated based on the subsequence potential representation, including:

[0036] taking the latent representations of the same timestamp in the subsequences from the same passenger flow time series as the first positive pair, taking the latent representations of different timestamps in the subsequences from the same passenger flow time series as the first negative pair, and calculating the temporal contrast loss according to the first positive pair and the first negative pair;

[0037] Taking the latent representations of the subsequences from the same passenger flow time series at the same timestamp as the second positive pair, taking the latent representations of the subsequences from different passenger flow time series at the same timestamp as the second negative pair, and calculating the instance contrast loss according to the second positive pair and the second negative pair;

[0038] The contrastive loss is determined based on the time contrastive loss and the instance contrastive loss.

[0039] Preferably, the reconstruction loss is calculated based on the potential representation of the original sequence, including:

[0040] Process the original sequence potential representation through the GRU layer of the decoder to obtain the GRU output at each time step;

[0041] Pass the GRU output to the normalization layer to return the processed prediction sequence;

[0042] The reconstruction loss is calculated based on the passenger flow time series and the predicted series.

[0043] Preferably, clustering is performed based on the potential representation of the original sequence, and the clustering loss is calculated, including:

[0044] Perform fuzzy C-means clustering on the target sequence after the encoder to obtain the cluster label and cluster center of each target sequence;

[0045] According to the cluster labels and cluster centers, the clustering loss based on the probability centroid is obtained.

[0046] Preferably, bus dispatching is performed according to the passenger flow clustering result, including:

[0047] Based on the preset clustering result characterization rules, according to the passenger flow clustering results, the passenger flow clustering features are obtained, and the passenger flow clustering features include: date label, time period label and passenger flow range;

[0048] Bus dispatch is carried out according to the clustering characteristics of passenger flow.

[0049] Preferably, bus dispatching is performed according to the passenger flow clustering result, including:

[0050] Train the passenger flow prediction model based on the passenger flow clustering characteristics;

[0051] Get input time information;

[0052] estimating a first target passenger flow based on the input time information and the passenger flow estimation model;

[0053] Get the bus dispatch model;

[0054] Based on the bus dispatch model and according to the first target passenger flow, bus dispatch is carried out.

[0055] Preferably, obtaining a bus dispatch model includes:

[0056] Collecting first historical bus dispatching data; the first historical bus dispatching data includes: historical driving status information of buses, historical passenger flow of target stations and historical departure strategies;

[0057] Obtain passenger complaint information of a target station corresponding to the first historical bus dispatch data;

[0058] Parse the passenger complaint information and obtain the complaint type of the first passenger complaint item;

[0059] According to the complaint type, determine the second passenger complaint item of the target complaint type;

[0060] Obtain the dissatisfaction degree according to the second passenger's complaint item and the preset semantic analysis model;

[0061] Obtain the historical complaint record of the target passenger corresponding to the second passenger's complaint item;

[0062] Extract complaint behavior characteristics from historical complaint records;

[0063] Obtain the malicious complaint degree determination database;

[0064] Determine the database based on the complaint behavior characteristics and malicious complaint degree to obtain the malicious complaint degree of the target passenger;

[0065] Get the downward adjustment value of malicious complaints corresponding to dissatisfaction;

[0066] Determine a removal value according to the downward adjustment value and the dissatisfaction, and associate the removal value with the first historical public transport dispatch data;

[0067] Accumulate the elimination values ​​associated with the first historical bus dispatch data to obtain the elimination degree;

[0068] Acquire the second historical public transportation dispatch data whose elimination degree is less than a preset elimination degree threshold;

[0069] Based on the second historical bus dispatch data, train the bus dispatch model;

[0070] Among them, obtaining the malicious complaint degree determination database includes:

[0071] Obtain historical verification complaint records;

[0072] Analyze historical verification complaint records and determine the one-to-one corresponding verification objects and verification values;

[0073] Acquire a first verification strategy according to a feature type of a verification object;

[0074] Obtain the actual second verification strategy of the verification object;

[0075] Determining a degree of verification standardization according to a strategy difference between the first verification strategy and the second verification strategy;

[0076] If the verification standardization is greater than or equal to the preset verification standardization threshold, the corresponding verification object and verification value are taken as the first item to be stored;

[0077] If the verification standardization is less than the preset verification standardization threshold, the verification experience of the verification subject is obtained;

[0078] If the verification experience is greater than or equal to the preset verification experience threshold, the verification object and verification value of the corresponding verification subject verification are taken as the second item to be stored;

[0079] The first item to be stored and the second item to be stored are integrated to obtain a malicious complaint degree determination library.

[0080] Preferably, bus dispatching is performed according to the passenger flow clustering result, including:

[0081] According to the clustering characteristics of passenger flow, a template for determining passenger flow is constructed;

[0082] Determine the template according to the input time information and passenger flow, and determine the second target passenger flow;

[0083] Bus dispatch is carried out according to the operation information corresponding to the input time information and the second target passenger flow.

[0084] The beneficial effects of the present invention are:

[0085] The present invention obtains a passenger flow intersection subsequence of a passenger flow time series; calculates contrast loss according to a subsequence potential representation of the passenger flow intersection subsequence; calculates reconstruction loss and clustering loss according to an original sequence potential representation of the passenger flow time series; combines contrast loss, reconstruction loss and clustering loss to back propagate and optimize a network to obtain passenger flow characteristics corresponding to different time periods and perform bus scheduling, thereby improving the mining efficiency and accuracy of passenger flow characteristic information and the suitability of subsequent bus scheduling.

[0086] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures specifically pointed out in the present application documents.

[0087] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0088] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:

[0089] Figure 1 Schematic diagram of a bus scheduling method based on contrastive learning and self-supervised time series clustering in an embodiment of the present invention. DETAILED DESCRIPTION

[0090] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.

[0091] The embodiment of the present invention provides a bus dispatching method based on contrastive learning and self-supervised time series clustering, such as Figure 1 As shown, including:

[0092] Obtaining a passenger flow time series; the passenger flow time series includes: one-to-one corresponding historical moments and the number of passengers; wherein the passenger flow time series is recorded in chronological order, and is determined by the historical passenger flow record of the target bus station for bus dispatching as needed, and the historical passenger flow record is obtained by communicating with the network node of the target bus station;

[0093] The passenger flow time series is randomly pruned to obtain a passenger flow intersection subsequence; wherein the passenger flow intersection subsequence is: a subsequence obtained by random pruning and having similar characteristics to the passenger flow time series;

[0094] The passenger flow time series and the passenger flow intersection subsequence are input into the encoder to obtain the original sequence potential representation and the subsequence potential representation; wherein the original sequence potential representation is: the internal feature representation obtained by the encoder after processing the passenger flow time series; the subsequence potential representation is: the internal feature representation obtained by the encoder after processing the passenger flow intersection subsequence;

[0095] Compute contrast loss based on the subsequence potential representation; wherein the contrast loss includes: time contrast loss and instance contrast loss; the time contrast loss is: the contrast loss between the subsequence potential representation of the same timestamp from the same passenger flow time series and the subsequence potential representation of different timestamps from the same passenger flow time series; the instance contrast loss is: the contrast loss between the subsequence potential representations of different passenger flow time series at the same timestamp;

[0096] According to the potential representation of the original sequence, the reconstruction loss is calculated; the reconstruction loss is: the mean square error between the predicted sequence reconstructed according to the potential representation of the original sequence and the passenger flow time series;

[0097] Clustering the potential representation of the original sequence and calculating the clustering loss; wherein the clustering loss includes: probability centroid clustering loss based on clustering the potential representation of the original sequence;

[0098] The contrast loss, reconstruction loss and clustering loss are combined to back propagate and optimize the network to obtain the passenger flow clustering result; the passenger flow clustering result is: the passenger flow characteristics corresponding to different time periods;

[0099] Bus dispatch is carried out according to the passenger flow clustering results.

[0100] The working principle and beneficial effects of the above technical solution are:

[0101] The present invention obtains a passenger flow intersection subsequence of a passenger flow time series; calculates contrast loss according to a subsequence potential representation of the passenger flow intersection subsequence; calculates reconstruction loss and clustering loss according to an original sequence potential representation of the passenger flow time series; and optimizes a clustering network by combining contrast loss, reconstruction loss and clustering loss for back propagation to obtain passenger flow characteristics corresponding to different time periods and perform bus scheduling, thereby improving the mining efficiency and accuracy of passenger flow characteristic information and the suitability of subsequent bus scheduling.

[0102] In one embodiment, the passenger flow time series is randomly trimmed to obtain a passenger flow intersection subsequence, including:

[0103] Randomly select the clipping length and starting position of the passenger flow time series;

[0104] Randomly select the extension start and end positions and offsets;

[0105] After all selections are completed, a list of cropping indexes is generated;

[0106] According to the clipping index list, the passenger flow intersection subsequence is extracted from the passenger flow time series.

[0107] The working principle and beneficial effects of the above technical solution are:

[0108] The present invention randomly selects the length and starting position of the subsequence, generates two crop index lists for each sample, and is used to extract two different segments. The segments are extracted from the original data using the crop indexes and are passed to the encoder for encoding. This facilitates the subsequent analysis of passenger flow changes from different angles, and helps to more comprehensively understand the patterns and trends of passenger flow.

[0109] In one embodiment, the encoder performs the following operations:

[0110] Mask the latent vector at randomly selected timestamps of the input sequence to obtain an enhanced contextual view;

[0111] According to the context view, each channel of the time series is subjected to independent FFT transformation to obtain a comprehensive frequency domain representation F;

[0112] Calculate the power spectrum of the integrated frequency domain representation and determine the dominant frequency components;

[0113] Adaptively filter out the high-frequency components in the power spectrum and obtain F filtered ;

[0114] Based on the global filter W G Learning from the original frequency domain data F to obtain the first filtering feature;

[0115] Based on the local filter W L From the adaptively filtered data F filtered Learning in the process, obtaining the second filtering feature;

[0116] Integrate the first filter feature and the second filter feature to obtain frequency domain data;

[0117] Convert the frequency domain data back to the time domain based on inverse fast Fourier transform to obtain reshaped time domain data;

[0118] Pass the reshaped time domain data of the enhanced representation into the convolutional layer;

[0119] The output of the convolutional layer is residually connected to the input sequence, and the number of output channels is adjusted through 1×1 convolution to output the potential representation of the input sequence. The convolutional layer consists of three layers of expanded one-dimensional convolutions with an exponential increase of 2, and each layer is supplemented by a ReLU activation function.

[0120] The working principle and beneficial effects of the above technical solution are:

[0121] The latent vector is masked at randomly selected timestamps to generate an enhanced contextual view, and then each channel of the time series is transformed by independent FFT to obtain a comprehensive frequency domain representation F, which encapsulates the spectral features of the original time series on all channels, and its expression is:

[0122]

[0123] in, represents a 1D FFT operation, where S is the input time series, L′ is the length of the transformed sequence in the frequency domain, and C is the number of channels;

[0124] Calculate the power spectrum of F P = |F| 2, to identify the dominant frequency component, and then adaptively filter out the high-frequency component in the power spectrum P, the expression is:

[0125] F filtered =F⊙(P>θ)

[0126] Where θ is a trainable threshold that adjusts according to the spectral characteristics of the data, ⊙ represents element-by-element multiplication, and P>θ is a binary mask where frequencies with power above the threshold θ are retained and other frequencies are filtered out;

[0127] After adaptive filtering, two sets of learnable filters are used: a global filter W G Learn a local filter W from the original frequency domain data F L From the adaptively filtered data F filtered The specific expression is:

[0128] F G =W G ⊙F

[0129] F L =W L ⊙F filtered

[0130] Then the filtering feature F integrated To integrate:

[0131] F integrated =F G +F L

[0132] Apply inverse fast Fourier transform to convert frequency domain data back to time domain, the expression is:

[0133]

[0134] After the enhanced representation, it is passed into the convolution layer, and first processed by multi-layer dilated one-dimensional convolution to expand the receptive field. The dilation rate increases exponentially by 2. Then it is activated by the ReLU activation function and residually connected to the original sequence. Finally, the number of output channels is adjusted through 1×1 convolution to output the result.

[0135] The present invention combines the Fourier transform method and helps to capture the periodicity and trend patterns in the time series and improve the quality of feature representation.

[0136] In one embodiment, the contrast loss is calculated based on the subsequence latent representation, including:

[0137] taking the latent representations of the same timestamp in the subsequences from the same passenger flow time series as the first positive pair, taking the latent representations of different timestamps in the subsequences from the same passenger flow time series as the first negative pair, and calculating the temporal contrast loss according to the first positive pair and the first negative pair;

[0138] Taking the latent representations of the subsequences from the same passenger flow time series at the same timestamp as the second positive pair, taking the latent representations of the subsequences from different passenger flow time series at the same timestamp as the second negative pair, and calculating the instance contrast loss according to the second positive pair and the second negative pair;

[0139] The contrastive loss is determined based on the time contrastive loss and the instance contrastive loss.

[0140] The working principle and beneficial effects of the above technical solution are:

[0141] The representations of the same timestamps from two views of the input time series are taken as the first positive pair, and the representations of different timestamps from the same time series are taken as the first negative pair. Let i be the index of the input time series sample and t be the timestamp. The latent representation r of the two intersecting subsequences of the original sequence is i,t and r i ' ,t Representing at the same timestamp t, the time contrast loss is expressed as:

[0142]

[0143] Among them, Ω is the timestamp set of the overlapping parts of the two subsequences, τ is an indicator variable, the value is 1 when the event occurs, otherwise it is 0. The representations of the same timestamps from the two views of the input time series are taken as the second positive pair, and the representations of the same timestamps from different time series are taken as the second negative pair. The expression of the instance contrast loss is:

[0144]

[0145] Among them, B represents the batch size, r j,t and r j ' ,t They represent the representation of other instances at the same time, taking into account both the comparison between positive samples and other samples and the comparison between negative samples and other samples, thus improving the stability and effectiveness of training. Then the total contrast loss can be obtained as:

[0146]

[0147] Where N is the batch size and T is the total number of timestamps.

[0148] The present invention uses a contrastive learning method, and the model can learn more discriminative feature representations in an unsupervised or weakly supervised environment, and can automatically learn features to distinguish different samples, thereby improving the robustness and generalization ability of the features.

[0149] In one embodiment, the reconstruction loss is calculated based on the potential representation of the original sequence, including:

[0150] Process the original sequence potential representation through the GRU layer of the decoder to obtain the GRU output at each time step;

[0151] Pass the GRU output to the normalization layer to return the processed prediction sequence;

[0152] The reconstruction loss is calculated based on the passenger flow time series and the predicted series.

[0153] The working principle and beneficial effects of the above technical solution are:

[0154] After the untrimmed sequence is input into the encoder, the potential representation Z is obtained, which is then passed to the decoder. It is first processed by the GRU layer to obtain the output of each time step, and then the output of the GRU is passed to the normalization layer, and finally the processed prediction sequence is returned.

[0155] The calculation formula of reconstruction loss is:

[0156]

[0157] Among them, x i and x i are the original sequence and the predicted sequence respectively.

[0158] The present invention introduces the GRU layer to calculate the reconstruction loss, which is more reasonable.

[0159] In one embodiment, clustering is performed according to the potential representation of the original sequence, and the clustering loss is calculated, including:

[0160] Perform fuzzy C-means clustering on the target sequence after the encoder to obtain the cluster label and cluster center of each target sequence;

[0161] According to the cluster labels and cluster centers, the clustering loss based on the probability centroid is obtained.

[0162] The working principle and beneficial effects of the above technical solution are:

[0163] Cluster the sequences that have passed through the encoder to obtain the clustering label and clustering center of each sequence;

[0164] The clustering loss based on the probability centroid is calculated to measure the distance between the encoding representation of the sample and its corresponding cluster center. The expression of the distance measurement method is:

[0165]

[0166] Among them, z i is the encoding representation of the sample, c j is the cluster center, the non-negative number w is the nonlinear part, ∈ is the curvature that limits the nonlinear region, C = ww·ln(1+w / ∈) is used to smoothly connect the linear and nonlinear parts defined by the piecewise connection, and the probability distribution is used to perform weighted averaging on all distances to obtain the clustering loss.

[0167] By jointly optimizing multiple loss functions, the model can share information between multiple tasks, which helps the model to better understand the data and improve the accuracy and overall performance of clustering.

[0168] In one embodiment, bus dispatching is performed according to the passenger flow clustering result, including:

[0169] Based on the preset clustering result characterization rules, according to the passenger flow clustering results, the passenger flow clustering features are obtained. The passenger flow clustering features include: date label, time period label and passenger flow range; wherein, the clustering result characterization rules are: pre-defined rules on how to convert passenger flow clustering results into passenger flow clustering features, which data attributes are selected as the basis for clustering, and how to quantify these attributes, for example: the station flow at 8:30 am on January 20 is 20 people, the date label is: January 20, the time period label is: morning peak period; the passenger flow range is: 20 people;

[0170] Carry out bus dispatch according to the clustering characteristics of passenger flow. Carry out bus dispatch according to the clustering characteristics of passenger flow means: formulate and apply appropriate bus dispatch strategies according to the clustering characteristics of passenger flow, for example: determine the appropriate departure time interval and number of departures during the morning peak period according to the passenger flow range during the morning peak period in winter.

[0171] The working principle and beneficial effects of the above technical solution are:

[0172] The passenger flow at bus stations at different time rhythms is different. For example, the passenger flow during the morning peak hours and the evening peak hours is significantly higher than that in other periods. For example, the passenger flow in summer and winter is less than that in spring and autumn. Therefore, setting a fixed bus scheduling plan cannot reasonably allocate public resources. Therefore, the passenger flow clustering results are characterized to obtain the passenger flow clustering characteristics; bus scheduling is adaptively carried out based on the passenger flow clustering characteristics, which improves the rationality of bus scheduling.

[0173] In one embodiment, bus dispatching is performed according to the passenger flow clustering result, including:

[0174] According to the clustering characteristics of passenger flow, a passenger flow prediction model is trained; wherein the passenger flow prediction model is: an AI model that predicts passenger flow according to the input time;

[0175] Obtain input time information; wherein the input time information is: the time when the user inputs the passenger flow estimation model and wants to check the passenger flow;

[0176] Based on the input time information and the passenger flow estimation model, a first target passenger flow is estimated; wherein the first target passenger flow is: the passenger flow corresponding to the input time estimated by the passenger flow estimation model;

[0177] Obtain a bus dispatch model; the bus dispatch model is an AI model that optimizes bus operation, which takes into account multiple factors such as passenger flow, vehicle resources, and route arrangements to determine how to dispatch buses efficiently;

[0178] Based on the bus dispatch model and according to the first target passenger flow, bus dispatch is carried out.

[0179] The working principle and beneficial effects of the above technical solution are:

[0180] The present invention trains a passenger flow prediction model through passenger flow clustering characteristics, and at the same time, obtains input time information; estimates the first target passenger flow according to the input time information and the passenger flow prediction model; introduces a bus scheduling model, which takes into account multiple factors such as passenger flow, vehicle resources and route arrangements to determine how to efficiently schedule buses; and performs bus scheduling based on the bus scheduling model and according to the first target passenger flow, thereby further improving the suitability of bus scheduling.

[0181] In one embodiment, obtaining a public transportation dispatch model includes:

[0182] Collecting first historical bus dispatch data; the first historical bus dispatch data includes: historical driving status information of buses, historical passenger flow of target stations and historical departure strategies; wherein the historical driving status information is: the driving status of buses that can be dispatched in the first historical bus dispatch data, such as: driving, or: stopped for repair; the historical passenger flow of the target station is: the passenger flow data of each bus station; the historical departure strategy is: departure interval and number of departure vehicles;

[0183] Obtain passenger complaint information of the target station corresponding to the first historical bus dispatch data; wherein the passenger complaint information is: complaint information whose complaint time is within the dispatch time corresponding to the first historical bus dispatch data, such as: "waiting time is too long", and "the driver's attitude is bad";

[0184] Parse the passenger complaint information and obtain the complaint type of the first passenger complaint item; where the complaint type is: the type of complaint, such as hygiene, service attitude, and waiting time;

[0185] According to the complaint type, determine the second passenger complaint item of the target complaint type; wherein the target complaint type is: waiting time;

[0186] Obtaining the dissatisfaction degree according to the second passenger complaint item and a preset semantic analysis model; wherein the preset semantic analysis model is: a model for parsing and understanding language, which is used to analyze the passenger complaint text content and determine the passenger's dissatisfaction degree (dissatisfaction degree);

[0187] Obtain the historical complaint record of the target passenger corresponding to the second passenger complaint item; wherein the historical complaint record is: the complaint record recorded when the target passenger made a complaint in the past;

[0188] Extract complaint behavior features from historical complaint records; where complaint behavior features are: characteristic representations of complaint behaviors, such as: complaint frequency and complaint appeal status;

[0189] Obtain the malicious complaint degree determination database;

[0190] According to the complaint behavior characteristics and the malicious complaint degree determination library, the malicious complaint degree of the target passenger is obtained; wherein the malicious complaint degree determination library includes a plurality of one-to-one corresponding pre-selected complaint behavior characteristics and pre-selected malicious complaint degrees, and the malicious complaint degree indicates the malicious degree of the malicious complaint made by the complainant;

[0191] Obtain the downward adjustment value of the malicious complaint degree corresponding to the dissatisfaction degree; wherein, the higher the malicious complaint degree, the higher the downward adjustment value;

[0192] According to the downward adjustment value and the dissatisfaction, a removal value is determined, and the removal value is correspondingly associated with the first historical public transportation dispatch data; wherein the removal value is: the downward adjustment value and the dissatisfaction are correspondingly multiplied;

[0193] Accumulate the elimination values ​​associated with the first historical bus dispatch data to obtain the elimination degree;

[0194] Acquire the second historical public transport dispatch data whose rejection degree is less than a preset rejection degree threshold; wherein the preset rejection degree threshold is manually preset;

[0195] Based on the second historical bus dispatch data, train the bus dispatch model;

[0196] Among them, obtaining the malicious complaint degree determination database includes:

[0197] Obtain historical verification complaint records; among them, historical verification complaint records are: records of bus station staff handling passenger complaints;

[0198] Parse the historical verification complaint records to determine the one-to-one corresponding verification object and verification value; the verification object is: the historical complaint behavior characteristics; the verification value is: the maliciousness of the complainant corresponding to the historical complaint behavior characteristics as judged by the bus station staff;

[0199] According to the feature type of the verification object, a first verification strategy is obtained; wherein the feature type is: the type of behavioral feature; the first verification strategy is: a standardized verification method corresponding to the feature type, for example: if the feature type is: complaint frequency, then the first verification strategy is: checking whether the content of the complaint corresponding to the complaint frequency is true;

[0200] Obtain the actual second verification strategy of the verification object; the second verification strategy is: the actual second verification strategy is: the verification strategy actually adopted by the bus station staff on the verification object, for example: without checking the content of the complaint corresponding to the complaint frequency, directly judging that the historical complaint behavior characteristics with high complaint frequency have high maliciousness based on the complaint frequency;

[0201] Determining a verification standardization degree according to a strategy difference between the first verification strategy and the second verification strategy; wherein the smaller the strategy difference, the higher the corresponding verification standardization degree;

[0202] If the verification standardization is greater than or equal to a preset verification standardization threshold, the corresponding verification object and verification value are taken as the first item to be stored; wherein the preset verification standardization threshold is manually preset;

[0203] If the verification standardization is less than the preset verification standardization threshold, the verification experience of the verification subject is obtained; wherein the verification experience is: the working years of the complaint handling personnel in handling complaints;

[0204] If the verification experience is greater than or equal to a preset verification experience threshold, the verification object and verification value of the corresponding verification subject verification are taken as the second item to be stored; wherein the preset verification experience threshold is manually preset;

[0205] The first item to be stored and the second item to be stored are summarized to obtain a malicious complaint degree determination library.

[0206] The working principle and beneficial effects of the above technical solution are:

[0207] The present invention collects the first historical bus dispatch data and obtains the passenger complaint information corresponding to the first historical bus dispatch data; analyzes the passenger complaint information, obtains the complaint type of the first passenger complaint item, and determines the second passenger complaint item whose complaint type is the waiting time; introduces a semantic analysis model, and obtains the dissatisfaction of the target passenger according to the second passenger complaint item. Considering the possibility of malicious complaints by passengers, the historical complaint records of the target passengers are introduced, and the complaint behavior characteristics of the historical complaint records are extracted. At the same time, a malicious complaint degree determination library is obtained, and the complaint behavior characteristics are matched with the pre-selected complaint behavior characteristics in the malicious complaint degree determination library to determine the malicious complaint degree.

[0208] When obtaining the malicious complaint degree determination library, historical verification complaint records are introduced, and the first verification strategy is obtained according to the feature type of the verification object. At the same time, the second verification strategy actually adopted by the verification subject is obtained; the strategy differences between the first verification strategy and the second verification strategy are compared to determine the verification standardization degree. The smaller the difference between the actual verification strategy and the standard verification strategy, the higher the corresponding verification standardization degree; the corresponding verification objects and verification values ​​whose verification standardization degree is greater than or equal to the verification standardization degree threshold are screened as the first items to be stored; when the verification standardization degree is less than the verification standardization degree threshold, the verification experience of the verification subject is introduced. When the verification experience is greater than the verification experience threshold, it means that the verification subject has the ability to subjectively determine the verification object, and the verification object and verification value verified by the corresponding verification subject are taken as the second items to be stored; the first items to be stored and the second items to be stored are integrated to obtain the malicious complaint degree determination library, which improves the rationality of the construction of the malicious complaint degree determination library.

[0209] Based on the downward adjustment value of the malicious complaint degree corresponding to the dissatisfaction degree, the dissatisfaction degree is lowered to obtain the elimination value, and the elimination value is summed to obtain the elimination degree of the first historical bus dispatch data. The second historical bus dispatch data with a elimination degree less than the elimination degree threshold is selected for model training to obtain a bus dispatch model, and the training data is more suitable, which further improves the dispatch accuracy of the bus dispatch model.

[0210] In one embodiment, bus dispatching is performed according to the passenger flow clustering result, including:

[0211] According to the passenger flow clustering characteristics, a passenger flow determination template is constructed; wherein the passenger flow determination template is: a template for determining the passenger flow within a specific time period constructed based on the passenger flow clustering characteristics;

[0212] Determine a second target passenger flow according to the input time information and the passenger flow determination template; wherein the second target passenger flow is: the passenger flow corresponding to the input time determined according to the input time information and the passenger flow determination template;

[0213] According to the operation information corresponding to the input time information and the second target passenger flow, the bus dispatch is performed. Among them, the current operation information is: the operation status of the bus at the input time; when the bus dispatch is performed according to the current operation information corresponding to the input time information and the second target passenger flow, the second target passenger flow is displayed to the dispatcher, and the dispatcher changes the dispatch strategy.

[0214] The working principle and beneficial effects of the above technical solution are:

[0215] The present invention builds a passenger flow determination template based on passenger flow clustering characteristics, and determines the second target passenger flow according to input time information and the passenger flow determination template; the dispatcher determines and applies the dispatch strategy based on the operation information and the second target passenger flow, making the dispatch more flexible.

[0216] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A bus dispatching method based on contrastive learning and self-supervised time series clustering, characterized in that: include: Get the passenger flow time series; The passenger flow time series includes: one-to-one correspondence between historical moments and the number of passengers; Randomly crop the passenger flow time series to obtain the passenger flow intersection subsequences; Input the passenger flow time series and the passenger flow intersection subsequence into the encoder to obtain the original sequence potential representation and the subsequence potential representation; Calculate the contrast loss based on the subsequence latent representation; Calculate the reconstruction loss based on the potential representation of the original sequence; Cluster the potential representation of the original sequence and calculate the clustering loss; The contrast loss, reconstruction loss and clustering loss are combined to back propagate and optimize the network to obtain the passenger flow clustering result; the passenger flow clustering result is: the passenger flow characteristics corresponding to different time periods; Bus dispatch is carried out according to the passenger flow clustering results.

2. The bus dispatching method based on contrastive learning and self-supervised time series clustering as claimed in claim 1, characterized in that: The passenger flow time series is randomly cropped to obtain the passenger flow intersection subsequences, including: Randomly select the clipping length and starting position of the passenger flow time series; Randomly select the extension start and end positions and offsets; After all selections are completed, a list of cropping indexes is generated; According to the clipping index list, the passenger flow intersection subsequence is extracted from the passenger flow time series.

3. The bus dispatching method based on contrastive learning and self-supervised time series clustering as claimed in claim 1, characterized in that: The encoder performs the following operations: Mask the latent vector at randomly selected timestamps of the input sequence to obtain an enhanced contextual view; According to the context view, each channel of the time series is subjected to independent FFT transformation to obtain a comprehensive frequency domain representation F; Calculate the power spectrum of the integrated frequency domain representation and determine the dominant frequency components; Adaptively filter out the high-frequency components in the power spectrum and obtain F filtered ; Based on the global filter W G Learning from the comprehensive frequency domain representation F to obtain the first filtering feature; Based on the local filter W L From the adaptively filtered data F filtered Learning in the process, obtaining the second filtering feature; Integrate the first filter feature and the second filter feature to obtain frequency domain data; Convert the frequency domain data back to the time domain based on inverse fast Fourier transform to obtain reshaped time domain data; Pass the reshaped time domain data of the enhanced representation into the convolutional layer; The output of the convolutional layer is residually connected to the input sequence, and the number of output channels is adjusted through 1×1 convolution to output the potential representation of the input sequence. The convolutional layer consists of three layers of expanded one-dimensional convolutions with an exponential increase of 2, and each layer is supplemented by a ReLU activation function.

4. The bus dispatching method based on contrastive learning and self-supervised time series clustering as claimed in claim 1, characterized in that: According to the subsequence potential representation, the contrast loss is calculated, including: taking the latent representations of the same timestamp in the subsequences from the same passenger flow time series as the first positive pair, taking the latent representations of different timestamps in the subsequences from the same passenger flow time series as the first negative pair, and calculating the temporal contrast loss according to the first positive pair and the first negative pair; Taking the latent representations of the subsequences from the same passenger flow time series at the same timestamp as the second positive pair, taking the latent representations of the subsequences from different passenger flow time series at the same timestamp as the second negative pair, and calculating the instance contrast loss according to the second positive pair and the second negative pair; The contrastive loss is determined based on the time contrastive loss and the instance contrastive loss.

5. The bus dispatching method based on contrastive learning and self-supervised time series clustering as claimed in claim 1, characterized in that: According to the potential representation of the original sequence, the reconstruction loss is calculated, including: Process the original sequence potential representation through the GRU layer of the decoder to obtain the GRU output at each time step; Pass the GRU output to the normalization layer to return the processed prediction sequence; The reconstruction loss is calculated based on the passenger flow time series and the predicted series.

6. The bus dispatching method based on contrastive learning and self-supervised time series clustering as claimed in claim 1, characterized in that: Clustering is performed based on the potential representation of the original sequence, and the clustering loss is calculated, including: Perform fuzzy C-means clustering on the target sequence after the encoder to obtain the cluster label and cluster center of each target sequence; According to the cluster labels and cluster centers, the clustering loss based on the probability centroid is obtained.

7. The bus dispatching method based on contrastive learning and self-supervised time series clustering as claimed in claim 1, characterized in that: According to the passenger flow clustering results, bus dispatch is carried out, including: Based on the preset clustering result characterization rules, according to the passenger flow clustering results, the passenger flow clustering features are obtained, and the passenger flow clustering features include: date label, time period label and passenger flow range; Bus dispatch is carried out according to the clustering characteristics of passenger flow.

8. The bus dispatching method based on contrastive learning and self-supervised time series clustering as claimed in claim 7, characterized in that: According to the passenger flow clustering results, bus dispatch is carried out, including: Train the passenger flow prediction model based on the passenger flow clustering characteristics; Get input time information; estimating a first target passenger flow based on the input time information and the passenger flow estimation model; Get the bus dispatch model; Based on the bus dispatch model and according to the first target passenger flow, bus dispatch is carried out.

9. The bus dispatching method based on contrastive learning and self-supervised time series clustering as claimed in claim 8, characterized in that: Get the bus dispatch model, including: Collecting first historical bus dispatching data; the first historical bus dispatching data includes: historical driving status information of buses, historical passenger flow of target stations and historical departure strategies; Obtain passenger complaint information of a target station corresponding to the first historical bus dispatch data; Parse the passenger complaint information and obtain the complaint type of the first passenger complaint item; According to the complaint type, determine the second passenger complaint item of the target complaint type; Obtain the dissatisfaction degree according to the second passenger's complaint item and the preset semantic analysis model; Obtain the historical complaint record of the target passenger corresponding to the second passenger's complaint item; Extract complaint behavior characteristics from historical complaint records; Obtain the malicious complaint degree determination database; Determine the database based on the complaint behavior characteristics and malicious complaint degree to obtain the malicious complaint degree of the target passenger; Get the downward adjustment value of malicious complaints corresponding to dissatisfaction; Determine a removal value according to the downward adjustment value and the dissatisfaction, and associate the removal value with the first historical public transport dispatch data; Accumulate the elimination values ​​associated with the first historical bus dispatch data to obtain the elimination degree; Acquire the second historical public transportation dispatch data whose elimination degree is less than a preset elimination degree threshold; Based on the second historical bus dispatch data, the bus dispatch model is trained.

10. The bus dispatching method based on contrastive learning and self-supervised time series clustering according to claim 7, characterized in that: According to the passenger flow clustering results, bus dispatch is carried out, including: According to the clustering characteristics of passenger flow, a template for determining passenger flow is constructed; Determine the template according to the input time information and passenger flow, and determine the second target passenger flow; Bus dispatch is carried out according to the operation information corresponding to the input time information and the second target passenger flow.

Citation Information

Patent Citations

  • A joint dispatching method based on urban public transportation resources

    CN112417753B

  • Traffic flow prediction method based on similar time sequence comparison

    CN114662805A

  • Compound property prediction method based on subgraph network and comparative learning

    CN115511145A

  • Time sequence equipment fault diagnosis method based on comparison self-supervised learning

    CN116070128A

  • System and method for identifying object information in image or video data

    US20220188577A1