Vehicle control method, device, vehicle and computer storage medium

By receiving parking requests and signal information, the system controls vehicles for vehicle-based dispatching, solving the problem of low efficiency of road-based dispatching in light urban rail transit systems and achieving efficient vehicle dispatching.

CN115123343BActive Publication Date: 2025-09-09BYD CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202110320419.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-25
Publication Date
2025-09-09
Estimated Expiration
2041-03-25

AI Technical Summary

Technical Problem

The existing unmanned driving system of urban rail transit system is difficult to meet the needs of light urban rail transit system with its road-based dispatching method, resulting in low operating efficiency.

Method used

A vehicle control method is provided, which receives a parking request and controls the vehicle to be dispatched based on the signal information and the operation mode. The method includes a first operation mode and a second operation mode, and is suitable for vehicle dispatching under different passenger flow conditions.

Benefits of technology

It realizes efficient dispatching of vehicles in light urban rail transit systems and improves operational efficiency. It is suitable for light urban rail transit systems with short operating lines, short station intervals and a small number of vehicles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115123343B_ABST
    Figure CN115123343B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a vehicle control method, apparatus, vehicle, and computer storage medium. The vehicle control method includes: receiving a parking request indicating a target station to be parked; when the operating mode is a first operating mode, controlling a first vehicle to operate to the target station based on the parking request and semaphore information of at least one target resource on the first vehicle's operating route; wherein the target resource includes an operating section or a station; and updating the semaphore information of the at least one target resource based on the operation of the first vehicle.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of vehicle control technology, and more specifically, to a vehicle control method, device, vehicle, and computer storage medium. Background Art

[0002] Currently, the control schemes for unmanned driving systems in urban rail transit systems are mostly based on CBTC (communication-based train control system). CBTC primarily dispatches vehicles based on the road, making it difficult to dispatch vehicles based on the vehicle itself. Summary of the Invention

[0003] One purpose of the embodiments of the present disclosure is to provide a new technical solution for vehicle control.

[0004] According to a first aspect of the present disclosure, a vehicle control method is provided, comprising: receiving a parking request indicating a target site at which to park; when the operating mode is a first operating mode, controlling a first vehicle to operate to the target site based on the parking request and semaphore information of at least one target resource on an operating route of the first vehicle; wherein the target resource includes an operating section or a site; and updating the semaphore information of at least one target resource based on the operation of the first vehicle.

[0005] Optionally, the method further includes: when the operating mode is the second operating mode, controlling the first vehicle to run directly from the current position to the target site according to the parking request.

[0006] Optionally, the method further includes: controlling the operating mode to the first operating mode when it is detected that there are other running vehicles on the track line where the first vehicle is located.

[0007] Optionally, the method further includes: controlling the operating mode to the second operating mode when it is detected that no other running vehicles exist on the track line where the first vehicle is located.

[0008] Optionally, controlling the first vehicle to run to the target station according to the stop request and semaphore information of at least one target resource on the first vehicle running route includes:

[0009] In the case where the stop request is a get-off request carrying a destination station identifier, the first vehicle is controlled to run from the current first position to the destination station and then stop and open the door based on the get-off request and the semaphore information of at least one target resource on the first vehicle's running route; and / or, in the case where the stop request is a get-on request carrying a boarding station identifier and a boarding direction, the first vehicle is controlled to run from the current second position to the boarding station and then stop and open the door based on the boarding request and the semaphore information of at least one target resource on the first vehicle's running route.

[0010] Optionally, the first vehicle is controlled to run directly from the current position to the target station according to the parking request, including: when the parking request is a get-off request carrying the destination station identification, the first vehicle is controlled to run directly from the current first position to the destination station and then stop and open the door according to the get-off request; and / or, when the parking request is a get-on request carrying the boarding station identification and the boarding direction, the first vehicle is controlled to run directly from the current second position to the boarding station and then stop and open the door according to the boarding request.

[0011] Optionally, the semaphore information includes a first semaphore, and the first semaphore includes: an open semaphore and a locked semaphore; according to the parking request and the semaphore information of at least one target resource on the first vehicle's operating route, the first vehicle is controlled to operate to the target site, including: obtaining the first semaphore of the next target resource on the first vehicle's operating route; when the first semaphore is an open semaphore, the first vehicle is controlled to obtain the next target resource; the semaphore information of at least one target resource is updated according to the operation of the first vehicle, including: after controlling the first vehicle to obtain the next target resource, the first semaphore of the next target resource segment is switched from an open semaphore to a locked semaphore.

[0012] Optionally, the semaphore information of the target resource also includes the thread waiting queue of the target resource. The method also includes: when the first semaphore is a locked semaphore, adding the first vehicle to the first thread waiting queue corresponding to the next target resource, and controlling the first vehicle to obtain the next target resource according to the first thread waiting queue.

[0013] Optionally, the semaphore information includes a second semaphore, and the second semaphore information has a semaphore value; according to the parking request and the semaphore information of at least one target resource on the first vehicle's operating route, the first vehicle is controlled to operate to the target site, including: obtaining the second semaphore of the next target resource of the first vehicle on the operating route; wherein the next target resource includes multiple target sub-resources; when the semaphore value of the second semaphore is greater than 0, the first vehicle is controlled to obtain a target sub-resource in the next target resource; the semaphore information of at least one target resource is updated according to the operation of the first vehicle, including: when the first vehicle accesses the target sub-resource, the semaphore value of the second semaphore is controlled to be reduced by 1; after the first vehicle finishes accessing the target sub-resource, the semaphore value of the second semaphore is controlled to be increased by 1.

[0014] Optionally, the semaphore information also includes a thread waiting queue of the target resource. The method also includes: when the semaphore value of the second semaphore is equal to 0, adding the first vehicle to the second thread waiting queue corresponding to the next target resource, and controlling the first vehicle to obtain the target sub-resource according to the second thread waiting queue.

[0015] Optionally, the semaphore information includes a thread waiting queue of the target resource, and according to the stop request and the semaphore information of at least one target resource on the first vehicle's operating route, the first vehicle is controlled to run to the target station, including: when the first vehicle enters the intermediate station, the first vehicle is included in the third thread waiting queue of the intermediate station according to the entry order of the first vehicle; and the first vehicle is controlled to exit from the intermediate station according to the order of the first vehicle in the third thread waiting queue of the intermediate station.

[0016] Optionally, the semaphore information includes a thread waiting queue of the target resource, and the first vehicle is controlled to run to the target site based on the parking request and the semaphore information of at least one target resource on the first vehicle's running route, including: when the first vehicle enters the intermediate site, obtaining the priority of the first vehicle; adding the first vehicle to the outbound thread waiting queue of the intermediate site according to the priority of the first vehicle; and controlling the first vehicle to exit from the intermediate site according to the outbound thread waiting queue.

[0017] Optionally, the semaphore information includes a thread waiting queue of the target resource and a first semaphore, the first semaphore including: an open semaphore and a locked semaphore; according to the parking request and the semaphore information of at least one target resource on the first vehicle's operating route, the first vehicle is controlled to operate to the target site, including: when the second vehicle occupies the target resource and the first vehicle is the next vehicle to access the target resource after the second vehicle, obtaining the first thread priority of the first thread controlling the operation of the first vehicle and the second thread priority of the second thread controlling the operation of the second vehicle; when the first thread priority is higher than the second thread priority and the first semaphore of the target resource is a locked semaphore, the first thread priority of the first thread is modified to the second thread priority.

[0018] Optionally, after changing the first priority of the first vehicle to the second priority of the second vehicle, the method further includes: when the first semaphore of the target resource is switched from a locked semaphore to an open semaphore, changing the priority of the first thread from the current second thread priority to the first thread priority.

[0019] Optionally, the method also includes: receiving a door opening request instructing the first vehicle to open the door, and controlling the first vehicle to close the door according to the door closing request; or, receiving an emergency stop request instructing the first vehicle to make an emergency stop, and controlling the first vehicle to make an emergency stop according to the emergency stop request; or, receiving a door opening request instructing the first vehicle to open the door, and controlling the first vehicle to open the door according to the door opening request when the first vehicle is stopped.

[0020] Optionally, the method further includes: receiving an alarm signal from an alarm system, wherein the alarm signal includes: a fire alarm signal, a smoke alarm signal, or a vehicle failure alarm signal; and controlling the first vehicle to emergency stop and open the door according to the alarm signal.

[0021] According to a second aspect of the present disclosure, a vehicle control method is further provided, comprising: obtaining a target station to which a passenger is to go, and sending a parking request indicating the target station to be parked.

[0022] Optionally, the first vehicle includes a plurality of interactive buttons; obtaining the target station to which the passenger is to go includes: responding to the passenger's first operation on a station button among the plurality of interactive buttons, obtaining the station corresponding to the station button as the target station.

[0023] Optionally, after obtaining the station corresponding to the station button as the target station, the method further includes: responding to the passenger's second operation on the station button among the multiple interactive buttons, and canceling the station corresponding to the station button as the target station.

[0024] Optionally, the method further includes: in response to a first operation on a vehicle control button among the plurality of interactive buttons, sending an action request indicating an action corresponding to the vehicle control button.

[0025] Optionally, the vehicle control buttons include: a door opening button, a door closing button, and / or an emergency stop button; sending an action request indicating the corresponding action of the vehicle control button includes: when the vehicle control button is a door opening button, responding to a first operation on the door opening button, sending a door opening request indicating the first vehicle to open the door; when the vehicle control button is a door closing button, responding to the first operation on the door closing button, sending a door closing request indicating the first vehicle to close the door; when the vehicle control button is an emergency stop button, responding to the first operation on the emergency stop button, sending an emergency stop request indicating the first vehicle to emergency stop.

[0026] Optionally, before responding to the first operation on the vehicle control button among the multiple interactive buttons, the method also includes: receiving authorization application information sent through the permission control window; if the authorization application information meets the preset authorization conditions, responding to the first operation on the vehicle control button among the multiple interactive buttons, otherwise not responding to the first operation on the vehicle control button among the multiple interactive buttons.

[0027] Optionally, the multiple interactive buttons are physical buttons, or the multiple interactive buttons are touch buttons.

[0028] Optionally, obtaining the target station that the passenger wants to go to includes: receiving identification information input by the passenger through a preset window; wherein the identification information includes biometric information, ticket identification information, or identity identification information; obtaining ticket information corresponding to the identification information; and obtaining the target station that the passenger wants to go to based on the ticket information.

[0029] Optionally, the method further includes: displaying prompt information when the interactive button is in a selected state; and not displaying prompt information when the interactive button is in an unselected state.

[0030] According to the third aspect of the present disclosure, a vehicle control method is also provided, including: after detecting that a user has checked in and entered the station, determining the first vehicle according to the user's boarding direction, and sending a boarding request carrying a boarding station identifier to the first vehicle; wherein the running direction of the first vehicle is the same as the boarding direction.

[0031] According to a fourth aspect of the present disclosure, a vehicle control device is further provided, comprising a memory and a processor, wherein the memory is used to store a computer program; and the processor is used to execute the computer program to implement the method according to the first aspect of the present disclosure.

[0032] According to a fifth aspect of the present disclosure, a vehicle is further provided, comprising a memory and a processor, wherein the memory is used to store a computer program; and the processor is used to execute the computer program to implement the method according to the second aspect of the present disclosure.

[0033] According to a sixth aspect of the present disclosure, a vehicle control system is further provided, comprising the vehicle control device of the fourth aspect and the vehicle of the fifth aspect.

[0034] According to a seventh aspect of the present disclosure, a computer-readable storage medium is further provided, on which a computer program is stored. When the computer program is executed by a processor, the method according to the first and second aspects of the present disclosure is implemented.

[0035] One beneficial effect of the disclosed embodiments is that, upon receiving a stop request indicating a target stop, the first vehicle can be controlled to operate to the target stop based on the stop request and semaphore information of at least one target resource on the first vehicle's operating route when the operating mode is the first operating mode; wherein the target resource includes an operating section or a station; and the semaphore information of the at least one target resource is updated based on the operation of the first vehicle. The disclosed embodiments can dispatch vehicles based on the vehicle itself, realizing a decentralized vehicle dispatching method suitable for lightweight urban rail transit systems characterized by short operating routes, short station intervals, a small number of vehicles, and a small number of stations, achieving high operating efficiency.

[0036] Other features and advantages of the embodiments of the present disclosure will become apparent from the following detailed description of exemplary embodiments of the present disclosure with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present disclosure and, together with the description, serve to explain the principles of the embodiments of the present disclosure.

[0038] Figure 1A A flowchart of a vehicle control method provided according to some embodiments of the present disclosure;

[0039] Figure 1B A flowchart of another vehicle control method provided according to some embodiments of the present disclosure;

[0040] Figure 2A A schematic diagram of a station button provided according to some embodiments of the present disclosure;

[0041] Figure 2B A schematic diagram of a vehicle button provided according to some embodiments of the present disclosure;

[0042] Figure 3A flowchart of another vehicle control method provided according to some embodiments of the present disclosure;

[0043] Figure 4 A flowchart of another vehicle control method provided according to some embodiments of the present disclosure;

[0044] Figure 5 A flowchart of another vehicle control method provided according to some embodiments of the present disclosure;

[0045] Figure 6 A schematic diagram of a vehicle exit sequence according to some embodiments of the present disclosure;

[0046] Figure 7 A flowchart of another vehicle control method provided according to some embodiments of the present disclosure;

[0047] Figure 8 A schematic diagram of another vehicle exiting a station according to some embodiments of the present disclosure;

[0048] Figure 9 A schematic diagram of the order in which threads are executed according to their priorities in the related art;

[0049] Figure 10 A flowchart of another vehicle control method provided according to some embodiments of the present disclosure;

[0050] Figure 11 A schematic diagram of an order of executing threads according to thread priorities according to some embodiments of the present disclosure;

[0051] Figure 12 A flowchart of another vehicle control method provided according to some embodiments of the present disclosure;

[0052] Figure 13 A schematic diagram of a node provided according to some embodiments of the present disclosure;

[0053] Figure 14 A schematic diagram of interaction of multiple nodes provided according to some embodiments of the present disclosure;

[0054] Figure 15 A flowchart of another vehicle control method provided according to some embodiments of the present disclosure;

[0055] Figure 16 A schematic diagram of a deceleration curve and an ATP curve delay according to some embodiments of the present disclosure;

[0056] Figure 17 A schematic diagram of thread processing provided according to some embodiments of the present disclosure;

[0057] Figure 18A schematic diagram of a signal quantity control method according to some embodiments of the present disclosure;

[0058] Figure 19 A schematic diagram of a semaphore control block provided according to some embodiments of the present disclosure;

[0059] Figure 20 A functional block diagram of a dual-CPU take-two voting method according to some embodiments of the present disclosure;

[0060] Figure 21 Another functional block diagram of two-by-two 2-out is provided according to some embodiments of the present disclosure;

[0061] Figure 22 A flowchart of another vehicle control method provided according to some embodiments of the present disclosure;

[0062] Figure 23 A flowchart of another vehicle control method provided according to some embodiments of the present disclosure;

[0063] Figure 24 A schematic diagram of a digital input data stream provided according to some embodiments of the present disclosure;

[0064] Figure 25 A functional structural block diagram of a vehicle control device provided according to some embodiments of the present disclosure;

[0065] Figure 26 A functional structure block diagram of a vehicle provided according to some embodiments of the present disclosure;

[0066] Figure 27 A schematic structural diagram of a vehicle control system provided according to some embodiments of the present disclosure. DETAILED DESCRIPTION

[0067] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that unless otherwise specifically stated, the relative arrangement of components and steps, numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present disclosure.

[0068] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present disclosure, its application, or uses.

[0069] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered part of the specification.

[0070] In all examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not limiting. Therefore, other examples of the exemplary embodiments may have different values.

[0071] It should be noted that like reference numerals and letters refer to like items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0072] Urban rail transit system refers to the sum of various related facilities such as vehicles or trains and tracks that serve urban passenger transportation, usually powered by electricity and characterized by wheel-rail operation.

[0073] To reduce driver workload and improve train safety, urban rail transit systems are often equipped with driverless systems. Traditional urban rail transit systems are characterized by long routes, long intervals between stations, and high passenger volumes. These driverless systems, such as CBTC, utilize these characteristics.

[0074] However, with the development of lightweight urban rail transit systems, lightweight urban rail transit systems, such as lightweight tram systems, have emerged. These systems feature short routes, short station intervals, fewer vehicles, fewer stations, and low off-peak passenger traffic. These systems are more suitable for vehicle-centric dispatching. If a route-centric dispatching approach is still used, operational efficiency will be low.

[0075] In view of the above-mentioned problems, the embodiments of the present disclosure provide a vehicle control method, device, vehicle and computer storage medium.

[0076] Hereinafter, various embodiments and examples according to the present disclosure are described with reference to the accompanying drawings.

[0077] <Method Example>

[0078] In a light urban rail transit system, one or more vehicles (or trains) can operate on a single line (i.e., a track). In high-volume traffic, multiple vehicles can operate on a single line to meet passenger transport needs. In low-volume traffic, such as at night (e.g., between 11:00 PM and 4:00 AM), passenger transport demand is low, and a single vehicle can usually suffice.

[0079] In this case, in the light urban rail transit system, the scenarios in which vehicles are located can be divided into two types. The first scenario is that there are multiple vehicles running on one line (corresponding to the above-mentioned situation with a large passenger flow), and the second scenario is that there is only one vehicle running on one line (corresponding to the above-mentioned situation with a small passenger flow).

[0080] Based on the above two scenarios, the vehicle's operating modes can be divided into two types, namely a first operating mode and a second operating mode.

[0081] The first operating mode corresponds to the first scenario described above, that is, a scenario where multiple vehicles are running on a single route. The second operating mode corresponds to the second scenario described above, that is, a scenario where only one vehicle is running on a single route.

[0082] There are various ways to determine the vehicle operating mode. For example, a method may be used to detect whether there are other vehicles operating on the route where the first vehicle is operating. If the detection result is yes, i.e., there are other vehicles operating on the route where the first vehicle is operating, the current operating mode is controlled to be the first operating mode. If the detection result is no, i.e., there are no other vehicles operating on the route where the first vehicle is operating and only the first vehicle is operating on the track, the current operating mode is controlled to be the second operating mode.

[0083] Of course, it is understandable that the vehicle control device can also operate in the first operation mode throughout the day, that is, multiple vehicles can operate on each operation route throughout the day.

[0084] Figure 1A It is a flowchart of a vehicle control method according to some embodiments of the present disclosure. Figure 1B It is a flowchart of a vehicle control method according to some embodiments of the present disclosure.

[0085] like Figure 1A As shown, the vehicle control method of the embodiment of the present disclosure may include the following steps S110 to S130: Step S110, receiving a parking request indicating a target stop to be parked.

[0086] The stop request may include: a get-off request carrying a destination station identifier, and / or a boarding request carrying a boarding station identifier and a boarding direction. The boarding direction is the direction in which the vehicle to be boarded by the passenger is traveling.

[0087] When the parking request is a get-off request, the target station corresponds to the destination station; when the parking request is a get-on request, the target station corresponds to the get-on station.

[0088] In some examples, the boarding request is a request sent by the passenger through the boarding station, or the boarding request is a request sent by the boarding station according to the passenger's ticket information.

[0089] For example, the boarding request is a request that a passenger sends by a boarding station. In this case, the boarding station responds to the passenger's 3rd operation, sends a boarding request that carries the boarding station sign and the direction of travel.

[0090] like Figure 2AAs shown, the boarding station includes multiple interactive buttons, and the multiple interactive buttons include boarding direction buttons, such as Figure 2A The keys corresponding to the left row and the keys corresponding to the right row are shown in .

[0091] Of course, it is understandable that there are many ways to mark the direction button of the ride, such as Figure 2A The symbol "left" can also be marked as "up", "right" can also be marked as "down", etc. As long as the direction corresponding to the riding direction button can be indicated.

[0092] The boarding request can be a response from the passenger to the third of multiple interactive buttons at the station, where the boarding station receives the direction corresponding to the interactive button as the boarding direction. The boarding request, along with the boarding station identifier and boarding direction, is then sent to the vehicle control device, instructing the vehicle traveling in the boarding direction to stop at the boarding station. In step S110, the vehicle control device receives the boarding request, along with the destination boarding station identifier and boarding direction. The third operation is similar to the first operation, and details regarding the first operation can be found in the description above and are not further elaborated here.

[0093] For example, the boarding request is a request sent by the boarding station based on the passenger's ticket checking information. In this case, after the station detects that the passenger has passed the ticket checking system, it will use the station as the boarding station.

[0094] The direction from the starting station (boarding station) to the destination station in the ticket is used as the boarding direction, and a boarding request is sent with the boarding station identifier and boarding direction.

[0095] In some examples, the get-off request is a request sent by the passenger through the first vehicle, or the get-off request is a request sent by the station based on the passenger's ticket information.

[0096] For example, the getting-off request is a request sent by the station according to the passenger's ticket checking information.

[0097] After boarding the first vehicle, the passenger inputs identification information to the first vehicle through the identification information input window of the first vehicle. After receiving the identification information, the first vehicle identifies the passenger based on the identification information, obtains the passenger's ticket information from the ticket inspection system based on the identification result, and then obtains the destination station that the passenger wants to arrive at based on the ticket information, and sends a disembarkation request carrying the destination station identification to the vehicle control device.

[0098] The above identification information may be, for example, the passenger's biometric information, identity information, and ticket identification information.

[0099] Biometric information may include a passenger's facial image, pupil / iris information, or fingerprint information. When identifying a passenger based on identification information, if the biometric information is a passenger's facial image, facial recognition can be performed based on the passenger's facial image. Similarly, if the biometric information is a passenger's pupil / iris information, pupil / iris recognition can be performed based on the passenger's pupil / iris information; if the biometric information is a passenger's fingerprint, fingerprint recognition can be performed based on the passenger's pupil / iris information.

[0100] Identity identification information such as ID card information. In this case, the passenger can be identified based on the ID card information.

[0101] Ticket identification information such as the two-dimensional code information on the ticket can uniquely identify the information of the ticket. In this case, the passenger can be identified according to the two-dimensional code information on the ticket.

[0102] For example, the get-off request is a request sent by a passenger via the first vehicle.

[0103] like Figure 2B As shown, the first vehicle includes a plurality of interactive buttons, and the plurality of interactive buttons include at least one station button. Figure 2B The buttons corresponding to the 1st station, 2nd station, 3rd station...18 stations and parking lots are shown in the figure.

[0104] The disembarkation request may be a response by the first vehicle to a passenger's first operation of a station button among the plurality of interactive buttons, obtaining the station corresponding to the station button as the destination station (i.e., the target station), and then transmitting the disembarkation request carrying the destination station identifier to the vehicle control device, thereby instructing the first vehicle to stop at the destination station. In step S110, the vehicle control device receives the disembarkation request carrying the destination station identifier.

[0105] For example, the plurality of interactive buttons may be physical buttons or touch buttons in a touch display screen of a human-computer interaction system. The first operation may be, for example, a press or click operation.

[0106] When performing a first operation on multiple interactive buttons, a passenger may make an error. To eliminate the impact of an error, after responding to the passenger's first operation on a station button, a second operation on the station button may be responded to by sending a cancellation request to the vehicle control device. The vehicle control device then cancels the station corresponding to the station button as the target station based on the cancellation request. The second operation may be, for example, a long press operation, or other operation different from the first operation.

[0107] In some examples, such as Figure 2BAs shown, the multiple interactive buttons also include vehicle control buttons, such as a door opening button, a door closing button, and an emergency stop button. In this case, the first vehicle can also send a corresponding action request in response to the user's first operation on the vehicle control button.

[0108] For example, when the vehicle control button is a door opening button, the first vehicle responds to the user's first operation of the door opening button and sends a door opening request instructing the first vehicle to open the door to the vehicle control device. The vehicle control device receives the door opening request instructing the first vehicle to open the door, and opens the door of the first vehicle according to the door opening request when the first vehicle is parked.

[0109] For example, when the vehicle control button is a door closing button, the first vehicle responds to the user's first operation of the door closing button and sends a door closing request instructing the first vehicle to close the door to the vehicle control device. The vehicle control device receives the door closing request instructing the first vehicle to close the door and closes the door of the first vehicle according to the door closing request.

[0110] For example, when the vehicle control button is an emergency stop button, the first vehicle responds to the user's first operation of the emergency stop button, sends an emergency stop request instructing the first vehicle to stop urgently to the vehicle control device, and the vehicle control device receives the emergency stop request instructing the first vehicle to stop urgently, and controls the first vehicle to stop urgently according to the emergency stop request.

[0111] In some examples, before responding to a user's first operation on a vehicle control button, the first vehicle receives authorization request information sent by the user through a permission control window. If the authorization request information meets preset authorization conditions, the first vehicle responds to the user's first operation on the vehicle control button; otherwise, the first vehicle response is not made. Based on this, different permissions can be granted to people with different identities. For example, an emergency stop authorization request information can be issued to a vehicle administrator, so that only the vehicle administrator can perform an emergency stop operation on the vehicle.

[0112] The authorization request information may be, for example, an identification code, with the preset authorization condition being that the identification code scanned through the permission control window matches an identification code pre-stored in the first vehicle. In this case, if the vehicle administrator possesses the identification code and scans it through the permission control window for authorization authentication, and if authorization authentication is successful, the first vehicle will be able to respond to the first operation of the emergency stop button on the first vehicle by transmitting an emergency stop request instructing the first vehicle to make an emergency stop. Ordinary passengers, lacking the identification code, will not be able to pass authorization authentication. In this case, the first vehicle will not respond to the ordinary passenger's first operation of the emergency stop button on the first vehicle.

[0113] In some examples, the interactive button can also display prompt information, for example, a prompt light (such as Figure 2B ), when the first vehicle responds to the user's first operation on the interactive button, it is determined that the interactive button is in a selected state, and the prompt light corresponding to the interactive button is turned on to display the light, and the light is the prompt information to prompt the user that the first vehicle has responded to the user's operation on the interactive button; when the first vehicle does not respond to the user's first operation on the interactive button, it is determined that the interactive button is in an unselected state, and the prompt light is not turned on to prompt the user that the first vehicle has not responded to the user's operation on the interactive button.

[0114] Step S120: When the operating mode is the first operating mode, the first vehicle is controlled to run to the target station according to the parking request and the signal information of the vehicle control center of at least one target resource on the first vehicle operating route; wherein the target resource includes an operating section or a station.

[0115] In the first operation mode, a plurality of vehicles including the first vehicle are operated on the first vehicle operation route. The plurality of vehicles can be deployed on each operation route according to the operation time interval between stations.

[0116] The inter-station operating time interval is the time it takes for a vehicle to travel from one station to the next. The inter-station operating time interval can be calculated using the following formula:

[0117] T=(T min +4*T nor +T max ) / 6;

[0118] T is the operating time interval between stations, T min To estimate the minimum time interval, T nor is the historical average time interval, T max The estimated maximum time interval.

[0119] The method for obtaining the estimated minimum time interval and the estimated maximum time interval can be set by those skilled in the art according to actual conditions, and the embodiments of the present disclosure are not limited thereto.

[0120] Based on the operating time interval T between stations, the number of vehicles to be deployed to each running track and the time interval for deploying vehicles can be determined to ensure that multiple vehicles on the running track are at least separated by a preset safety distance, ensuring driving safety while meeting passenger flow requirements.

[0121] The preset safety distance is set by those skilled in the art according to actual conditions.

[0122] In the disclosed embodiment, the vehicle control device is connected to all vehicles in the urban rail transit system via a data link. The data in the data link is encrypted using a preset encryption method to ensure data security. The preset encryption method is, for example, hash encryption technology.

[0123] The specific implementation of step S120 is introduced below.

[0124] In some examples, the stop request is a get-off request that carries a destination station identifier. In this case, in step S120, based on the get-off request and the signal quantity information of at least one target resource on the first vehicle's operating route, the first vehicle is controlled to run from the current first position to the destination station, stop, and open the door.

[0125] In some examples, the stop request is a boarding request that carries a boarding station identifier and a boarding direction. In this case, in step S120, based on the boarding request and the signal quantity information of at least one target resource on the first vehicle's operating route, the first vehicle is controlled to run from the current second position to the boarding station, stop, and open the door.

[0126] The semaphore information may include a first semaphore, and the first semaphore includes an open semaphore and a lock semaphore. In this case, the first semaphore can achieve the purpose of locking the target resource and opening the target resource.

[0127] For example, Figure 3 As shown, the execution process of step S120 may include the following steps S310 to S330:

[0128] Step S310: Acquire a first signal quantity of a next target resource on a first vehicle operation route.

[0129] The next target resource may be the next operating section that the first vehicle is about to enter, or the next station that the first vehicle is about to enter.

[0130] The method for obtaining the first semaphore can be set by those skilled in the art according to actual conditions, and the embodiments of the present disclosure are not limited thereto.

[0131] After acquiring the first semaphore of the next target resource, if the first semaphore is an open semaphore, step S320 is executed; if the first semaphore is a locked semaphore, step S330 is executed.

[0132] For example, a signal corresponding to the open semaphore and a signal corresponding to the lock semaphore can be preset, for example, the signal of the open semaphore is set to 1, and the signal of the lock semaphore is set to 0. When determining whether the first semaphore is the open semaphore or the lock semaphore, if the signal corresponding to the first semaphore is the same as the signal corresponding to the open semaphore, the first semaphore is determined to be the open semaphore; if the signal corresponding to the first semaphore is the same as the signal corresponding to the lock semaphore, the first semaphore is determined to be the lock semaphore.

[0133] Step S320: When the first semaphore is an on semaphore, control the first vehicle to acquire the next target resource.

[0134] For example, the next target resource is the next operating section that the first vehicle is about to enter. In this case, the first vehicle is controlled to enter the next operating section. Correspondingly, in step S130, after the first vehicle is controlled to enter the next operating section, the first semaphore of the next operating section is switched from an open semaphore to a locked semaphore.

[0135] For example, the next target resource is the next station that the first vehicle is about to enter. In this case, the first vehicle is controlled to enter the next station. Correspondingly, in step S130, after the first vehicle is controlled to enter the next station, the first semaphore of the next station is switched from an open semaphore to a locked semaphore.

[0136] Step S330: When the first signal is a locked signal, control the first vehicle to enter the next operating section.

[0137] The semaphore information for the target resource also includes the target resource's thread waiting queue. If the first semaphore is a locked semaphore, the first vehicle is added to the first thread waiting queue corresponding to the next target resource. The first vehicle is then controlled to obtain the next target resource based on the first thread waiting queue. The first thread waiting queue is a FIFO (first in, first out) queue. FIFO queues offer the advantages of simple processing and low overhead. Vehicles in a FIFO queue follow the first-in, first-out principle, and all vehicles in the queue have the same priority.

[0138] For example, the next target resource is the next operating section that the first vehicle is about to enter. In this case, the vehicles in the first thread waiting queue can be controlled in sequence from first to last according to the order of arrangement in the first thread waiting queue to enter the next operating section. When there is no other vehicle in the previous position of the first vehicle in the first thread waiting queue and the first semaphore of the next operating section is an open semaphore, the first vehicle is controlled to enter the next operating section.

[0139] For example, the next target resource is the next station that the first vehicle is about to enter. In this case, the vehicles in the first thread waiting queue can be controlled to proceed to the next station in sequence from first to last according to the order of arrangement in the first thread waiting queue. When there is no other vehicle in the previous position of the first vehicle in the first thread waiting queue and the first semaphore of the next station is an open semaphore, the first vehicle is controlled to enter the next station.

[0140] In some examples, the semaphore information includes a second semaphore, the second semaphore having a semaphore value, and the semaphore value is a natural number. In this case, Figure 4 As shown, the execution process of step S120 may include the following steps S410 to S440:

[0141] Step S410: Acquire a second signal quantity of the next target resource of the first vehicle on the running route.

[0142] The next target resource includes multiple target sub-resources.

[0143] For example, the next target resource is the next operating section that the first vehicle is about to enter. In this case, the second signal quantity of the next operating section on the first vehicle's operating route is obtained. The next operating section, for example, includes multiple operating sub-sections. Each target sub-resource corresponds to an operating sub-section. In a specific implementation, the multiple operating sub-sections may be, for example, sections of a turnout.

[0144] For example, the next target resource is the next stop that the first vehicle is about to enter. In this case, the second signal quantity of the next stop on the first vehicle's route is obtained; wherein the next stop includes multiple parking spaces. Each target sub-resource corresponds to a parking space.

[0145] Step S420: Determine whether the semaphore value of the second semaphore is greater than 0.

[0146] If the judgment result is yes, that is, the semaphore value of the second semaphore is greater than 0, step S430 is executed; if the judgment result is no, that is, the semaphore value of the second semaphore is equal to 0, step S440 is executed.

[0147] Step S430: When the semaphore value of the second semaphore is greater than 0, control the first vehicle to acquire a target sub-resource in the next target resource.

[0148] For example, the next target resource is the next operating section that the first vehicle is about to enter. In this case, the first vehicle is controlled to enter the next operating section.

[0149] For example, the next target resource is the next station that the first vehicle is about to enter. In this case, the first vehicle is controlled to enter the next station.

[0150] Correspondingly, during the execution of step S430, the following process is executed in step S130: while the first vehicle accesses the target sub-resource, the semaphore value of the second semaphore is controlled to be reduced by 1; after the first vehicle finishes accessing the target sub-resource, the semaphore value of the second semaphore is controlled to be increased by 1.

[0151] Step S440: When the semaphore value of the second semaphore is equal to 0, the first vehicle is added to the second thread waiting queue corresponding to the target resource, and the first vehicle is controlled to obtain the target sub-resource according to the second thread waiting queue.

[0152] The second thread waiting queue can be a FIFO queue. In this case, the vehicles in the second thread waiting queue can be controlled to acquire the next target resource in a first-to-last order based on the order in which they are arranged in the second thread waiting queue. If there is no other vehicle in the position before the first vehicle in the second thread waiting queue and the second semaphore of the next target resource is greater than 0, the first vehicle can be controlled to acquire a target sub-resource in the next target resource.

[0153] For example, the next target resource is the next operating section that the first vehicle is about to enter. In this case, the first vehicle is added to the second thread waiting queue corresponding to an operating sub-section of the operating section, and the first vehicle is controlled to enter the operating sub-section according to the second thread waiting queue.

[0154] For example, the next target resource is the next site that the first vehicle is about to enter. In this case, the first vehicle is added to the second thread waiting queue corresponding to a sub-site of the site, and the first vehicle is controlled to enter the sub-site according to the second thread waiting queue.

[0155] In some examples, all vehicles on the first vehicle operation line have the same priority and the same urgency. In this case, Figure 5 As shown, the execution process of step S120 may include the following steps S510 to S520:

[0156] Step S510: When the first vehicle enters the waypoint, the first vehicle is placed in the third thread waiting queue of the waypoint according to the entry order of the first vehicle.

[0157] The vehicles entering the midway station are all non-emergency vehicles, and the priorities of these vehicles are all the same. In this case, the first vehicle is listed in the third thread waiting queue of the midway station according to the entry order of the first vehicle.

[0158] Step S520: Control the first vehicle to exit from the waypoint according to the order of the first vehicle in the third thread waiting queue of the waypoint.

[0159] The third thread waiting queue can be a FIFO queue. In this case, Figure 6 As shown, in accordance with the first-in-first-out principle of the FIFO queue, the first vehicle is controlled to exit the intermediate station according to the order of the first vehicle in the third thread waiting queue of the intermediate station.

[0160] In some examples, at least two vehicles on the first vehicle operation route have different priorities. In this case, the order in which the vehicles acquire the target resource is controlled according to the vehicle priority. The higher the priority of the vehicle, the higher the priority of the vehicle, the higher the priority of the vehicle in acquiring the target resource. Based on this, Figure 7 As shown, the execution process of step S120 may include the following steps S710 to S720:

[0161] Step S710: When the first vehicle enters the intermediate station, the priority of the first vehicle is obtained.

[0162] Step S720: Add the first vehicle to the outbound thread waiting queue of the intermediate station according to the priority of the first vehicle.

[0163] Compared with the priorities of other vehicles, the higher the priority of the first vehicle, the front position of the first vehicle in the outbound thread waiting queue; when the priority of one or more vehicles is the same as that of the first vehicle, the one or more vehicles and the first vehicle are arranged according to the order in which the vehicles enter the outbound thread waiting queue.

[0164] Step S730: Control the first vehicle to exit from the intermediate station according to the exit thread waiting queue.

[0165] According to the arrangement order of the vehicles in the outbound thread waiting queue, the vehicles in the outbound thread waiting queue are controlled to exit from the intermediate stations in sequence according to the above arrangement order.

[0166] See also Figure 8 As shown in the figure, the priority of emergency vehicles, secondary emergency vehicles and non-emergency vehicles is arranged in the order from high to low: priority of emergency vehicles > priority of secondary emergency vehicles > priority of non-emergency vehicles. The order of vehicles with different priorities entering and leaving the station is as follows: Figure 8 As shown, the higher the vehicle priority, the earlier it leaves the station.

[0167] In some examples, controlling the vehicle to reach the destination is accomplished by controlling one or more corresponding threads. Each thread has a corresponding priority. In this case, while controlling the first vehicle to reach the destination based on semaphore information, the first vehicle also needs to be controlled based on the priority of the currently executing thread.

[0168] However, when there are multiple threads, there is a problem of priority inversion. The following is a scenario where priority inversion occurs. For example, the threads corresponding to vehicle A, vehicle B, and vehicle C are thread A', thread B', and thread C' respectively. The priority order of thread A', thread B', and thread C' is thread A'>thread B'>thread C'. Thread A' and thread B' are in a triggered state waiting to run, thread C' is running, and at this time thread C' starts to access a target resource, and thread A' and thread C' share the target resource M. At this time, the trigger condition of thread A' is met. Since the priority of thread A' is greater than the priority of thread C', thread C' suspends access to the target resource, and thread A' starts running. When thread A' wants to access the target resource, since thread C' is accessing the target resource, thread A' suspends running, thread C' continues to access the target resource, and thread A' waits to access the target resource. In this case, if the trigger condition of thread B' is met, since the priority of thread A' is greater than that of thread C', thread B' starts running and thread C' stops accessing the target resource. Thread B' starts running until thread B' finishes running, and then thread C' resumes accessing the target resource. When thread C' releases the target resource, thread A' can be executed. In this case, thread C' can only be executed after thread B' completes execution, and thread A' can only be executed after thread C' completes execution. Figure 9 As shown in the figure, on the timeline, threads A', B', and C' actually complete in the order: C' - B' - A'. However, according to their priorities, they should complete in the order: A' - B' - C'. This shows that the priorities have been reversed, and the response time of the high-priority thread cannot be guaranteed in this case. Figure 9 Thread A'(M) indicates that thread A' will access target resource M, and thread C'(M) indicates that thread C' will access target resource M.

[0169] In order to solve the above problems, Figure 10 As shown, step S120 may further include the following steps S1010 to S1020:

[0170] Step S1010: When the second vehicle occupies the target resource and the first vehicle is the next vehicle to access the target resource after the second vehicle, obtain the first thread priority of the first thread controlling the operation of the first vehicle and the second thread priority of the second thread controlling the operation of the second vehicle.

[0171] The first vehicle occupying the target resource is the first trigger event, and the second vehicle being the next vehicle to access the target resource after the first vehicle is the second trigger event. When it is detected that the first trigger event and the second trigger event occur at the same time, the first thread priority and the second thread priority are obtained.

[0172] Step S1020: Determine whether the second thread priority is higher than the first thread priority.

[0173] If the judgment result is yes, that is, the second thread priority is higher than the first thread priority, step S1030 is executed; if the judgment result is no, that is, the second thread priority is less than or equal to the first thread priority, then the current process ends.

[0174] Step S1030: Acquire a first semaphore of the target resource, and when the first semaphore is a locked semaphore, modify the first thread priority of the first thread to a second thread priority.

[0175] Taking the threads A', B', and C' in the above example as an example, when thread C' accesses the target resource and thread A' waits to access the target resource, the priority of thread C' is modified to the priority of thread A'. When the trigger condition of thread B' is met, since the priority of thread C' is greater than that of thread B' at this time, thread C''s access to the target resource will not be interrupted by thread B'. Thread C' continues to access the target resource until the access is completed and the target resource is released. At this time, thread A' waiting to access the target resource starts to access the target resource. After thread A' finishes accessing the target resource, thread B' starts to execute. In this case, Figure 11 As shown in the figure, on the timeline, the order in which threads A', B', and C' are completed is: C'-A'-B'. Thread B' starts executing only after A' is completed. Thread B' does not occupy the response time of A' first, thus avoiding the priority flip problem mentioned above.

[0176] Step S1040: When the first semaphore of the target resource is switched from a locked semaphore to an open semaphore, the priority of the first thread is modified from the current second thread priority to the first thread priority.

[0177] After the first thread ends its access to the target resource and releases the target resource, the first semaphore of the target resource will be switched from a locked semaphore to an open semaphore. In this case, the priority of the first thread is modified from the current second thread priority to the first thread priority to ensure that the response time of the first thread and other threads is normal.

[0178] Step S130: Receive signal quantity information of at least one target resource according to the operation of the first vehicle.

[0179] When the first semaphore is an open semaphore, the first vehicle is controlled to obtain the next target resource, that is, to access the next target resource. In this case, the first semaphore of the next target resource segment is switched from an open semaphore to a locked semaphore; after the first vehicle obtains the next target resource, that is, when the next target resource is released, the first semaphore of the next target resource segment is switched from a locked semaphore to an open semaphore.

[0180] When the first vehicle accesses the target sub-resource, the semaphore value of the second semaphore is controlled to decrease by 1; after the first vehicle finishes accessing the target sub-resource, the semaphore value of the second semaphore is controlled to increase by 1.

[0181] In some examples, the vehicle control device is further connected to an alarm system and can receive an alarm signal from the alarm system and control the first vehicle to emergency stop and open the doors based on the alarm signal. The alarm signal can be, for example, a fire alarm signal, a smoke alarm signal, or a vehicle malfunction alarm signal.

[0182] like Figure 1B As shown, after executing step S110, step S140 may also be executed.

[0183] Step S140: When the operation mode is the second operation mode, the first vehicle is controlled to directly operate from the current position to the target station according to the parking request.

[0184] For example, when the stop request is a get-off request carrying a destination station identifier, the first vehicle is controlled to run directly from the current first position to the destination station and then stop with its doors opened according to the get-off request.

[0185] For example, when the parking request is a boarding request that carries a boarding station identifier and a boarding direction, the first vehicle is controlled to run directly from the current second position to the boarding station and then stop and open the door according to the boarding request.

[0186] In some examples, the vehicle control device can be linked with an automatic fire alarm system (Fire Alarm System) to receive a fire alarm signal from the automatic fire alarm system.

[0187] In some examples, embodiments of the present disclosure may implement functions corresponding to an ATS (automatic train supervision) system, a ZC (zone controller), a CI (computer interlocking), and a VOBC (vehicle on-board controller).

[0188] Automatic train monitoring ATS, zone controller ZC, computer interlocking CI and vehicle-mounted controller VOBC realize the shunting process in the yard. Figure 12 As shown, it includes steps S1 to S7.

[0189] See also Figure 12 First, depot dispatching is performed. Step S1: The ATS sends an automatic train operation instruction, assigning a train number to the vehicle. Step S2: Triggering route processing (i.e., route planning). After this, the computer interlocking control (CI), operated by the on-site workstation, executes step S3: Vehicle route processing based on the vehicle's conditions (driving direction, speed, etc.) and road conditions (such as switches, traffic light information, and platform screen doors). The onboard controller (VOBC) then executes step S4: Reporting its position to the zone controller (ZC) for authorization. Based on the route processing results of the computer interlocking control (CI) and the position reported by the VOBC, the zone controller executes step S5: Calculating movement authorization for the vehicle, thus achieving seamless cross-regional control of vehicle movement. Step S6: The VOBC receives the movement authorization from the zone controller (ZC) and executes step S7: In-yard shunting.

[0190] The Automatic Train Monitoring System (ATS) provides traffic rules and operation records. The Zone Controller (ZC) provides road condition information, vehicle roaming information, and section switching information. The Computer Interlocking System (CI) provides traffic signals (such as those for controlling traffic lights) and field control information, while the Onboard Controller (VOBC) automatically controls the train.

[0191] The following describes the process of implementing the ATS, ZC and CI functions in the embodiment of the present disclosure.

[0192] See first Figure 13 , Figure 13 A node of a vehicle control device is shown, and a node can be used to execute an event in a thread of an embodiment of the present disclosure.

[0193] like Figure 13 As shown, a node is set with a work code, work name and duration.

[0194] like Figure 14 As shown, Figure 14 The first node H1 in the figure points to the second node H2 through an arrow. The arrow represents the logical relationship between the first node H1 and the second node H2, and the label above the arrow indicates the overlapping relationship.

[0195] Combine Figure 13 and Figure 14 As shown in the figure, each node includes 6 time parameters: earliest start time ES, earliest finish time EF, latest start time LS, latest finish time LF, total time difference TF, and free time difference FF.

[0196] Please continue to see Figure 14 As shown, in two adjacent first nodes H1 and second nodes H2, the above six time parameters of the first node H1 are: the earliest start time ES i , earliest completion time EF i , latest start time LS i , latest completion time LF i , total time difference TF i , free time difference FF i The six time parameters of the second node H2 are: earliest start time ES j , earliest completion time EF j , latest start time LS j , latest completion time LF j , total time difference TF j , free time difference FF j .

[0197] The time distance LAG between the first node H1 and the second node H2 i,j It includes a first time distance S, a second time distance, a third time distance, and a fourth time distance.

[0198] The first time distance is the earliest start time ES i and the earliest start time ES j The second time distance is the earliest start time ES i and the earliest completion time EF j The third time distance is the earliest completion time EF i and the earliest start time ES j The fourth time distance is the earliest completion time EF i and the earliest completion time EF j The difference between .

[0199] In this case, see Figure 15As shown, a corresponding node is set for each step in steps S1 to S7. Corresponding to step S1, the working code of node 1 is set to 1, the working name is to set the driving code for the vehicle, and the working duration is D1; ​​corresponding to step S2, the working code of node 2 is set to 2, the working name is to trigger the processing route, and the working duration is D2; corresponding to step S3, the working code of node 3 is set to 3, the working name is to trigger the processing route, and the working duration is D3; corresponding to step S4, the working code of node 4 is set to 4, the working name is to report the location and apply for authorization, and the working duration is D4; corresponding to step S5, the working code of node 5 is set to 5, the working name is to calculate the movement authorization, and the working duration is D5; corresponding to step S6, the working code of node 6 is set to 6, the working name is to receive the movement authorization, and the working duration is D6; corresponding to step S7, the working code of node 7 is set to 7, the working name is to control the automatic operation of the vehicle, and the working duration is D7.

[0200] The time distance LAG between node 1 and node 2 1,2 The third time distance FTS, the time distance LAG between node 2 and node 3 2,3 is the first time distance STS, the time distance between node 3 and node 5 LAG 3,5 is the first time distance STS, the time distance between node 4 and node 5 LAG 4,5 The third time distance FTS, the time distance LAG between node 5 and node 6 5,6 The third time distance FTS, the time distance LAG between node 6 and node 7 6,7 is the third time distance FTS.

[0201] Figure 15 The six time parameters of node n are: earliest start time ES n , earliest completion time EF n , latest start time LS n , latest completion time LF n , total time difference TF n , free time difference FF n . n is a natural number, and 7≥n>0.

[0202] The embodiment of the present disclosure can control the vehicle to park at a fixed point. Figure 16As shown, the signal lights a1, b1 and c1 corresponding to the first operating route X1 are all red lights, the signal lights a2, b2 and c2 corresponding to the second operating route X2 are green lights, red lights and red lights respectively, and the signal lights a3, b3 and c3 corresponding to the third operating route X3 are green lights, green lights and red lights respectively. When the first vehicle passes through a traffic light S, since the mobile authorization can only be received when the active transponder is received, if the corresponding approach in front of the vehicle is open, the advance transponder can be used to copy the message data of the active transponder. When the train passes above the advance transponder, the advance transponder copies the message data of the active transponder and obtains the open signal of the active transponder in advance, so that the automatic rain protection (ATP) curve of the train can be extended from the dotted line to the next approach. As shown Figure 16 As shown, on the first running line X1, since the traffic lights a1, b1 and c1 are all red, the vehicle begins to decelerate normally after passing the warning transponder. Figure 16 As can be seen from the normal deceleration curve in the figure, when the deceleration is 0, the vehicle will not enter the next section; on the second operating line X2, since the traffic light a1 is green and the traffic light b2 is red, the vehicle will execute ATP deceleration after passing the warning transponder 2. Figure 16 As can be seen from the ATP curve in Figure 2, the ATP curve extends into the protected section of the next segment. On the third operating line X3, since both signal lights a1 and b1 are green and signal light c1 is red, when the train passes over advance balise 3, the advance balise copies the message data from the corresponding active balise. The train receives the corresponding active balise's open signal in advance, allowing the normal deceleration curve and ATP curve to be extended to the next segment of the next segment.

[0203] In the embodiment of the present disclosure, each vehicle may be regarded as a terminal, and a resource pool may be shared through the network, and the resource pool may be updated synchronously (see the corresponding description in step S130 ).

[0204] The following describes the implementation process of the semaphore information function in the embodiment of the present disclosure. The semaphore information in the embodiment of the present disclosure includes a first semaphore and a second semaphore. The first semaphore includes an open semaphore and a lock semaphore, and the first semaphore can be used to achieve synchronization between threads.

[0205] like Figure 17 As shown in the figure, when a task has two threads, the writing thread writes data to the resource pool, and the reading thread reads data from the resource pool. When the writing thread has not yet completed the data writing operation, the reading thread has already completed the data reading process from the resource pool. In this case, the sampling time of each array of the read data may be different, resulting in data confusion.

[0206] The first semaphore can achieve synchronization between threads in the following process: when a thread accesses a target resource, the target resource (i.e. Figure 17 The target resource is locked by the thread at a time, allowing only one thread to access the target resource, read data from the target resource, or write data to the target resource.

[0207] The second semaphore has a semaphore value. Figure 18 As shown, each target resource has a semaphore value (the second semaphore has a semaphore value) and a thread waiting queue (including thread 1 to thread k, a total of k threads, k is a natural number and k>1). The semaphore value is used to indicate the number of resources (or the number of instances) in the target resource.

[0208] For example, if the semaphore value of the target resource is 7, it means that the target resource has 7 resources. If the semaphore value of the target resource is 0, when a thread accessing the target resource is received thereafter, the thread will be directly suspended in the thread waiting queue of the target resource.

[0209] Semaphore control is achieved through a semaphore control block. A semaphore control block is a data structure used by the operating system to manage semaphores. For example, in C, a semaphore control block is represented by the struct rtos_semaphore structure. Alternatively, rtos_sem_t represents a semaphore handle, which is implemented in C as a pointer to the semaphore control block. The detailed definition of the semaphore control block structure is as follows:

[0210] struct rtos_semaphore

[0211] {

[0212] struct rtos_ipc_object parent; / * inherited from ipc_object class* /

[0213] rtos_uint16_t value; / * semaphore value* /

[0214] };

[0215] / * rtos_sem_t is a pointer type pointing to a semaphore structure* /

[0216] typedef struct rtos_semaphore* rtos_sem_t;

[0217] The rtos_semaphore object is derived from rtos_ipc_object and is managed by the IPC (Inter-Process Communication) container. The maximum value of the semaphore is 65535.

[0218] The semaphore control block contains semaphore-related parameters and acts as a link between the various states of the semaphore. The interface of the semaphore control block is as follows: Figure 19 As shown, the operations on a semaphore include: creating / initializing a semaphore, acquiring a semaphore, releasing a semaphore, and deleting a semaphore.

[0219] Functions for creating / initializing semaphores are, for example, RTOS_SEM_CREATE / INIT(); functions for acquiring semaphores are, for example, RTOS_SEM_TAKE / TRYTAKE(); functions for releasing semaphores are, for example, RTOS_SEM_release(); and functions for deleting semaphores are, for example, RTOS_SEM_delete / detach().

[0220] For example, when creating a semaphore, first create a semaphore control block, then perform basic initialization on the semaphore control block. The following function interface is used to create a semaphore:

[0221] rtos_sem_t rtos_sem_create(const char *name,

[0222] rtos_uint32_t value,

[0223] rtos_uint8_t flag);

[0224] When this function is called, a semaphore object is first allocated from the object manager and initialized, and then the parent class IPC object and the parts related to semaphore are initialized. Among the parameters specified for creating a semaphore, the semaphore flag parameter determines the queuing method for multiple threads waiting when the semaphore is not available. When the RTOS_IPC_FLAG_FIFO (first in, first out) mode is selected, the waiting thread queue will be queued in a first-in, first-out manner, and the thread that enters first will get the semaphore it is waiting for first; when the RTOS_IPC_FLAG_PRIO (priority waiting) mode is selected, the waiting thread queue will be queued according to priority, and the waiting thread with a high priority will get the semaphore it is waiting for first. Table 1 describes the input parameters and return values ​​of this function:

[0225] Table 1

[0226]

[0227] When the semaphore is no longer used, you can delete it. To delete a semaphore, use the following function interface:

[0228] rtos_err_t rtos_sem_delete(rtos_sem_t sem);

[0229] If a thread is waiting for the semaphore when the semaphore is deleted, the deletion operation will first wake up the thread waiting on the semaphore (the return value of the waiting thread is - RTOS_ERROR), and then release the memory resources of the semaphore. Table 2 describes the input parameters and return values ​​of this function:

[0230] Table 2

[0231]

[0232] When initializing a semaphore, for a static semaphore object, you can use the following function interface to initialize the semaphore object:

[0233] rtos_err_t rtos_sem_init(rtos_sem_tsem,

[0234] const char*name,

[0235] rtos_uint32_tvalue,

[0236] rtos_uint8_tflag)

[0237] Table 3 describes the input parameters and return values ​​of this function:

[0238] Table 3

[0239]

[0240] Detaching a semaphore means detaching the semaphore object from the kernel object manager. This is applicable to statically initialized semaphores. Detaching a semaphore uses the following function interface:

[0241] rtos_err_t rtos_sem_detach(rtos_sem_t sem);

[0242] Table 4 shows the input parameters and return values ​​of this function:

[0243] Table 4

[0244]

[0245] The thread obtains the resource instance by acquiring the semaphore. When the semaphore value is greater than zero, the thread will obtain the semaphore and the corresponding semaphore value will be reduced by 1. The following function interface is used to obtain the semaphore:

[0246] rtos_err_t rtos_sem_take (rtos_sem_t sem, rtos_int32_t time);

[0247] When calling this function, if the semaphore value is zero, the thread requesting the semaphore will choose to return immediately, wait for a period of time, or wait forever, depending on the time parameter, until another thread or an interrupt releases the semaphore. If the semaphore is still not obtained within the time specified by the time parameter, the thread will time out and return with the return value RTOS_ETIMEOUT. Table 5 shows the input parameters and return value of this function:

[0248] Table 5

[0249]

[0250] If you do not suspend the thread to wait on the requested semaphore, you can use the no-wait method to obtain the semaphore. The no-wait method uses the following function interface: rtos_err_t rtos_sem_trytake(rtos_sem_t sem); Table 6 shows the input parameters and return values ​​of this function:

[0251] Table 6

[0252]

[0253] Releasing a semaphore can wake up the thread that is suspended on the semaphore. The following function interface is used to release a semaphore: rtos_err_t rtos_sem_release(rtos_sem_t sem); for example, when the value of the semaphore is equal to zero and there is a thread waiting for this semaphore, releasing the semaphore will wake up the first thread in the thread queue waiting for the semaphore, and it will obtain the semaphore; otherwise, the value of the semaphore will be increased by 1. Table 7 describes the input parameters and return value of this function:

[0254] Table 7

[0255]

[0256] The following describes thread interruption.

[0257] Semaphores are also used for interrupt threads. For example, when an interrupt is triggered, the interrupt service routine needs to notify the thread to perform the corresponding data processing. In this case, the initial value of the semaphore can be set to 0. When the thread attempts to hold this semaphore, since the initial value of the semaphore is 0, the thread is directly suspended on this semaphore until the semaphore is released. When an interrupt is triggered, hardware-related actions are first performed, such as reading the corresponding data from the hardware I / O port, confirming the interrupt to clear the interrupt source, and then releasing a semaphore to wake up the corresponding thread for subsequent data processing. The process of the interrupt thread is as follows: when an interrupt event occurs, the step of obtaining the semaphore is executed. If the semaphore is successfully obtained, the interrupt is allowed. Otherwise, the step of obtaining the semaphore is executed again.

[0258] The mutual exclusion between interrupts and threads cannot be achieved by using semaphores (locks), but by using switch interrupts.

[0259] When an interrupt event occurs, the occupied semaphore is locked. After the terminal task is completed, the occupied semaphore is unlocked and the semaphore can be used by other events. The interrupt program returns to the original location of the main program, restores the scene, and continues to execute the main program loop.

[0260] The second semaphore can be used for resource counting.

[0261] When the semaphore is the second semaphore, it is also regarded as an increasing or decreasing counter. It should be noted that the value of the semaphore is a natural number and is greater than or equal to 0.

[0262] For example, if a semaphore is initialized to a value of 5, it can be decremented up to five times in a row until the counter reaches 0. Resource counting is suitable for situations where the processing speeds of threads are mismatched. In these cases, a semaphore can be used to count the number of tasks completed by the previous thread. When a subsequent thread is dispatched, it can also process multiple events simultaneously in a continuous manner. For example, in a producer and consumer thread, after obtaining an empty slot, the producer thread generates a number, loops through it, and then releases a full slot. After obtaining a full slot, the consumer thread reads the array contents, adds the number, and then releases an empty slot. The producer thread can release the semaphore multiple times, and the consumer thread can then process multiple semaphores at once when it is dispatched. One application scenario for producer and consumer threads is that limited parking spaces are available at bus stops and parking lots, and several semaphores are designed for each parking space. The producer and consumer threads synchronize and control the number of vehicles entering and exiting, ensuring safe and orderly traffic flow.

[0263] The difference between the first semaphore and the second semaphore is that the first semaphore can only be released by the holding thread, while the second semaphore can be released by any thread.

[0264] The first semaphore can be controlled by a mutex control block. A mutex control block is a data structure used by the operating system to manage mutexes, represented by the struct rtos_mutex structure. Another C notation, rtos_mutex_t, represents a mutex handle. In C, this is implemented as a pointer to the mutex control block. The detailed definition of the mutex control block structure is shown in the following code:

[0265] struct rtos_mutex{ struct rtos_ipc_object parent; / * inherited from ipc_object class* /

[0266] rtos_uint16_tvalue; / * mutex value* /

[0267] rtos_uint8_toriginal_priority; / * holds the original priority of the thread* /

[0268] rtos_uint8_thold; / * The number of times the thread is held* /

[0269] struct rtos_thread*owner; / * The thread that currently owns the mutex* /

[0270] };

[0271] / * rtos_mutext_t is a pointer type pointing to a mutex structure* /

[0272] typedef struct rtos_mutex* rtos_mutex_t;

[0273] The rtos_mutex object is derived from rtos_ipc_object and is managed by the IPC container.

[0274] The mutex control block contains important mutex-related parameters and plays a crucial role in implementing mutex functionality. Operations on a mutex (i.e., the second semaphore) include: creating / initializing the mutex, acquiring the mutex, releasing the mutex, and deleting / detaching the mutex.

[0275] When creating a mutex, first create a mutex control block and then complete the initialization of the control block. To create a mutex, use the following function interface:

[0276] rtos_mutex_t rtos_mutex_create (const char* name, rtos_uint8_t flag);

[0277] You can call the rtos_mutex_create function to create a mutex with the name specified by name. When this function is called, the system will first allocate a mutex object from the object manager and initialize the object, then initialize the parent IPC object and mutex-related parts.

[0278] The mutex flag is set to RTOS_IPC_FLAG_PRIO, which means that when multiple threads are waiting for resources, the thread with the highest priority will get the resources first. The flag is set to RTOS_IPC_FLAG_FIFO, which means that when multiple threads are waiting for resources, the resources will be obtained in a first-come, first-served order. Table 8 shows the input parameters and return value of this function:

[0279] Table 8

[0280]

[0281] When the mutex is no longer used, delete the mutex to release the resource. To delete the mutex, use the following function interface:

[0282] rtos_err_t rtos_mutex_delete (rtos_mutex_t mutex);

[0283] When a mutex is deleted, all threads waiting for it are awakened, and the return value received by the waiting threads is -RTOS_ERROR. The system then deletes the mutex from the kernel object manager's linked list and releases the memory space occupied by the mutex. Table 9 describes the input parameters and return value of this function:

[0284] Table 9

[0285]

[0286] The memory for static mutex objects is allocated by the compiler during system compilation and is generally stored in the read-write data segment or the uninitialized data segment. Before using such static mutex objects, they must be initialized. To initialize a mutex, use the following function interface:

[0287] rtos_err_t rtos_mutex_init (rtos_mutex_t mutex, const char* name,rtos_uint8_t flag);

[0288] When using this function interface, you need to specify the mutex object handle (i.e., the pointer to the mutex control block), the mutex name, and the mutex flags. The mutex flags can be the same as those mentioned in the mutex creation function above. Table 10 shows the input parameters and return values ​​of this function:

[0289] Table 10

[0290]

[0291] Detaching a mutex will detach the mutex object from the kernel object manager, which is applicable to statically initialized mutexes. Detaching a mutex uses the following function interface:

[0292] rtos_err_t rtos_mutex_detach (rtos_mutex_t mutex);

[0293] After using this function interface, the kernel first wakes up all threads hanging on the mutex (the return value of the thread is -RTOS_ERROR), and then the system detaches the mutex from the kernel object manager. Table 11 shows the input parameters and return values ​​of this function:

[0294] Table 11

[0295]

[0296] Once a thread acquires a mutex, it has ownership of the mutex, meaning that a mutex can only be held by one thread at a time. To acquire a mutex, use the following function interface:

[0297] rtos_err_t rtos_mutex_take (rtos_mutex_t mutex, rtos_int32_t time);

[0298] If the mutex is not controlled by other threads, the thread applying for the mutex will successfully obtain the mutex. If the mutex is already controlled by the current thread, the mutex's holding count will be increased by 1, and the current thread will not be suspended waiting. If the mutex is already held by other threads, the current thread will be suspended waiting on the mutex until the other thread releases it or the waiting time exceeds the specified timeout. Table 12 shows the input parameters and return value of this function:

[0299] Table 12

[0300]

[0301] When a thread completes access to a mutex resource, it should release the mutex as soon as possible so that other threads can acquire the mutex in time. To release a mutex, use the following function interface:

[0302] rtos_err_t rtos_mutex_release(rtos_mutex_t mutex);

[0303] When using this function interface, only the thread that already has control of the mutex can release it. Each time the mutex is released, the hold count is reduced by 1. When the hold count of the mutex reaches zero (that is, the holding thread has released all holding operations), the mutex becomes available and the thread waiting on the semaphore will be awakened. If the thread's running priority is raised by the mutex, then when the mutex is released, the thread returns to its priority before holding the mutex. Table 13 shows the input parameters and return value of this function:

[0304] Table 13

[0305]

[0306] In a single-track bidirectional section, if there is a train in one direction, there cannot be a mutex to control the train route in the opposite direction. Mutexes cannot be used in interrupt service routines.

[0307] Event sets can also serve as a mechanism for inter-thread synchronization. An event set can contain multiple events, enabling one-to-many and many-to-many inter-thread synchronization. The following example illustrates events using the two-by-two fail-safe pattern.

[0308] like Figure 16 As shown, the section between the traffic lights a1 and b1 is section S. The processor CPU1 determines that the traffic light in section S is green, and the processor CPU1 controls the vehicle to pass through section S.

[0309] Processor CPU1 determines that the traffic light in section S is green, and waits for processor CPU2 to determine whether the traffic light in section S is green. Processor CPU2 determines that the traffic light in section S is green. In this case, processors CPU1 and CPU2 control the vehicle to pass through section S at the same time.

[0310] If CPU1 and CPU2 simultaneously control the vehicle to pass through section S, CPU1 and CPU2 must wait until both conditions, "system handover is complete and input and output are consistent" and "there is movement authorization instruction M", are met before they can depart.

[0311] Here, the processor CPU1 can be regarded as a thread through the segment S, and "system switching completed, input and output consistent" and "movement authorization instruction M" can be regarded as the occurrence of events. In this case, the thread can be awakened by a specific event; it can also be awakened by any single event; it can also be awakened by multiple events occurring simultaneously.

[0312] The vehicle control device includes a first part A1 and a second part B1. The first part A1 and the second part B1 are parallel and serve as backup for each other.

[0313] Each of the first part A1 and the second part B1 can be found in Figure 20 As shown, the CPU1 process monitors the CPU1 register and communicates with both CPU1 and CPU2. During the communication between CPU1 and CPU2, the CPU1 process compares the registers of CPU1 and CPU2 and controls the communication between CPU1 and CPU2. The CPU2 process monitors the CPU2 register and communicates with both CPU1 and CPU2.

[0314] The connection between the first part A1 and the second part B1 can be seen in Figure 21 As shown, the processor CPU1 process of the first part A1 is connected to a sampling input, the processor CPU2 process of the first part A1 is connected to another sampling input, the processor CPU1 process of the second part B1 is connected to a sampling input, and the processor CPU2 process of the second part B1 is connected to another sampling input. The above sampling inputs are all connected to input devices. The CPU1 and CPU2 of the first part A1 are synchronously controlled and connected to the safety output relay. The safety output relay is used to switch the master-slave relationship between the first part A1 and the second part B1. The safety output relay is connected to the output device.

[0315] The platform's main cycle task execution platform management layer needs to perform functions periodically, including the implementation of input two-by-two cut system management, input processing module, two-out-of-two voting, output processing module, self-test and other functions, and system tick clock.

[0316] The secure computer platform's communication functions are centrally handled by the platform management layer software. Input data for communication with external devices is periodically queried and parsed by the platform management layer software. Data requiring application processing is stored in the platform's input data buffer for query and processing by the application software. When outputting data, the application software stores the data in the application output buffer, which is then periodically queried and output by the platform management layer software. After each data transmission, the platform software clears the transmission buffer.

[0317] The platform management layer implements the two-by-two-take-two function of the secure computer platform software in the main cycle task, hides the redundant and voting functional details from the application layer, and maintains the relative independence and modularity of the application software.

[0318] The backup system between the two systems of the platform needs to be periodically synchronized with the main system to maintain output consistency, and the communication between the main and backup systems adopts a secure communication protocol.

[0319] Figure 22 A flow chart showing the periodic reporting of position and status information by a vehicle. Figure 23 This figure shows the process of handling emergency braking when the vehicle loses braking force. When a fault occurs, CPU1 or CPU2 detects inconsistent braking force signals through the input port and fails to send a timely feed signal, causing the watchdog to reset and the system to initiate a safety strategy. Emergency braking is executed.

[0320] Event sets are primarily used for inter-thread synchronization. Unlike semaphores, they can implement one-to-many and many-to-many synchronization. Specifically, a thread can be associated with multiple events in such a way that any one event wakes up the thread, or the thread wakes up for subsequent processing only after the arrival of several events. Similarly, multiple threads can synchronize multiple events. This collection of multiple events can be represented by a 32-bit unsigned integer variable, with each bit representing an event. Threads link one or more events together using logical AND or logical OR operations to form event combinations. The logical OR of events is also known as independent synchronization, meaning a thread synchronizes with any one of the events. The logical AND of events is also known as associated synchronization, meaning a thread synchronizes with multiple events.

[0321] The event set defined by RTOS-Thread has the following characteristics: events are only related to threads and are independent of each other: each thread can have 32 event flags, which are recorded using a 32-byte unsigned integer, with each byte representing an event; events are only used for synchronization and do not provide data transmission functions; events are not queued, that is, sending the same event to a thread multiple times (if the thread has not had time to read it) is equivalent to sending it only once.

[0322] In RTOS-Thread, each thread has an event information flag with three attributes: RTOS_EVENT_FLAG_AND (logical AND), RTOS_EVENT_FLAG_OR (logical OR), and RTOS_EVENT_FLAG_CLEAR (clear flag). When a thread waits for event synchronization, it can use 32 event flags and this event information flag to determine whether the currently received event meets the synchronization conditions.

[0323] In RTOS-Thread, the event set control block is a data structure used by the operating system to manage events. It is represented by the struct rtos_event structure. Another C notation, rtos_event_t, represents the handle of the event set. In C, it is implemented as a pointer to the event set control block. The detailed definition of the event set control block structure is shown in the following code:

[0324] struct rtos_event

[0325] {

[0326] struct rtos_ipc_object parent; / * inherited from ipc_object class* /

[0327] / * Event set, each bit represents an event, and the value of the bit can mark whether an event occurs* /

[0328] rtos_uint32_t set;

[0329] };

[0330] / * rtos_event_t is a pointer to an event structure* /

[0331] typedef struct rtos_event* rtos_event_t;

[0332] The rtos_event object is derived from rtos_ipc_object and is managed by the IPC container.

[0333] The event set control block contains important parameters related to the event set and plays a key role in implementing the event set's functionality. The event set-related interface is shown in the figure below. Operations on an event set include: creating / initializing an event set, sending events, receiving events, and deleting / detaching from an event set.

[0334] When creating an event set, the kernel first creates an event set control block and then performs basic initialization on the event set control block. The following function interface is used to create an event set:

[0335] rtos_event_t rtos_event_create(const char* name, rtos_uint8_t flag);

[0336] When calling this function interface, the system will allocate an event set object from the object manager, initialize this object, and then initialize the parent class IPC object. Table 14 shows the input parameters and return values ​​of this function:

[0337] Table 14

[0338]

[0339] When the event set object created by rtos_event_create() is no longer used, system resources can be released by deleting the event set object control block. The following function interface can be used to delete the event set:

[0340] rtos_err_t rtos_event_delete(rtos_event_t event);

[0341] When calling the rtos_event_delete function to delete an event set object, you should ensure that the event set is no longer in use. Before deleting, all threads suspended on the event set will be awakened (the return value of the thread is -RTOS_ERROR), and then the memory block occupied by the event set object will be released. Table 15 shows the input parameters and return value of this function:

[0342] Table 15

[0343]

[0344] The memory for a static event set object is allocated by the compiler during system compilation and is generally placed in the read-write data segment or the uninitialized data segment. Before using a static event set object, it must be initialized. To initialize an event set, use the following function interface:

[0345] rtos_err_t rtos_event_init(rtos_event_t event, const char* name,rtos_uint8_t flag);

[0346] When calling this interface, you need to specify the handle of the static event set object (that is, the pointer to the event set control block). The system will then initialize the event set object and add it to the system object container for management. Table 16 shows the input parameters and return values ​​of this function:

[0347] Table 16

[0348]

[0349] When the event set object initialized by rtos_event_init() is no longer used, system resources can be released by detaching the event set object control block. Detaching the event set means detaching the event set object from the kernel object manager. The following function interface is used to detach the event set:

[0350] rtos_err_t rtos_event_detach(rtos_event_t event);

[0351] When the user calls this function, the system first wakes up all threads hanging on the waiting queue of the event set (the return value of the thread is - RTOS_ERROR), and then detaches the event set from the kernel object manager. Table 17 shows the input parameters and return values ​​of this function:

[0352] Table 17

[0353]

[0354] The send event function can send one or more events in the event set, as follows:

[0355] rtos_err_t rtos_event_send(rtos_event_t event, rtos_uint32_t set);

[0356] When using this function interface, the event flag value of the event set object is set through the event flag specified by the parameter set, and then the waiting thread list waiting on the event set object is traversed to determine whether there is a thread whose event activation request matches the current event object event flag value. If so, the thread is awakened. Table 18 shows the input parameters and return value of this function:

[0357] Table 17

[0358]

[0359] The kernel uses a 32-bit unsigned integer to identify an event set. Each bit represents an event, so an event set object can simultaneously wait for 32 events. The kernel can choose how to activate a thread by specifying a selection parameter: "Logical AND" or "Logical OR." Using the "Logical AND" parameter activates the thread only when all waiting events occur, while using the "Logical OR" parameter activates the thread as long as at least one waiting event occurs. Receiving events uses the following function interface:

[0360] rtos_err_t rtos_event_recv(rtos_event_t event,

[0361] rtos_uint32_t set,

[0362] rtos_uint8_t option,

[0363] rtos_int32_t timeout,

[0364] rtos_uint32_t* recved);

[0365] When the user calls this interface, the system first determines whether the event it is going to receive has occurred based on the set parameter and the receiving option. If it has occurred, the system determines whether to reset the corresponding flag of the event based on whether the option parameter is set to RTOS_EVENT_FLAG_CLEAR, and then returns (where the recved parameter returns the received event). If it has not occurred, the set and option parameters to be waited for are filled into the thread's own structure, and then the thread is suspended on this event until the event it is waiting for meets the conditions or the waiting time exceeds the specified timeout. If the timeout is set to zero, it means that when the event to be received by the thread does not meet its requirements, it will not wait and will directly return - RTOS_ETIMEOUT. Table 18 shows the input parameters and return values ​​of this function:

[0366] Table 17

[0367]

[0368] The possible values ​​for option are:

[0369] / * Select the logical AND or logical OR method to receive events* /

[0370] RTOS_EVENT_FLAG_OR

[0371] RTOS_EVENT_FLAG_AND

[0372] / * Select clear reset event flag * /

[0373] RTOS_EVENT_FLAG_CLEAR

[0374] The application example of the event set initializes an event set and two threads. One thread waits for the event it is interested in to occur, and the other thread sends the event. All external input signals of the platform are transferred by relays and converted into relay contacts for collection by the two systems A and B of the platform. The digital signals are collected by the safety input board inside the platform. The input signals are sent to the main control. Below, the interaction between the input circuit board and the main control board is used as an example to illustrate the data flow of the digital input, as follows Figure 24 shown.

[0375] The processor CPU collects the input signal 1 and the input signal 1' through the collection circuit, and the two processor CPUs exchange the collected input signal 1 and the input signal 1'.

[0376] The CPU compares the input signals collected by the two channels, filters input signal 1 and input signal 1', and compares whether the input signals 1 and input signal 1' collected by the two channels are consistent; (There are two acquisition configuration methods: front contact configuration method and front and back contact configuration method)

[0377] The first processor CPU1 and the second processor CPU2 each exchange data encapsulated by the input data encapsulation security protocol.

[0378] The first processor CPU1 and the second processor CPU2 both hold each other's data and their own data and vote on the data.

[0379] The first processor CPU1 and the second processor CPU2 exchange voting results. After both votes are passed, the first processor CPU1 sends the data to the main control module through the bus CAN.

[0380] In the main control board, the first processor CPU1 reads the data packet in the buffer received by the bus CAN;

[0381] In the main control board, the first processor CPU1 sends the data packet to channel 2; the first processor CPU1 and the second processor CPU2 both receive the data packet;

[0382] In the main control board, the first processor CPU1 uploads the parsed data packet to the application software.

[0383] How to use the event set. Thread 1 receives events twice, using the "logical OR" and "logical AND" methods respectively.

[0384] Event sets can be used in a variety of situations and can replace semaphores to a certain extent for synchronization between threads. A thread or interrupt service routine sends an event to the event set object, and then the waiting thread is awakened and processes the corresponding event. However, unlike semaphores, the event sending operation is not cumulative before the event is cleared, while the release action of the semaphore is cumulative. Another feature of events is that the receiving thread can wait for multiple events, that is, multiple events correspond to one thread or multiple threads. At the same time, according to the parameters that the thread is waiting for, you can choose whether to trigger with "logical or" or "logical and". This feature is also not available in semaphores, etc. Semaphores can only recognize a single release action, and cannot wait for multiple types of releases at the same time. The following figure shows a schematic diagram of multi-event reception:

[0385] For rail transit signal control, it is instantiated as a real-time multi-tasking operating system semaphore control.

[0386] Route status information, protection section status information, signal status information, turnout status information, platform door status information, logical section locking status information, platform emergency close button status information, axle counting status information, temporary speed limit information, handover status information, handover train information

[0387] Data transmission between subsystems is primarily performed using periodic communication. For messages with high timing requirements, triggered communication is used. Table 18 lists the event set.

[0388] Table 18

[0389]

[0390] It's important to note that an event set contains 64 events, and a specific thread only waits for and receives events of interest. A single thread can wait for multiple events (threads 1 and 2 each wait for multiple events, and events can be combined using AND or OR logic to trigger threads), or multiple threads can wait for a single event (event 25). When an event of interest occurs, the thread is awakened and performs subsequent processing.

[0391] <Equipment Example>

[0392] Figure 25 is a schematic diagram of the hardware structure of a vehicle control device according to another embodiment.

[0393] like Figure 25As shown, the vehicle control device 2500 includes a processor 2510 and a memory 2520, wherein the memory 2520 is used to store an executable computer program, and the processor 2510 is used to execute a method such as any of the above method embodiments under the control of the computer program.

[0394] Each module of the above vehicle control device 2500 can be implemented by the processor 2510 in this embodiment executing a computer program stored in the processor 2510, or can be implemented by other circuit structures, which is not limited here.

[0395] Figure 26 is a schematic diagram of the hardware structure of a vehicle according to another embodiment.

[0396] like Figure 26 As shown, the vehicle 2600 includes a processor 2610 and a memory 2620, wherein the memory 2620 is used to store an executable computer program, and the processor 2610 is used to execute a method such as any of the above method embodiments under the control of the computer program.

[0397] Each module of the above vehicle 2600 can be implemented by the processor 2610 in this embodiment executing a computer program stored in the processor 2610, or can be implemented by other circuit structures, which is not limited here.

[0398] Figure 27 is a schematic diagram of a vehicle control system according to some embodiments of the present disclosure.

[0399] like Figure 27 As shown, the vehicle control system includes a vehicle control device 2500 and a vehicle 2600 .

[0400] The present disclosure may be a system, method and / or computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.

[0401] A computer-readable storage medium can be a tangible device that can hold and store instructions for use by an instruction execution device. A computer-readable storage medium can be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or raised-in-groove structure on which instructions are stored, and any suitable combination thereof. As used herein, a computer-readable storage medium is not to be construed as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through an electrical wire.

[0402] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions to be stored in the computer-readable storage medium in each computing / processing device.

[0403] The computer program instructions for performing the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, the state information of the computer-readable program instructions is used to personalize an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), so that the electronic circuit can execute the computer-readable program instructions, thereby implementing various aspects of the present disclosure.

[0404] Various aspects of the present disclosure are described herein with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present disclosure. It should be understood that each block of the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer-readable program instructions.

[0405] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device is generated that implements the functions / actions specified in one or more blocks in the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, where these instructions cause the computer, programmable data processing device, and / or other device to operate in a specific manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing various aspects of the functions / actions specified in one or more blocks in the flowchart and / or block diagram.

[0406] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more blocks in the flowchart and / or block diagram.

[0407] The flowcharts and block diagrams in the accompanying drawings show the possible implementation architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment or part of an instruction, and the module, program segment or part of the instruction contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions. It is well known to those skilled in the art that implementation by hardware, implementation by software, and implementation by a combination of software and hardware are all equivalent.

[0408] The embodiments of the present disclosure have been described above. The above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terms used herein are selected to best explain the principles of the embodiments, their practical applications, or technical improvements in the marketplace, or to enable other persons skilled in the art to understand the embodiments disclosed herein. The scope of the present disclosure is defined by the appended claims.

Claims

1. A vehicle control method, characterized in that: include: receiving a stop request indicating a target stop at which the vehicle is to stop; wherein, if the stop request is a get-off request, the target stop is the destination station to which the passenger is to go, as obtained from ticket information; the ticket information is obtained by the vehicle identifying the passenger based on identification information input by the passenger through a preset window, and obtaining the passenger's ticket information from a ticket inspection system based on the identification result, the identification information including biometric information, and the biometric information including facial image information, pupil iris information, or fingerprint information of the passenger; When the operating mode is the first operating mode, the first vehicle is controlled to operate to the target station according to the stop request and the signal information of at least one target resource on the operating route of the first vehicle; wherein the target resource includes an operating section or a station, and the scenario corresponding to the first operating mode is a scenario in which multiple vehicles operate on one operating route; The semaphore information of the at least one target resource is updated according to the operation of the first vehicle; wherein the semaphore information includes a first semaphore or a second semaphore, the first semaphore includes an open semaphore and a locked semaphore, the second semaphore has a semaphore value, and the semaphore value is a natural number.

2. The vehicle control method according to claim 1, characterized in that: Also includes: When the operation mode is the second operation mode, the first vehicle is controlled to directly operate from the current position to the target site according to the parking request.

3. The vehicle control method according to claim 1, characterized in that: Also includes: When it is detected that there are other running vehicles on the track line where the first vehicle is located, the operating mode is controlled to be the first operating mode.

4. The vehicle control method according to claim 2, wherein: Also includes: When it is detected that there are no other running vehicles on the track line where the first vehicle is located, the operating mode is controlled to be the second operating mode.

5. The vehicle control method according to claim 1, characterized in that: The controlling the first vehicle to run to the target site according to the stop request and the signal quantity information of at least one target resource on the first vehicle running route includes: If the stop request is a get-off request carrying a destination station identifier, controlling the first vehicle to run from the current first position to the destination station and then stop and open the doors based on the get-off request and semaphore information of at least one target resource on the first vehicle's running route; and / or, In the case where the stop request is a boarding request that carries a boarding station identifier and a boarding direction, the first vehicle is controlled to run from the current second position to the boarding station and then stop and open the door based on the boarding request and the semaphore information of at least one target resource on the first vehicle's operating route.

6. The vehicle control method according to claim 2, characterized in that: The controlling the first vehicle to directly run from the current position to the target site according to the parking request includes: If the stop request is a get-off request carrying a destination station identifier, controlling the first vehicle to run directly from the current first position to the destination station and then stop and open the door according to the get-off request; and / or, In the case where the parking request is a boarding request carrying a boarding station identifier and a boarding direction, the first vehicle is controlled according to the boarding request to run directly from the current second position to the boarding station, stop, and open the door.

7. The vehicle control method according to claim 1, characterized in that: The semaphore information includes a first semaphore, and the first semaphore includes: an open semaphore and a locked semaphore; The controlling the first vehicle to run to the target site according to the stop request and the signal quantity information of at least one target resource on the first vehicle running route includes: Obtaining a first semaphore of a next target resource on the first vehicle operation route; When the first semaphore is an on semaphore, controlling the first vehicle to acquire the next target resource; The updating of the semaphore information of the at least one target resource according to the operation of the first vehicle includes: After controlling the first vehicle to acquire the next target resource, the first semaphore of the next target resource segment is switched from an open semaphore to a locked semaphore.

8. The vehicle control method according to claim 7, characterized in that: The semaphore information of the target resource also includes a thread waiting queue of the target resource, and the method further includes: When the first semaphore is a locked semaphore, the first vehicle is added to a first thread waiting queue corresponding to a next target resource, and the first vehicle is controlled to obtain the next target resource according to the first thread waiting queue.

9. The vehicle control method according to claim 1, characterized in that: The semaphore information includes a second semaphore, and the second semaphore information has a semaphore value; The controlling the first vehicle to run to the target site according to the stop request and the signal quantity information of at least one target resource on the first vehicle running route includes: Acquire a second signal quantity of a next target resource of the first vehicle on the running route; wherein the next target resource includes a plurality of target sub-resources; When the semaphore value of the second semaphore is greater than 0, controlling the first vehicle to acquire a target sub-resource of the next target resource; The updating of the semaphore information of the at least one target resource according to the operation of the first vehicle includes: When the first vehicle accesses the target sub-resource, controlling the semaphore value of the second semaphore to decrease by 1; After the first vehicle finishes accessing the target sub-resource, the semaphore value of the second semaphore is controlled to increase by 1.

10. The vehicle control method according to claim 9, characterized in that: The semaphore information also includes a thread waiting queue of the target resource, and the method further includes: When the semaphore value of the second semaphore is equal to 0, the first vehicle is added to the second thread waiting queue corresponding to the next target resource, and the first vehicle is controlled to obtain the target sub-resource according to the second thread waiting queue.

11. The vehicle control method according to claim 1, wherein: The semaphore information includes a thread waiting queue of a target resource, and controlling the first vehicle to run to the target site according to the stop request and the semaphore information of at least one target resource on the first vehicle running route includes: When the first vehicle enters a waypoint, the first vehicle is placed in a third thread waiting queue of the waypoint according to the entry order of the first vehicle; The first vehicle is controlled to exit the waypoint according to the order of the first vehicle in the third thread waiting queue of the waypoint.

12. The vehicle control method according to claim 1, characterized in that: The semaphore information includes a thread waiting queue of a target resource, and controlling the first vehicle to run to the target site according to the stop request and the semaphore information of at least one target resource on the first vehicle running route includes: When the first vehicle enters a waypoint, obtaining a priority of the first vehicle; adding the first vehicle to an outbound thread waiting queue of an intermediate station according to the priority of the first vehicle; The first vehicle is controlled to exit from the intermediate station according to the exit thread waiting queue.

13. The vehicle control method according to claim 1, characterized in that: The semaphore information includes a thread waiting queue of the target resource and a first semaphore, wherein the first semaphore includes: an open semaphore and a locked semaphore; The controlling the first vehicle to run to the target site according to the stop request and the signal quantity information of at least one target resource on the first vehicle running route includes: When a second vehicle occupies the target resource and the first vehicle is the next vehicle to access the target resource after the second vehicle, obtaining a first thread priority of a first thread controlling the operation of the first vehicle and a second thread priority of a second thread controlling the operation of the second vehicle; When the first thread priority is higher than the second thread priority and the first semaphore of the target resource is a locked semaphore, the first thread priority of the first thread is modified to the second thread priority.

14. The vehicle control method according to claim 13, characterized in that: After the first priority of the first vehicle is modified to the second priority of the second vehicle, the method further includes: When the first semaphore of the target resource is switched from a locked semaphore to an open semaphore, the priority of the first thread is modified from the current second thread priority to the first thread priority.

15. The method according to claim 1, wherein Also includes: receiving a door opening request instructing the first vehicle to open a door, and controlling the first vehicle to close a door according to the door closing request; or, receiving an emergency stop request instructing the first vehicle to stop urgently, and controlling the first vehicle to stop urgently according to the emergency stop request; or, A door opening request instructing the first vehicle to open a door is received, and when the first vehicle is parked, the first vehicle is controlled to open a door according to the door opening request.

16. The vehicle control method according to claim 1, characterized in that: Also includes: Receiving an alarm signal from an alarm system, wherein the alarm signal includes: a fire alarm signal, a smoke alarm signal, or a vehicle fault alarm signal; The first vehicle is controlled to stop urgently and open the door according to the alarm signal.

17. A vehicle control method, characterized in that: include: Obtain the target station to which the passenger is to go, and send a stop request indicating the target station to be stopped; wherein, the stop request is used to request the vehicle control device, when the operating mode is the first operating mode, to control the first vehicle to run to the target station according to the stop request and semaphore information of at least one target resource on the first vehicle operating route; wherein, the target resource includes an operating section or a station; the semaphore information includes a first semaphore or a second semaphore, the first semaphore includes an open semaphore and a locked semaphore, and the second semaphore has a semaphore value, and the semaphore value is a natural number; when the stop request is a get-off request, the target station is the destination station to which the passenger is to go obtained based on the ticket information, and the scenario corresponding to the first operating mode is a scenario where multiple vehicles run on one operating route; The step of obtaining the target station to which the passenger is going includes: Receiving identification information input by a passenger through a preset window; wherein the identification information includes biometric information, and the biometric information includes facial image information, pupil iris information, or fingerprint information of the passenger; Identify the passenger based on the identification information, and obtain the passenger's ticket information from the ticket checking system based on the identification result; The target station to which the passenger is going is obtained according to the ticket information.

18. The vehicle control method according to claim 17, characterized in that: The first vehicle includes a plurality of interactive buttons; The step of obtaining the target station to which the passenger is going includes: In response to a passenger's first operation on a station button among the multiple interactive buttons, a station corresponding to the station button is obtained as the target station.

19. The vehicle control method according to claim 18, characterized in that: After obtaining the station corresponding to the station button as the target station, the method further includes: In response to the passenger's second operation on the station button among the multiple interactive buttons, the station corresponding to the station button is cancelled as the target station.

20. The vehicle control method according to claim 18, wherein: The method further comprises: In response to a first operation on a vehicle control button among the plurality of interactive buttons, an action request indicating an action corresponding to the vehicle control button is sent.

21. The vehicle control method according to claim 20, characterized in that: The vehicle control buttons include: a door opening button, a door closing button, and / or an emergency stop button; the sending of an action request indicating an action corresponding to the vehicle control button includes: In a case where the vehicle control button is a door opening button, in response to a first operation on the door opening button, sending a door opening request instructing the first vehicle to open a door; In a case where the vehicle control button is a door closing button, in response to a first operation on the door closing button, sending a door closing request instructing the first vehicle to close a door; In a case where the vehicle control button is an emergency stop button, in response to a first operation on the emergency stop button, an emergency stop request instructing the first vehicle to emergency stop is sent.

22. The vehicle control method according to claim 20, characterized in that: Before responding to the first operation of the vehicle control button among the plurality of interactive buttons, the method further includes: Receive authorization application information sent through the permission control window; If the authorization application information meets the preset authorization conditions, respond to the first operation of the vehicle control button among the multiple interactive buttons; otherwise, do not respond to the first operation of the vehicle control button among the multiple interactive buttons.

23. The vehicle control method according to claim 18 or 19, characterized in that: The multiple interactive buttons are physical buttons, or the multiple interactive buttons are touch buttons.

24. The vehicle control method according to claim 18 or 19, characterized in that: The method further comprises: When the interactive button is in the selected state, display a prompt message; When the interactive button is not selected, no prompt information is displayed.

25. A vehicle control method, characterized in that: The method comprises: After detecting that a user has checked in and entered the station, the first vehicle is determined according to the user's boarding direction, and a boarding request carrying a boarding station identifier is sent to the first vehicle; wherein the running direction of the first vehicle is the same as the boarding direction; the semaphore information of at least one target resource on the running route of the first vehicle is used to control the first vehicle to run to the target station, and the semaphore information of the at least one target resource is updated according to the operation of the first vehicle when the operating mode is the first operating mode; the target resource includes an operating section or a station; the semaphore information includes a first semaphore or a second semaphore, and the first semaphore includes an opening semaphore and a locking semaphore. The second semaphore has a semaphore value, which is a natural number; in the case that the stop request sent to the first vehicle is a get-off request, the target station is the destination station to which the passenger is going according to the ticket information, the ticket information is the vehicle identifying the passenger according to the identification information received from the passenger input through a preset window, and obtaining the passenger's ticket information from the ticket checking system according to the identification result, the identification information includes biometric information, and the biometric information includes the passenger's facial image information, pupil iris information, or fingerprint information. The scenario corresponding to the first operating mode is a scenario in which multiple vehicles run on an operating route.

26. A vehicle control device, characterized in that: The invention comprises a memory and a processor, wherein the memory is used to store a computer program; and the processor is used to execute the computer program to implement the vehicle control method according to any one of claims 1 to 16.

27. A vehicle, characterized in that: It includes a memory and a processor, the memory is used to store a computer program; the processor is used to execute the computer program to implement the vehicle control method according to any one of claims 17 to 24.

28. A vehicle control system, characterized in that: Comprising the vehicle control device as claimed in claim 26 and the vehicle as claimed in claim 27.

29. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the vehicle control method according to any one of claims 1 to 25.

Citation Information

Patent Citations

  • Rail transportation system with wireless network control

    CN101905702A

  • Automatic guided vehicle scheduling method and system

    CN103488176A

  • Train scheduling method, scheduling device, scheduling system, terminal equipment and train

    CN110857110A