CN113762644B - Congestion state prediction method and device based on Markov chain - Google Patents

Congestion state prediction method and device based on Markov chain Download PDF

Info

Publication number
CN113762644B
CN113762644B CN202111131956.1A CN202111131956A CN113762644B CN 113762644 B CN113762644 B CN 113762644B CN 202111131956 A CN202111131956 A CN 202111131956A CN 113762644 B CN113762644 B CN 113762644B
Authority
CN
China
Prior art keywords
state
congestion state
congestion
carriage
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111131956.1A
Other languages
Chinese (zh)
Other versions
CN113762644A (en
Inventor
张亚南
吴洋
朱佳佳
程新洲
成晨
乔金剑
杨子敬
郝若晶
狄子翔
夏蕊
王昭宁
吕非彼
刘亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China United Network Communications Group Co Ltd
Original Assignee
China United Network Communications Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China United Network Communications Group Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN202111131956.1A priority Critical patent/CN113762644B/en
Publication of CN113762644A publication Critical patent/CN113762644A/en
Application granted granted Critical
Publication of CN113762644B publication Critical patent/CN113762644B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/16Matrix or vector computation, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Mathematical Physics (AREA)
  • Theoretical Computer Science (AREA)
  • Pure & Applied Mathematics (AREA)
  • Human Resources & Organizations (AREA)
  • Data Mining & Analysis (AREA)
  • Economics (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Analysis (AREA)
  • Strategic Management (AREA)
  • Computational Mathematics (AREA)
  • Computing Systems (AREA)
  • Development Economics (AREA)
  • General Business, Economics & Management (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Tourism & Hospitality (AREA)
  • Quality & Reliability (AREA)
  • Operations Research (AREA)
  • Game Theory and Decision Science (AREA)
  • Algebra (AREA)
  • Marketing (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a congestion state prediction method and a congestion state prediction device based on a Markov chain, which relate to the technical field of communication and are used for predicting the congestion state probability of passengers in each carriage of a subway and providing reference information for users to take a bus, and comprise the following steps: acquiring the carriage congestion states of N trains corresponding to the target stations in the historical time, and determining a congestion state transition probability matrix P according to the carriage congestion states of the N trains; the carriage crowding state comprises at least two states, wherein N is a positive integer, and P is a positive number; according to the congestion state transition probability matrix P, calculating the probability M that the carriage congestion state of each train corresponding to the target station in the future is the target state, wherein the target state is any one of at least two states, and M is greater than or equal to 0 and less than or equal to 1. The embodiment of the invention is applied to a scene of predicting the congestion state of passengers in the subway carriage.

Description

Congestion state prediction method and device based on Markov chain
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and an apparatus for predicting congestion states based on a markov chain.
Background
With the continuous development of modern traffic, users have become more and more popular to travel through public traffic, wherein the remote public traffic mainly comprises: train, high-speed railway, aircraft etc., the public transport of closely mainly includes: buses, subways, taxis, etc. Subway is the most special public traffic and is most concerned in urban travel.
However, in the current state, when passengers travel on the subway, as the subway has no fixed seats, and the number of carriages of the subway is large, the doors for selecting to ride when passengers ride on the subway have blindness and randomness, passengers in one carriage are exploded, and fewer passengers in other carriages are caused, so that the phenomenon that the difference of congestion states in different doors on the subway is large is caused, the public resource waste is caused to a certain extent, and the riding experience of partial passengers is poor.
Disclosure of Invention
The embodiment of the invention provides a congestion state prediction method and device based on a Markov chain, which are used for predicting the congestion state probability of passengers in each carriage of a subway and providing reference information for users to take a bus.
In order to achieve the above purpose, the embodiment of the present invention adopts the following technical scheme:
In a first aspect, there is provided a congestion state prediction method based on a markov chain, the method comprising: acquiring the carriage congestion states of N trains corresponding to the target stations in the historical time, and determining a congestion state transition probability matrix P according to the carriage congestion states of the N trains; the carriage crowding state comprises at least two states, wherein N is a positive integer, and P is a positive number; according to the congestion state transition probability matrix P, calculating the probability M that the carriage congestion state of each train corresponding to the target station in the future is the target state, wherein the target state is any one of at least two states, and M is greater than or equal to 0 and less than or equal to 1.
In one possible implementation, acquiring the car congestion status of N trains corresponding to the target station in the history time includes: acquiring the seat number and the passenger number in the carriage of each train in N trains corresponding to the target station in the history time, and determining the seat proportion corresponding to the carriage according to the seat number and the passenger number; and determining the carriage crowding state of each train according to the value range satisfied by the person-seat proportion, and corresponding to different carriage crowding states under the condition that the person-seat proportion satisfies different value ranges.
In one possible implementation, determining the congestion state transition probability matrix P from the car congestion states of the N trains includes: determining the congestion state transition probability of transition from a first target state to a second target state according to the carriage congestion state of N-1 groups of trains corresponding to N trains, wherein the first target state and the second target state are any one of at least two states; any one of the N-1 trains is two adjacent trains in the N trains; and determining a congestion state transition probability matrix P according to the determined plurality of congestion state transition probabilities.
In one possible implementation, according to the congestion state transition probability matrix P, calculating a probability M that a car congestion state of each train corresponding to the target station is a target state in a future time includes: according to each congestion state transition probability included in the congestion state transition probability matrix P, calculating the probability M that the carriage congestion state of the t-th train corresponding to the target station in the future time is the target state through a first algorithm; the first algorithm is as follows:
i and j are used for indicating the ith state or the jth state in at least two states, a is used for indicating the number of states included in at least two states, and a, i and j are all positive integers.
In one possible implementation, according to the congestion state transition probability matrix P, calculating a probability M that a car congestion state of each train corresponding to the target station is a target state in a future time includes: according to the congestion state transition probability matrix P and the initial congestion state probability vector M (0), calculating the probability M that the carriage congestion state of the t-th train corresponding to the target station in the future time is the target state through a second algorithm; wherein, the second algorithm is: m (t) =m (t-1) p=m (t-2) P 2 =M(0)P t ,M(0)=[M 1 (0),M 2 (0),M 3 (0),…,M a (0)]A is a positive integer, and M (0) is a congestion state probability vector of a carriage of the last train corresponding to the target station in the history time.
In a second aspect, there is provided a congestion state prediction apparatus based on a markov chain, the congestion state prediction apparatus based on a markov chain including: an acquisition unit, a determination unit, and a calculation unit; the acquisition unit is used for acquiring the carriage congestion state of N trains corresponding to the target station in the historical time; the determining unit is used for determining a congestion state transition probability matrix P according to the carriage congestion states of N trains; the carriage crowding state comprises at least two states, wherein N is a positive integer, and P is a positive number; the calculating unit is used for calculating the probability M that the carriage congestion state of each train corresponding to the target station is the target state in the future according to the congestion state transition probability matrix P, wherein the target state is any one of at least two states, and M is greater than or equal to 0 and less than or equal to 1.
In a third aspect, there is provided a computer readable storage medium storing one or more programs, the one or more programs comprising instructions, which when executed by a computer, cause the computer to perform a method of congestion state prediction based on a markov chain as in the first aspect.
In a fourth aspect, an electronic device includes: a processor and a memory; wherein the memory is configured to store one or more programs, the one or more programs comprising computer-executable instructions that, when executed by the electronic device, cause the electronic device to perform a markov chain-based congestion state prediction method as in the first aspect.
The embodiment of the invention provides a congestion state prediction method and device based on a Markov chain, which are applied to a scene of predicting the congestion state of passengers in subway carriages, and can determine a congestion state transition probability matrix P of a target station according to the carriage congestion state of N trains passing through the target station in the history time by acquiring the carriage congestion state of N trains corresponding to the target station in the history time. The method and the system can predict the congestion state probability of passengers in each carriage of the subway and provide reference information for the passengers to ride.
Drawings
Fig. 1 is a schematic diagram of a congestion status prediction system according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a congestion state prediction method based on a markov chain according to an embodiment of the present invention;
fig. 3 is a schematic flow chart II of a congestion state prediction method based on a markov chain according to an embodiment of the present invention;
fig. 4 is a schematic flow chart III of a congestion state prediction method based on a markov chain according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a congestion state prediction apparatus based on a markov chain according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an electronic device according to a second embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the accompanying drawings in the embodiments of the present invention.
In the description of the present invention, "/" means "or" unless otherwise indicated, for example, A/B may mean A or B. "and/or" herein is merely an association relationship describing an association object, and means that three relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist together, and B exists alone. Further, "at least one", "a plurality" means two or more. The terms "first," "second," and the like do not limit the number and order of execution, and the terms "first," "second," and the like do not necessarily differ.
The congestion state prediction method based on the Markov chain provided by the embodiment of the invention can be applied to a congestion state prediction system. Fig. 1 shows a schematic configuration of the congestion status prediction system. As shown in fig. 1, the congestion status prediction system 10 includes a data collection device 11, a data analysis device 12, and a data calculation device 13. The data acquisition device 11 is connected to a data analysis device 12, and the data analysis device 12 is connected to a data calculation device 13. The data acquisition device 11, the data analysis device 12 and the data calculation device 13 may be connected in a wired manner or may be connected in a wireless manner, which is not limited in the embodiment of the present invention.
The congestion state prediction system 10 may be used for the internet of things, and the congestion state prediction system 10 may include a plurality of central processing units (central processing unit, CPU), a plurality of memories, a storage device storing a plurality of operating systems, and other hardware.
The data acquisition device 11 may be used for the internet of things, and is disposed in an environment where data needs to be acquired, for example, the data acquisition device 11 may be a traffic sensor or an object recognition sensor, etc., may be disposed in a scene where traffic needs to be monitored, for example, a station entrance, a train door, a carriage, etc., and transmits the acquired data to the data analysis device 12.
The data analysis device 12 may also be used in the internet of things, and is configured to receive real-time data sent by the data acquisition device 11, and store the received data for future use, where the further data analysis device 12 may further perform specific analysis on the received data to perform labeling or data classification, and other processes.
The data computing device 13 may also be used in the internet of things, and is configured to calculate the data after being analyzed and processed by the data analyzing device 12, so as to calculate and obtain predicted data in future time for reference of a user.
It should be noted that the data acquisition device 11, the data analysis device 12, and the data calculation device 13 may be independent devices, or may be integrated in the same device, which is not particularly limited in the present invention.
When the data acquisition device 11, the data analysis device 12 and the data calculation device 13 are integrated in the same device, the communication manner among the data acquisition device 11, the data analysis device 12 and the data calculation device 13 is communication among the internal modules of the device. In this case, the communication flow therebetween is the same as "in the case where the data acquisition device 11, the data analysis device 12, and the data calculation device 13 are independent of each other".
In the following embodiments provided by the present invention, the present invention is described taking an example in which the data acquisition device 11, the data analysis device 12, and the data calculation device 13 are provided independently of each other.
The following describes a congestion state prediction method based on a markov chain according to an embodiment of the present invention with reference to the accompanying drawings.
As shown in fig. 2, the method for predicting congestion state based on markov chain provided by the embodiment of the present invention is applied to a congestion state predicting device based on markov chain including a plurality of memories and a plurality of central processing units CPU, and includes S201-S202:
s201, acquiring the carriage congestion states of N trains corresponding to the target stations in the historical time, and determining a congestion state transition probability matrix P according to the carriage congestion states of the N trains.
The carriage crowding state comprises at least two states, wherein N is a positive integer, and P is a positive number.
As a possible implementation manner, when it is required to predict the car congestion state of the train passing in the next time of the destination station, the car congestion state of the multi-trip train passing through the destination station before the current moment may be acquired, and the corresponding congestion state transition probability matrix P may be constructed according to the acquired car congestion state of the multi-trip train.
It should be noted that, the above-mentioned train may be a subway, and the car congestion state of the train may be understood as a congestion state in any car on the subway, and because the doors selected by passengers to take the train have blindness and randomness, the congestion states in different cars on the subway have large differences, and by the embodiment of the present invention, the congestion state in each car may be predicted.
As a possible implementation manner, the congestion state transition probability matrix P includes a plurality of congestion state transition probabilities, and each congestion state transition probability is used to indicate a congestion state change condition from a previous train to a next train in a carriage corresponding to two adjacent trains.
The carriages corresponding to the two adjacent trains can be understood as two carriages corresponding to the two trains when the different trains corresponding to the same door of the platform stop.
As one possible implementation, the cabin congestion state may include at least two states: extremely comfortable state (first state), comfortable state (second state), general state (third state), crowded state (fourth state), extremely crowded state (fifth state).
S202, calculating the probability M that the carriage congestion state of each train corresponding to the target station is the target state in the future time according to the congestion state transition probability matrix P.
Wherein the target state is any one of at least two states, M is greater than or equal to 0 and less than or equal to 1.
As one possible implementation, the congestion state transition probability matrix P is used to indicate the probability that the car congestion state of two adjacent trains transitions from one state to another in a plurality of trains past the destination station.
By way of example, by the congestion state transition probability matrix P, the probability of a car congestion state of two adjacent trains transitioning from an extremely comfortable state to an extremely comfortable state, from an extremely comfortable state to a general state, from an extremely comfortable state to a congestion state, from an extremely comfortable state to an extremely congested state, and so on can be indicated as 25 kinds of congestion state transition probabilities.
As a possible implementation manner, in the congestion state transition probability matrix P, P is used for ij Indicating the probability of transitioning from the i-th state to the j-th state.
In the embodiment of the invention, the congestion state in the carriage corresponding to all the doors in the target station is determined to obtain the congestion state transition probability matrix P through the congestion state transition probabilities in the carriage corresponding to the multi-shift subway passing through the target station before the current moment, so that the congestion state probability of the t-th train passing through the target station in the future after the current moment is deduced according to the congestion state transition probability matrix P, the initial state probability vector is determined according to the carriage congestion state of the t=0 moment (namely the congestion state of the last shift train before the current moment), and finally the congestion state probability prediction result of the t-th train after the current moment is calculated.
In one design, in order to obtain the car congestion status of N trains corresponding to the target station in the history time, as shown in fig. 3, in S201 provided by the embodiment of the present invention, "the car congestion status of N trains corresponding to the target station in the history time" may specifically include the following S301 to S302.
S301, acquiring the number of seats and the number of passengers in the carriage of each train in N trains corresponding to the target station in the history time, and determining the proportion of the seats corresponding to the carriage according to the number of seats and the number of passengers.
As one possible implementation manner, the corresponding seat ratio is obtained by acquiring the seat number and the passenger number in each carriage of the multi-trip train passing through the destination station before the current moment and then calculating the ratio of the passenger number and the seat number in each carriage.
S302, determining the carriage crowding state of each train according to the value range satisfied by the proportion of the seats.
Under the condition that the proportion of the seats meets different value ranges, different carriage crowding states are corresponding.
As a possible implementation manner, the congestion state in the carriage can be determined according to the correspondence between the proportion of the seats in each carriage and a plurality of preset value ranges.
Illustratively, the number of seats in the vehicle cabin is denoted as S, the number of passengers in the vehicle cabin is denoted as T, and the proportion of seats in the vehicle cabin may be denoted as: r=t/S; and a plurality of value ranges can be preset: specifically, when R is E (0, 1/2), the congestion state in the carriage is an extremely comfortable state (first state), when R is E (1/2, 1), the congestion state in the carriage is a comfortable state (second state), when R epsilon (1, 3/2), the congestion state in the vehicle cabin is a "normal state (third state)", when R epsilon (3/2, 5/2), the congestion state in the vehicle cabin is a "congestion state (fourth state)", when R epsilon (5/2, ++ infinity), the congestion state in the vehicle cabin is an "extremely congestion state (fifth state)", and both S and T are positive integers.
In the embodiment of the invention, a congestion state prediction method based on a Markov chain is provided, specifically, the probability of congestion states in all subway door numbers of a train shift after the current moment of a target station can be predicted through the method, and the congestion state in a carriage is determined through the proportion of people seats in the carriage; obtaining a congestion state transition probability matrix P through the compartment congestion state transition probability of the multi-pass train passing through the target station before the current moment; and further deducing a carriage congestion state probability formula of the train which is about to pass through the target station after the current moment, and determining and calculating a carriage congestion state probability prediction result of the train which is about to reach the target station according to the congestion state of the last train which passes through the target station before the current moment.
In one design, in order to determine the congestion state transition probability matrix P according to the car congestion state of the N trains, as shown in fig. 4, in S201 provided by the embodiment of the present invention, "determining the congestion state transition probability matrix P according to the car congestion state of the N trains" may specifically include the following S401 to S402.
S401, determining the congestion state transition probability of transition from a first target state to a second target state according to the carriage congestion state of N-1 groups of trains corresponding to N trains.
Wherein the first target state and the second target state are any one of at least two states; any one of the N-1 trains is two adjacent trains in the N trains.
S402, determining a congestion state transition probability matrix P according to the determined plurality of congestion state transition probabilities.
As a possible implementation, based on N trains passing through the destination station before the current moment, N-1 trains may be determined, thereby determining N-1 congestion state transition probabilities.
The extremely comfortable state (first state) described above may be represented by E1, the comfortable state (second state) may be represented by E2, the general state (third state) may be represented by E3, the crowded state (fourth state) may be represented by E4, and the extremely crowded state (fifth state) may be represented by E5.
The transition from one of the above five states to the other is exemplified by the congestion state transition procedure, which is defined as the ithThe state transition probability of the state transition to the j-th state is P ij I.e. P (E) i -E j )=P(E j /E i )=P ij Thus, the congestion state transition probability matrix P is obtained as:
wherein, the condition needs to be satisfied:
Specifically, if 40 trains passing through the destination station before the current moment are crowded at the destination station, the following table is provided:
list one
Shift number 1 2 3 4 5 6 7 8 9 10
Status of E1 E1 E2 E1 E2 E2 E3 E2 E3 E3
Shift number 11 12 13 14 15 16 17 18 19 20
Status of E4 E4 E3 E3 E4 E5 E5 E4 E5 E4
Shift number 21 22 23 24 25 26 27 28 29 30
Status of E2 E3 E2 E3 E3 E4 E3 E2 E2 E1
Shift number 31 32 33 34 35 36 37 38 39 40
Status of E1 E2 E2 E3 E2 E4 E3 E4 E3 E4
As can be seen from the table, among the 5 transitions from the E1 state to the other states included in the above table, 2 transitions from the E1 state to the E1 state, and 3 transitions from the E1 state to the E2 state, and thus,
of the 11 transitions from the E2 state to the other states included in the above table, 2 transitions from the E2 state to the E1 state, 3 transitions from the E2 state to the E2 state, 5 transitions from the E2 state to the E3 state, and 1 transition from the E2 state to the E4 state, and thus,
of the 12 transitions from the E3 state to the other states included in the above table, 4 transitions from the E3 state to the E2 state, 3 transitions from the E3 state to the E3 state, and 5 transitions from the E3 state to the E4 state, and thus,
of the 4 transitions from the E4 state to the other states included in the above table, 1 transitions from the E4 state to the E2 state, 4 transitions from the E4 state to the E3 state, 1 transitions from the E4 state to the E4 state, and 2 transitions from the E4 state to the E5 state, and thus,
Of the 3 transitions from the E5 state to the other states included in the above table, 2 transitions from the E5 state to the E4 state, and 1 transitions from the E5 state to the E5 state, and thus,
the congestion state transition probability matrix P can thus be obtained as:
in the embodiment of the invention, the congestion state transition probability of transitioning from any one state to any other state of at least two states can be determined according to the carriage congestion state of N-1 groups of trains corresponding to N trains passing through the target station before the current moment, so that the congestion state transition probability matrix P is determined according to a plurality of congestion state transition probabilities, and the probability M that the carriage congestion state of the t-th train corresponding to the target station in the future time is the target state is calculated.
In one design, in order to calculate, according to the congestion state transition probability matrix P, the probability M that the car congestion state of each train corresponding to the destination station is the destination state in the future time, S202 provided by the embodiment of the present invention may specifically include the following S501.
S501, calculating the probability M that the carriage congestion state of the t-th train corresponding to the target station is the target state in the future time through a first algorithm according to each congestion state transition probability included in the congestion state transition probability matrix P.
The first algorithm is as follows:i and j are used for indicating the ith state or the jth state in at least two states, a is used for indicating the number of states included in at least two states, and a, i and j are all positive integers.
As a possible implementation manner, in order to predict the congestion state probability of the passing train in the development process of the target station along with time, the probability of the congestion state of the t-th train after the current moment is recorded as M j (t)。
Thus, starting from the time t=0 (i.e. the last train passing the destination station before the current time), after a t congestion state transition, i.e. when the t trains arrive at the destination station, there isThe congestion state of the train reaching the target station after t-1 times of congestion state transition can be regarded as E j E after another congestion state transition j+1 There is->
In one design, in order to calculate the probability M that the car congestion state of each train corresponding to the destination station is the destination state in the future according to the congestion state transition probability matrix P, the embodiment of the present invention provides S202, which may specifically include S601 described below.
S601, calculating the probability M that the carriage congestion state of the t-th train corresponding to the target station is the target state in the future time through a second algorithm according to the congestion state transition probability matrix P and the initial congestion state probability vector M (0).
Wherein, the second algorithm is: m (t) =m (t-1) p=m (t-2) P 2 =M(0)P t ,M(0)=[M 1 (0),M 2 (0),M 3 (0),…,M a (0)]A is a positive integer, and M (0) is a congestion state probability vector of a carriage of the last train corresponding to the target station in the history time.
As a possible implementation manner, the initial state probability vector may be determined to be M (0) = [ M ] by the congestion state corresponding to the last train passing through the target station before the current moment 1 (0),M 2 (0),M 3 (0),M 4 (0),M 5 (0)]The probability M (t) of the t-th train passing through the target station after the current moment being in various crowded states in at least two states can be obtained.
Thus, it is possible to obtain:
for example, according to the specific data in the above table one, in the case where the car congestion state of the last train before the current time is E4, the initial state probability vector may be determined to be M (0) = [0, 1,0], and the state probability matrices P and M (0) are substituted into the formula nine, so that the probability that the congestion state corresponding to the train passing through the destination station after the current time is each of at least two states may be calculated.
Watch II
The embodiment of the invention provides a congestion state prediction method and device based on a Markov chain, which are applied to a scene of predicting the congestion state of passengers in subway carriages, and can determine a congestion state transition probability matrix P of a target station according to the carriage congestion state of N trains passing through the target station in the history time by acquiring the carriage congestion state of N trains corresponding to the target station in the history time. The method and the system can predict the congestion state probability of passengers in each carriage of the subway and provide reference information for the passengers to ride.
The foregoing description of the solution provided by the embodiments of the present invention has been mainly presented in terms of a method. To achieve the above functions, it includes corresponding hardware structures and/or software modules that perform the respective functions. Those of skill in the art will readily appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The embodiment of the invention can divide the function modules of the congestion state prediction device based on the Markov chain according to the method example, for example, each function module can be divided corresponding to each function, and two or more functions can be integrated in one processing module. The integrated modules may be implemented in hardware or in software functional modules. Optionally, the division of the modules in the embodiment of the present invention is schematic, which is merely a logic function division, and other division manners may be implemented in practice.
Fig. 5 is a schematic structural diagram of a congestion state prediction apparatus based on a markov chain according to an embodiment of the present invention. As shown in fig. 5, a markov chain-based congestion state prediction apparatus 50 is configured to predict a probability of a congestion state of a passenger in each compartment of a subway, and provide reference information for a user to ride, for example, to perform a markov chain-based congestion state prediction method shown in fig. 2. The congestion state prediction apparatus 50 based on a markov chain includes: an acquisition unit 501, a determination unit 502, and a calculation unit 503.
An obtaining unit 501, configured to obtain a car congestion state of N trains corresponding to a target station in a history time.
A determining unit 502, configured to determine a congestion state transition probability matrix P according to the car congestion states of the N trains; the car congestion state includes at least two states, N is a positive integer, and P is a positive number.
A calculating unit 503, configured to calculate, according to the congestion state transition probability matrix P, a probability M that a car congestion state of each train corresponding to the destination station is a destination state in a future time, where the destination state is any one of at least two states, and M is greater than or equal to 0 and less than or equal to 1.
Optionally, as shown in fig. 5, the acquiring unit 501 provided in the embodiment of the present invention is specifically configured to acquire the number of seats and the number of passengers in the carriage of each train in N trains corresponding to the target station in the history time.
The determining unit 502 is further configured to determine a person-seat ratio corresponding to the cabin according to the seat number and the passenger number.
The determining unit 502 is further configured to determine a car congestion status of each train according to a value range satisfied by the seat ratio, where the seat ratio satisfies different value ranges, and corresponds to different car congestion statuses.
Optionally, as shown in fig. 5, the determining unit 502 provided in the embodiment of the present invention is specifically configured to determine, according to a car congestion state of an N-1 group of trains corresponding to N trains, a congestion state transition probability for transitioning from a first target state to a second target state, where the first target state and the second target state are both any one of at least two states; any one of the N-1 trains is two adjacent trains in the N trains.
The determining unit 502 is further configured to determine a congestion state transition probability matrix P according to the determined plurality of congestion state transition probabilities.
Optionally, as shown in fig. 5, an embodiment of the present invention provides a calculating unit 503, specifically configured to transition the probability moment according to the congestion state Each congestion state transition probability included in the matrix P is used for calculating the probability M that the carriage congestion state of the t-th train corresponding to the target station in the future time is the target state through a first algorithm; the first algorithm is as follows: i and j are used for indicating the ith state or the jth state in at least two states, a is used for indicating the number of states included in at least two states, and a, i and j are all positive integers.
Optionally, as shown in fig. 5, the embodiment of the present invention provides a calculating unit 503, specifically configured to calculate, according to the congestion state transition probability matrix P and the initial congestion state probability vector M (0), a probability M that a car congestion state of a t-th train corresponding to a target station in a future time is a target state by using a second algorithm; wherein, the second algorithm is: m (t) =m (t-1) p=m (t-2) P 2 =M(0)P t ,M(0)=[M 1 (0),M 2 (0),M 3 (0),…,M a (0)]a is a positive integer, and M (0) is a congestion state probability vector of a carriage of the last train corresponding to the target station in the history time.
In the case of implementing the functions of the integrated modules in the form of hardware, another possible structural schematic diagram of the electronic device involved in the above embodiment is provided in the embodiment of the present invention. As shown in fig. 6, an electronic device 60 is provided for predicting the probability of a congestion state of a passenger in each car of a subway, providing reference information for a user to ride, for example, for performing a markov chain-based congestion state prediction method shown in fig. 2. The electronic device 60 comprises a processor 601, a memory 602 and a bus 603. The processor 601 and the memory 602 may be connected by a bus 603.
The processor 601 is a control center of the communication device, and may be one processor or a collective term of a plurality of processing elements. For example, the processor 601 may be a general-purpose central processing unit (central processing unit, CPU), or may be another general-purpose processor. Wherein the general purpose processor may be a microprocessor or any conventional processor or the like.
As one example, processor 601 may include one or more CPUs, such as CPU 0 and CPU 1 shown in fig. 6.
The memory 602 may be, but is not limited to, a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (random access memory, RAM) or other type of dynamic storage device that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), magnetic disk storage or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer.
As a possible implementation, the memory 602 may exist separately from the processor 601, and the memory 602 may be connected to the processor 601 through the bus 603 for storing instructions or program codes. The processor 601, when invoking and executing instructions or program code stored in the memory 602, is capable of implementing a markov chain-based congestion state prediction method provided by an embodiment of the present invention.
In another possible implementation, the memory 602 may also be integrated with the processor 601.
Bus 603 may be an industry standard architecture (Industry Standard Architecture, ISA) bus, a peripheral component interconnect (Peripheral Component Interconnect, PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, among others. The bus may be classified as an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in fig. 6, but not only one bus or one type of bus.
It should be noted that the structure shown in fig. 6 does not constitute a limitation of the electronic device 60. The electronic device 60 may include more or fewer components than shown in fig. 6, or may combine certain components or a different arrangement of components.
As an example, in connection with fig. 5, the acquisition unit 501, the determination unit 502, and the calculation unit 503 in the electronic device realize the same functions as the processor 601 in fig. 6.
Optionally, as shown in fig. 6, the electronic device 60 provided by the embodiment of the present invention may further include a communication interface 604.
Communication interface 604 for connecting with other devices via a communication network. The communication network may be an ethernet, a radio access network, a wireless local area network (wireless local area networks, WLAN), etc. The communication interface 604 may include a receiving unit for receiving data and a transmitting unit for transmitting data.
In one design, the electronic device provided in the embodiment of the present invention may further include a communication interface integrated in the processor.
Fig. 7 shows another hardware structure of the electronic device in the embodiment of the invention. As shown in fig. 7, the electronic device 80 may include a processor 801, a communication interface 802, a memory 803, and a bus 804. The processor 801 is coupled to a communication interface 802 and a memory 803.
The function of the processor 801 may be as described above with reference to the processor 601. The processor 801 also has a memory function, and can refer to the function of the memory 602.
The communication interface 802 is used to provide data to the processor 801. The communication interface 802 may be an internal interface of the communication device or an external interface of the communication device (corresponding to the communication interface 604).
It should be noted that the structure shown in fig. 7 does not constitute a limitation of the electronic device 80, and the electronic device 80 may include more or less components than those shown in fig. 7, or may combine some components, or may be arranged in different components.
From the above description of embodiments, it will be apparent to those skilled in the art that the foregoing functional unit divisions are merely illustrative for convenience and brevity of description. In practical applications, the above-mentioned function allocation may be performed by different functional units, i.e. the internal structure of the device is divided into different functional units, as needed, to perform all or part of the functions described above. The specific working processes of the above-described systems, devices and units may refer to the corresponding processes in the foregoing method embodiments, which are not described herein.
The embodiment of the invention also provides a computer readable storage medium, wherein the computer readable storage medium stores instructions, when the computer executes the instructions, the computer executes each step in the method flow shown in the method embodiment.
Embodiments of the present invention provide a computer program product comprising instructions which, when run on a computer, cause the computer to perform a markov chain-based congestion state prediction method as in the method embodiments described above.
The computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: electrical connections having one or more wires, portable computer diskette, hard disk. Random access Memory (Random Access Memory, RAM), read-Only Memory (ROM), erasable programmable Read-Only Memory (Erasable Programmable Read Only Memory, EPROM), registers, hard disk, optical fiber, portable compact disc Read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any other form of computer-readable storage medium suitable for use by a person or persons of skill in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an application specific integrated circuit (Application Specific Integrated Circuit, ASIC). In embodiments of the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
Since the electronic device, the computer readable storage medium, and the computer program product in the embodiments of the present invention can be applied to the above-mentioned method, the technical effects that can be obtained by the method can also refer to the above-mentioned method embodiments, and the embodiments of the present invention are not described herein again.
The present invention is not limited to the above embodiments, and any changes or substitutions within the technical scope of the present invention should be covered by the scope of the present invention.

Claims (10)

1. A congestion state prediction method based on a markov chain, applied to a congestion state prediction device based on a markov chain, comprising:
acquiring the carriage congestion states of N trains corresponding to the target stations in the historical time, and determining a congestion state transition probability matrix P according to the carriage congestion states of the N trains; the carriage crowding state comprises at least two states, wherein N is a positive integer, and P is a positive number;
according to the congestion state transition probability matrix P, calculating the probability M that the carriage congestion state of each train corresponding to the target station in the future time is a target state, wherein the target state is any one state of the at least two states, and M is greater than or equal to 0 and less than or equal to 1;
The determining the congestion state transition probability matrix P includes:
determining the congestion state transition probability of transitioning from any one state to any other state of at least two states according to the carriage congestion state of N-1 groups of trains corresponding to N trains passing through the target station before the current moment; the car congestion state includes: a car congestion state, a comfort state, a general state, a congestion state, or an extremely congested state;
determining a congestion state transition probability matrix P according to the plurality of congestion state transition probabilities;
according to the congestion state transition probability matrix P, calculating the probability M that the congestion state of each train corresponding to the target station is the target state in the future time, including:
according to each congestion state transition probability included in the congestion state transition probability matrix P, calculating the probability M that the carriage congestion state of the t-th train corresponding to the target station in the future time is the target state through a first algorithm;
wherein the first algorithm is:i and j are used for indicating the ith state or the jth state in the at least two states, a is used for indicating the state quantity included in the at least two states, and a, i and j are all positive integers.
2. The method of claim 1, wherein obtaining the car congestion status of N trains corresponding to the destination station in the history time comprises:
acquiring the seat number and the passenger number in the carriage of each train in N trains corresponding to the target station in the history time, and determining the corresponding person-seat proportion of the carriage according to the seat number and the passenger number;
and determining the carriage crowding state of each train according to the value range satisfied by the person-seat proportion, and corresponding to different carriage crowding states under the condition that the person-seat proportion satisfies different value ranges.
3. The method according to claim 1 or 2, wherein said determining a congestion state transition probability matrix P from the car congestion states of the N trains comprises:
determining congestion state transition probability for transitioning from a first target state to a second target state according to carriage congestion states of N-1 groups of trains corresponding to the N trains, wherein the first target state and the second target state are any one of the at least two states; any one of the N-1 trains is two adjacent trains in the N trains;
And determining the congestion state transition probability matrix P according to the determined multiple congestion state transition probabilities.
4. The method according to claim 1 or 2, wherein calculating the probability M that the car congestion state of each train corresponding to the destination station is the destination state in the future time according to the congestion state transition probability matrix P includes:
according to the congestion state transition probability matrix P and the initial congestion state probability vector M (0), calculating the probability M that the carriage congestion state of the t-th train corresponding to the target station in the future time is the target state through a second algorithm;
wherein the second algorithm is: m (t) =m (t-1) p=m (t-2) P 2 =M(0)P t ,M(0)=[M 1 (0),M 2 (0),M 3 (0),…,M a (0)]A is a positive integer, and M (0) is a congestion state probability vector of a carriage of the last train corresponding to the target station in the history time.
5. A congestion state prediction apparatus based on a markov chain, comprising: an acquisition unit, a determination unit, and a calculation unit;
the acquisition unit is used for acquiring carriage congestion states of N trains corresponding to the target stations in the historical time;
the determining unit is used for determining a congestion state transition probability matrix P according to the carriage congestion state of the N trains; the carriage crowding state comprises at least two states, wherein N is a positive integer, and P is a positive number;
The calculating unit is configured to calculate, according to the congestion state transition probability matrix P, a probability M that a car congestion state of each train corresponding to a target station in a future time is a target state, where the target state is any one of the at least two states, and M is greater than or equal to 0 and less than or equal to 1;
the determining unit is further used for determining the congestion state transition probability of transitioning from any one state to any other state of at least two states according to the carriage congestion state of the N-1 group of trains corresponding to the N trains passing through the target station before the current moment; the car congestion state includes: a car congestion state, a comfort state, a general state, a congestion state, or an extremely congested state; determining a congestion state transition probability matrix P according to the plurality of congestion state transition probabilities;
the calculating unit is specifically configured to calculate, according to each congestion state transition probability included in the congestion state transition probability matrix P, a probability M that a car congestion state of a t-th train corresponding to a target station in a future time is a target state by using a first algorithm;
wherein the first algorithm is:i and j are used for indicating an ith state or a jth state in the at least two states, a is used for indicating the state quantity included in the at least two states, and a, i and j are all positive integers; .
6. The congestion state prediction apparatus based on a markov chain according to claim 5, wherein the acquiring unit is specifically configured to acquire a number of seats and a number of passengers in a car of each of N trains corresponding to a target station in a history time;
the determining unit is further used for determining the proportion of the seats corresponding to the carriage according to the seat number and the passenger number;
the determining unit is further configured to determine a car congestion state of each train according to a value range satisfied by the seat proportion, where the seat proportion satisfies different value ranges, and corresponds to different car congestion states.
7. The device for predicting congestion state based on markov chain according to claim 5 or 6, wherein the determining unit is specifically configured to determine a congestion state transition probability for transitioning from a first target state to a second target state according to a car congestion state of the N-1 group of trains corresponding to the N trains, where the first target state and the second target state are each any one of the at least two states; any one of the N-1 trains is two adjacent trains in the N trains;
The determining unit is further configured to determine the congestion state transition probability matrix P according to the determined plurality of congestion state transition probabilities.
8. The device for predicting congestion status based on markov chain according to claim 5 or 6, wherein the calculating unit is specifically configured to calculate, according to the congestion status transition probability matrix P and the initial congestion status probability vector M (0), a probability M that a car congestion status of a t-th train corresponding to a destination station in a future time is a destination status by a second algorithm;
wherein the second algorithm is: m (t) =m (t-1) p=m (t-2) P 2 =M(0)P t ,M(0)=[M 1 (0),M 2 (0),M 3 (0),…,M a (0)]A is a positive integer, and M (0) is a congestion state probability vector of a carriage of the last train corresponding to the target station in the history time.
9. A computer readable storage medium storing one or more programs, wherein the one or more programs comprise instructions, which when executed by a computer, cause the computer to perform a markov chain based congestion state prediction method according to any one of claims 1 to 4.
10. An electronic device, comprising: a processor and a memory; wherein the memory is configured to store one or more programs, the one or more programs comprising computer-executable instructions that, when executed by the electronic device, cause the electronic device to perform a markov chain-based congestion state prediction method of any one of claims 1-4.
CN202111131956.1A 2021-09-26 2021-09-26 Congestion state prediction method and device based on Markov chain Active CN113762644B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111131956.1A CN113762644B (en) 2021-09-26 2021-09-26 Congestion state prediction method and device based on Markov chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111131956.1A CN113762644B (en) 2021-09-26 2021-09-26 Congestion state prediction method and device based on Markov chain

Publications (2)

Publication Number Publication Date
CN113762644A CN113762644A (en) 2021-12-07
CN113762644B true CN113762644B (en) 2023-11-24

Family

ID=78797557

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111131956.1A Active CN113762644B (en) 2021-09-26 2021-09-26 Congestion state prediction method and device based on Markov chain

Country Status (1)

Country Link
CN (1) CN113762644B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103413443A (en) * 2013-07-03 2013-11-27 太原理工大学 Short-term traffic flow forecasting method based on hidden Markov model
CN104200661A (en) * 2014-09-05 2014-12-10 厦门大学 Method for forecasting state changes of road traffic system
CN104616498A (en) * 2015-02-02 2015-05-13 同济大学 Markov chain and neural network based traffic congestion state combined prediction method
CN107215363A (en) * 2017-06-12 2017-09-29 中国联合网络通信集团有限公司 Passenger's queuing bootstrap technique and guiding system in a kind of subway station
CN109460023A (en) * 2018-11-09 2019-03-12 上海理工大学 Driver's lane-changing intention recognition methods based on Hidden Markov Model
CN109977927A (en) * 2019-04-25 2019-07-05 苏州雷格特智能设备股份有限公司 A kind of train passenger crowding early warning system
CN110458056A (en) * 2019-07-29 2019-11-15 交控科技股份有限公司 Compartment crowding detection method and device
CN110659549A (en) * 2018-06-29 2020-01-07 华为技术有限公司 Method and device for notifying congestion degree of train
CN112124379A (en) * 2020-09-29 2020-12-25 合肥工业大学 Platform guiding method based on subway passenger flow analysis

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7788205B2 (en) * 2006-05-12 2010-08-31 International Business Machines Corporation Using stochastic models to diagnose and predict complex system problems

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103413443A (en) * 2013-07-03 2013-11-27 太原理工大学 Short-term traffic flow forecasting method based on hidden Markov model
CN104200661A (en) * 2014-09-05 2014-12-10 厦门大学 Method for forecasting state changes of road traffic system
CN104616498A (en) * 2015-02-02 2015-05-13 同济大学 Markov chain and neural network based traffic congestion state combined prediction method
CN107215363A (en) * 2017-06-12 2017-09-29 中国联合网络通信集团有限公司 Passenger's queuing bootstrap technique and guiding system in a kind of subway station
CN110659549A (en) * 2018-06-29 2020-01-07 华为技术有限公司 Method and device for notifying congestion degree of train
CN109460023A (en) * 2018-11-09 2019-03-12 上海理工大学 Driver's lane-changing intention recognition methods based on Hidden Markov Model
CN109977927A (en) * 2019-04-25 2019-07-05 苏州雷格特智能设备股份有限公司 A kind of train passenger crowding early warning system
CN110458056A (en) * 2019-07-29 2019-11-15 交控科技股份有限公司 Compartment crowding detection method and device
CN112124379A (en) * 2020-09-29 2020-12-25 合肥工业大学 Platform guiding method based on subway passenger flow analysis

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"城市轨道交通车站设施服务水平评价研究";宁尧;《中国优秀硕士学位论文全文数据库 (工程科技Ⅱ辑)》;第C033-160页 *
轨道交通站台拥挤指数计算模型;刘映池;朱顺应;彭增辉;胡磊;郑骞;王红;;物流技术(第04期);第74-79页 *

Also Published As

Publication number Publication date
CN113762644A (en) 2021-12-07

Similar Documents

Publication Publication Date Title
CN110189006B (en) Scheduling method and device for vehicle, computer equipment and storage medium thereof
Kim et al. Does crowding affect the path choice of metro passengers?
CN102867408B (en) Method for selecting bus trip route
CN103049817A (en) Demand type shared transportation service method combined with load balancing mechanism
CN112262418A (en) Vehicle management system and vehicle management method
US20210311498A1 (en) Operation management device, operation management method, and transportation system
CN111079986B (en) Matching method and system for transport capacity of transfer station
CN112465213A (en) Auxiliary device and method of subway passenger information service system
CN112686435A (en) Scheduling method, scheduling device and terminal equipment
CN111757270A (en) Method and device for identifying overmaning vehicle
CN113762644B (en) Congestion state prediction method and device based on Markov chain
Habibullah et al. A Driver-Centric Carpooling: Optimal Route-Finding Model Using Heuristic Multi-Objective Search
CN112183889B (en) Riding route recommendation method and device
CN110598246A (en) Improved lane side capacity optimization design method
JP7359083B2 (en) Vehicle allocation planning device, vehicle allocation planning system, and vehicle allocation planning program
CN116772877B (en) Method, system, device and medium for predicting endurance mileage of new energy automobile
Csiszár Model of multimodal mobility coordination and guiding system
Shih et al. Trip assignment model for timed-transfer transit systems
CN116935643A (en) Traffic management method, device, equipment and storage medium
CN108230670B (en) Method and apparatus for predicting number of mobile bodies appearing at given point in given time period
Odeyale et al. PERFORMANCE EVALUATION AND SELECTION OF BEST MODE OF TRANSPORTATION IN LAGOS STATE METROPOLIS.
Li et al. Near-optimal fixed-route scheduling for crowdsourced transit system
CN113205392A (en) Network appointment vehicle responsibility judgment method and device and computer storage medium
Szimba et al. How beneficial is fully automated driving in urban areas from a socio-economic point of view
Sarma et al. On-Demand Ride-Pooling with Walking Legs: Decomposition Approach for Dynamic Matching and Virtual Stops Selection

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant