A method and system for inferring phases of a multi-ring scheme from phase stages
By determining whether the number of phases input by the user is the same as the number of phases in the current operation plan of the signal controller, an entity phase class is created and the phase duration is calculated. This solves the problem of complex configuration process in traffic signal control, realizes rapid adjustment of phase time without affecting the overall structure, and has good scalability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 湖南力唯中天科技发展有限公司
- Filing Date
- 2023-06-26
- Publication Date
- 2026-05-29
AI Technical Summary
The configuration process in existing traffic signal control is relatively complex, making it difficult to quickly adjust the timing of each phase without affecting the overall structure.
By determining whether the number of stages input by the user is the same as the number of stages in the current operation plan of the signal, an entity phase class is created. This class is used to traverse the initialization end time in each loop, calculate the stage number contained in each phase, and compare the phase duration with the pre-set rules to determine whether the requirements are met.
Without altering the original loop and phase structure relationship, it can quickly calculate the time changes of each phase after adjusting the data of a single stage, satisfying the constraints of traffic signal control, possessing good scalability, and applicable to technologies such as inductive control and green wave coordination.
Smart Images

Figure CN116863686B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of traffic signal control technology, and in particular discloses a method and system for inferring each phase of a multi-loop scheme from the phase stage. Background Technology
[0002] In the context of current internet technology, traffic signal control also strives for scientific and intelligent control, requiring flexible adjustments based on events and time periods at intersections. Traffic signal control often involves multiple light groups, multiple loops, and multiple phases. However, in actual control processes, sometimes only adjustments to individual stages of the scheme are needed, without requiring a complete reconfiguration.
[0003] Existing technical solutions for controlling traffic signals involve numerous and interdependent rules, making the configuration process quite complex.
[0004] Therefore, the configuration process in existing traffic signal control is quite complex, which is a technical problem that urgently needs to be solved. Summary of the Invention
[0005] This invention provides a method and system for inferring each phase of a multi-loop scheme from the phase stage, aiming to solve the technical problem of the complex configuration process in existing traffic signal control.
[0006] One aspect of the present invention relates to a method for inferring each phase of a multi-loop scheme from a phase stage, comprising the following steps:
[0007] Determine whether the number of stages input by the user is the same as the number of stages in the current operation plan of the signal;
[0008] If the number of stages entered by the user is found to be the same as the number of stages in the current running plan, then the end time of each stage formed in the current stage is taken as the end time set. Each end time of the stage is the sum of each stage number in the stage time entered by the user and all the previous stage numbers.
[0009] Create an entity phase class, which includes a list of phase numbers, phase duration, and end time;
[0010] Use the created entity phase class to traverse each ring, initialize an end time in each ring, initialize each phase in the previous traversal of the ring, and calculate the stage number contained in each phase.
[0011] Each phase is initialized with the calculated phase number information and the new phase list input by the user, and the phase end time and duration are updated to obtain the phase duration of each phase.
[0012] The phase duration of each obtained phase is compared with a pre-set rule to determine whether the phase duration meets the pre-set rule.
[0013] Furthermore, in the step of creating an entity phase class, the entity phase class includes member function calculation, which takes the input phase set as input and modifies the duration and end time node in the phase.
[0014] Furthermore, the member function calculation specifically involves retrieving the stage duration from the stage number list, adding the retrieved stage durations together to obtain the new phase duration, retrieving the last stage number of the phase, and using the end time point corresponding to the new stage as the phase end time.
[0015] Furthermore, by using the created entity phase class to traverse each ring, initializing an end time in each ring, initializing each phase in the previous traversal of the ring, and calculating the stage number contained in each phase, the end time of each stage is traversed. If the current stage is earlier than the phase end time and the stage number is greater than the previously added stage number, then the current stage is added as the phase, and the previously added stage number is set to the current stage number.
[0016] Furthermore, in the step of comparing the phase duration of each obtained phase with the pre-set rules to determine whether the phase duration meets the pre-set rules, if the phase duration does not meet the minimum green light duration rule set for the phase, then only the length of each stage is exposed to the outside world, and the user can modify the stage duration.
[0017] Another aspect of the present invention relates to a system for inferring phases of a multi-loop scheme from a phase stage, comprising:
[0018] The first judgment module is used to determine whether the number of stages input by the user is the same as the number of stages in the current operation plan of the signal.
[0019] The forming module is used to, if it is found that the number of stages input by the user is the same as the number of stages in the current running plan, take the end time of each stage formed in the current running plan as the set of end times, where each end time of the stage is the sum of each stage number in the stage time input by the user and all the previous stage numbers.
[0020] The creation module is used to create entity phase classes, which include a list of phase numbers, phase duration, and end time.
[0021] The calculation module is used to traverse each ring using the created entity phase class, initialize an end time in each ring, initialize each phase in the previous traversal of the ring, and calculate the stage number contained in each phase.
[0022] The update module is used to initialize each phase with the calculated phase number information and the new phase list input by the user, and to update the phase end time and duration, and obtain the phase duration of each phase;
[0023] The second judgment module is used to compare the phase duration of each obtained phase with a preset rule to determine whether the phase duration meets the preset rule.
[0024] Furthermore, in the creation module, the entity phase class includes member function calculations, which take the input phase set as input and modify the duration and end time node in the phase.
[0025] Furthermore, the member function calculation specifically involves retrieving the stage duration from the stage number list, adding the retrieved stage durations together to obtain the new phase duration, retrieving the last stage number of the phase, and using the end time point corresponding to the new stage as the phase end time.
[0026] Furthermore, in the calculation module, the end time of each stage is traversed. If the current stage ends earlier than the phase end time and the stage number is greater than the previously added stage number, then the current stage is added to advance the phase, and the previously added stage number is set to the current stage number.
[0027] Furthermore, in the second judgment module, if the phase duration does not meet the minimum green light duration rule set for the phase, only the length of each stage is exposed externally, allowing the user to modify the stage duration.
[0028] The beneficial effects achieved by this invention are as follows:
[0029] This invention provides a method and system for inferring phases of a multi-ring scheme from phase stages. The method involves determining whether the number of stages input by the user is the same as the number of stages in the current operation scheme of the signal. If the user-input number of stages is the same as the current operation scheme, the method uses the end time of each currently formed stage as the set of end times. Each end time is calculated by adding the stage number of each stage to the user-input stage time and summing all previous stage numbers. An entity phase class is created, including a list of stage numbers, phase duration, and end time. The method iterates through each ring using the created entity phase class, initializing an end time in each ring and initializing each phase in the previous iteration, calculating the stage number contained in each phase. The calculated stage number information and the new stage list input by the user are used to initialize each phase, and the phase end time and duration are updated to obtain the phase duration of each phase. The obtained phase duration of each phase is compared with a pre-set rule to determine whether the phase duration meets the pre-set rule. The method and system provided by this invention for inferring each phase of a multi-ring scheme from the phase stage do not change the original structural relationship between the rings and will not cause conflicts due to changes in the stage. Even when faced with complex ring structures, it can quickly calculate the time changes of each phase after adjusting the data of a single stage. It can be used for manual, real-time, remote stage control of traffic lights. Traffic signal control requires phases to meet corresponding constraints, and the phase duration calculated here can easily determine whether the modification meets the requirements. It has good scalability and can provide a foundation for technologies such as inductive control and green wave coordination. Attached Figure Description
[0030] Figure 1 This is a flowchart illustrating an embodiment of a method for inferring each phase of a multi-ring scheme from a phase stage, provided by the present invention.
[0031] Figure 2 This is a schematic diagram of an embodiment of the user-input stage time in this invention;
[0032] Figure 3 This is a schematic diagram of the structure of an embodiment of the end time set in this invention;
[0033] Figure 4 This is a schematic diagram of the structure of an embodiment of the solid phase class in this invention;
[0034] Figure 5 for Figure 4 A schematic diagram of the structure of an embodiment of the intermediate stage numbering list;
[0035] Figure 6 This is a structural diagram of an embodiment of the phase duration in the original scheme;
[0036] Figure 7This is a schematic diagram of the structure of an embodiment of the setting interface in this invention;
[0037] Figure 8 This is a schematic diagram of the structure of one embodiment of the automatically adjusted solution of the present invention;
[0038] Figure 9 This is a functional block diagram of an embodiment of a system for inferring each phase of a multi-loop scheme from the phase stage, provided by the present invention.
[0039] Figure 10 This is a schematic diagram of the traffic signal control channel in this invention.
[0040] Explanation of icon numbers:
[0041] 10. First Judgment Module; 20. Formation Module; 30. Creation Module; 40. Calculation Module; 50. Update Module; 60. Second Judgment Module. Detailed Implementation
[0042] To better understand the above technical solutions, the following will provide a detailed explanation of the technical solutions in conjunction with the accompanying drawings and specific implementation methods.
[0043] like Figures 1 to 8 As shown, the first embodiment of the present invention proposes a method for inferring each phase of a multi-ring scheme from the phase stage, including the following steps:
[0044] Step S100: Determine whether the number of stages input by the user is the same as the number of stages in the current operation plan of the signal.
[0045] Maintaining the same number of stages is a necessary condition for keeping the direct timing structure of each phase unchanged. This embodiment aims to modify the duration without changing the sequence and concurrency relationships of each phase. This way, it is not necessary to reconsider whether there are conflicts between the concurrent phases after modification, or the rationality of the phase sequence adjustment.
[0046] Step S200: If it is detected that the number of stages input by the user is the same as the number of stages in the current running plan, then the end time of each stage formed now is taken as the end time set, wherein each end time of the stage is the sum of each stage number in the stage time input by the user plus all the previous stage numbers.
[0047] The end time set `stageEndSet` is generated by summing the user-input stage time in `newStageTimeList` with the sum of all previous stage numbers. Figure 2 and Figure 3 As shown.
[0048] Step S300: Create an entity phase class, which includes a list of phase numbers, phase duration, and end time.
[0049] Create an entity class `Phase` containing the variable: a list of phase numbers involved in the phase. <integer>The system contains a `phaseStageList`, a `phase` duration, an `endTime`, and a `phase` number (`phaseNo`). It includes a member function `calculate`: It takes the `phaseStageList` as input and modifies the duration and end time of each phase. Specifically, it extracts the durations of the phases from the `phaseNo` list, adds them together to obtain the new duration, and extracts the last phase number, using the new end time as the phase's end time. Figure 4 As shown.
[0050] Step S400: Use the created entity phase class to traverse each ring, initialize an end time in each ring, initialize each phase in the previous traversal of the ring, and calculate the stage number contained in each phase.
[0051] Iterate through each circleList, initializing an end time (endTime = 0) within each circle, and initializing the lastIndex of each phase in the previous iteration to -1. Calculate the phase's included stage number: iterate through the end time of each stage. If the current stage's end time is earlier than the phase's end time, and the stage number is greater than the previously added stage number (if(endTime >= stageEnd && index > lastIndex)), then the stage can be added to the phase. Add the current stage to the phase, and set the previously added stage number to the current stage number (lastIndex = index). After completing the iteration, you will obtain the stage numbers included in all phases, such as... Figure 5 As shown. The end time within a loop is a temporary value generated as an intermediate step in calculating the phase end time within each loop.
[0052] Step S500: Initialize each phase with the calculated phase number information and the new phase list input by the user, and update the phase end time and duration to obtain the phase duration of each phase.
[0053] Each phase is initialized with the stage number information contained in each phase and the new stage list newStageList input by the user, and the end time and duration are updated using the phase's caculate method.
[0054] Step S600: Compare the phase duration of each obtained phase with the preset rules to determine whether the phase duration meets the preset rules.
[0055] Once the specific phase duration for each phase is obtained, it can be determined whether the phase duration meets the preset rules or to issue specific control commands to the traffic lights. For example, whether the minimum green light duration rule set for the phase is met. See [link / reference]. Figures 6 to 8 If the obtained phase duration does not meet the minimum green light duration rule set for the phase, only the length of each stage needs to be exposed externally, and users only need to modify the stage duration.
[0056] The method for inferring each phase of a multi-ring scheme from phase phases provided in this embodiment, compared with the prior art, determines whether the number of phases input by the user is the same as the number of phases in the current operation scheme of the signal. If it is found that the number of phases input by the user is the same as the number of phases in the current operation scheme, then the end time of each phase formed in the current stage is taken as the end time set, wherein each end time of the phase is the sum of each phase in the phase time input by the user plus all the previous phase numbers; an entity phase class is created, which includes a list of phase numbers, phase duration and end time; the created entity phase class is used to traverse each ring, initialize an end time in each ring, initialize each phase in the previous traversal of the ring, and calculate the phase number contained in each phase; the calculated phase number information contained in each phase and the new phase list input by the user are used to initialize each phase, and the phase end time and duration are updated to obtain the phase duration of each phase; the obtained phase duration of each phase is compared with the preset rules to determine whether the phase duration meets the preset rules. The method for inferring each phase of a multi-ring scheme from the phase stage provided in this embodiment does not change the original structural relationship between the rings and will not cause conflicts due to changes in the stage. Even when faced with complex ring structures, it can quickly calculate the time changes of each phase after adjusting the data of a single stage. It can be used for manual, real-time, remote stage control of traffic lights. Traffic signal control requires phases to meet corresponding constraints. The phase duration calculated here can easily determine whether the modification meets the requirements. It has good scalability and can provide a foundation for technologies such as inductive control and green wave coordination.
[0057] like Figure 9 As shown, Figure 9 This invention provides a functional block diagram of an embodiment of a system for inferring phases of a multi-loop scheme from phase stages. In this embodiment, the system includes a first judgment module 10, a forming module 20, a creation module 30, a calculation module 40, an update module 50, and a second judgment module 60. The judgment module 10 is used to determine whether the number of stages input by the user is the same as the number of stages in the current operation scheme of the signal. The forming module 20 is used to, if it detects that the number of stages input by the user is the same as the number of stages in the current operation scheme, take the end time of each currently formed stage as a set of end times, wherein each end time of a stage is each stage in the user-input stage time plus all previous stages. The values are summed from the segment numbers; the creation module 30 is used to create entity phase classes, which include a list of phase numbers, phase duration, and end time; the calculation module 40 is used to traverse each ring using the created entity phase classes, initialize an end time in each ring, initialize each phase in the previous traversal of the ring, and calculate the phase number contained in each phase; the update module 50 is used to initialize each phase with the calculated phase number information contained in each phase and the new phase list input by the user, and update the phase end time and duration to obtain the phase duration of each phase; the judgment module 60 is used to compare the obtained phase duration of each phase with the preset rules to determine whether the phase duration meets the preset rules.
[0058] The unchanged number of stages in the first judgment module 10 is a necessary condition for the unchanged direct timing structure of each phase. This embodiment aims to modify the duration without changing the order and concurrency of each phase, so that it is not necessary to reconsider whether there are conflicts between the concurrent phases after modification, or the rationality of the phase order adjustment.
[0059] Forming module 20 sums the user-input stage time in newStageTimeList with the numbers of all previous stages to form the end time set stageEndSet, such as... Figure 2 and Figure 3 As shown.
[0060] Create module 30 to create an entity class Phase, containing the variable: a list of phase numbers involved in the phase. <integer>The system contains a `phaseStageList`, a `phase` duration, an `endTime`, and a `phase` number (`phaseNo`). It includes a member function `calculate`: It takes the `phaseStageList` as input and modifies the duration and end time of each phase. Specifically, it extracts the durations of the phases from the `phaseNo` list, adds them together to obtain the new duration, and extracts the last phase number, using the new end time as the phase's end time. Figure 4 As shown.
[0061] The calculation module 40 iterates through each ring's `circleList`, initializing an end time `endTime` = 0 within each ring, and initializing the `lastIndex` of each phase from the previous iteration to -1. It then calculates the phase's included stage number: Iterates through the end time of each stage; if the current stage's end time is earlier than the phase's end time, and the stage number is greater than the previously added stage number (`if(endTime>=stageEnd&&index>lastIndex)`), then the stage can be added to the phase. The current stage is then added to the phase, and the previously added stage number is set to the current stage number `lastIndex = index`. After completing the iteration, the stage numbers included in all phases are obtained, such as... Figure 5 As shown.
[0062] The update module 50 initializes each phase with the stage number information contained in each phase and the new stage list newStageList input by the user, and updates the end time and duration using the phase's calculate method.
[0063] After obtaining the specific phase duration of each phase, the second judgment module 60 can determine whether the phase duration meets the preset rules or issue specific control commands to the traffic lights. For example, whether the minimum green light duration rule set for the phase is met. Please see... Figures 6 to 8 If the obtained phase duration does not meet the minimum green light duration rule set for the phase, only the length of each stage needs to be exposed externally, and users only need to modify the stage duration.
[0064] The system for inferring each phase of a multi-loop scheme from phase stages provided in this embodiment, compared with the prior art, employs a first judgment module 10, a forming module 20, a creation module 30, a calculation module 40, an update module 50, and a second judgment module 60. It determines whether the number of stages input by the user is the same as the number of stages in the current operation scheme of the signal. If it is found that the number of stages input by the user is the same as the number of stages in the current operation scheme, then the end time of each currently formed stage is taken as the set of end times. Each end time of a stage is the sum of each stage time in the user-input stage time plus all previous stage numbers. The system involves: creating an entity phase class, which includes a list of phase numbers, phase duration, and end time; traversing each ring using the created entity phase class, initializing an end time within each ring, initializing each phase within the previous traversal of the ring, and calculating the phase number contained in each phase; initializing each phase with the calculated phase number information and the new phase list input by the user, and updating the phase end time and duration to obtain the phase duration of each phase; comparing the obtained phase duration of each phase with pre-set rules to determine whether the phase duration meets the pre-set rules. This embodiment provides a system for inferring phases from phase phases in a multi-ring scheme. It does not change the original structural relationships between rings and will not cause conflicts due to phase changes. Even with complex ring structures, it can quickly calculate the time changes of each phase after adjusting the data of a single phase. It can be used for manual, real-time, remote phase control of traffic lights. Traffic signal control requires phases to meet corresponding constraints; the calculated phase duration can easily determine whether the modification meets the requirements. It has good scalability and can provide a foundation for technologies such as inductive control and green wave coordination.
[0065] like Figures 1 to 10 As shown, the following specific embodiments will be used to illustrate the method and system for inferring each phase of a multi-ring scheme from the phase stage provided by the present invention:
[0066] In traffic signal control, one or more signal controls are called channels (signal light groups are simply referred to as channels), such as CH1 to CH16 in Figure 10. In this control scheme, several channels planned to operate completely synchronously are combined into a phase. Several phases are arranged in a certain order to form a loop, and one or more loops run in parallel to form a scheme. The end of a phase is accompanied by a change in the traffic light, and the timing of this change cuts a cycle into multiple stages. In short, this embodiment automatically calculates the time of each phase based on the original scheme after the user adjusts the duration of each stage. The calculated phase duration can be used by the signal controller to control the execution of traffic lights or to check the feasibility of the scheme (each phase has a minimum green light duration). The reason for adjusting the stage duration instead of directly adjusting the phase is that adjusting the stage duration does not change the parallel and serial logical relationship between the phases of each channel, and adjusting the stage duration is more intuitive and commonly used. If CH6 is in phase P2 in the above figure, CH14 is in phase P5, and CH2 is in phase P3, CH6 and CH14 are allowed to execute together, but CH6 cannot execute together with CH2. If it is necessary to extend the execution time of CH14 at this time, directly extending the length of the phase P5 would cause CH16 and CH2 to be executed simultaneously. The above problem can be avoided by extending the phase S1 or S2 using the method of this embodiment.
[0067] In this embodiment, the definitions of several terms are as follows:
[0068] Phase: A sequence of signals consisting of red-yellow-green or red-green changes assigned to one or more traffic flows (pedestrian traffic lights do not have a yellow light).
[0069] Phase stage: During a signal period, one or more phases simultaneously gain right-of-way.
[0070] A signal light group is a complete combination of three headlights (red, yellow, and green) for vehicles or two headlights (red and green) for pedestrians. A signal light group corresponds to the output of one phase.
[0071] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention. Clearly, those skilled in the art can make various alterations and modifications to the invention without departing from its spirit and scope. Thus, if these modifications and modifications of the invention fall within the scope of the claims and their equivalents, the invention is also intended to include these modifications and modifications.< / integer> < / integer>
Claims
1. A method for inferring each phase of a multi-loop scheme from a phase stage, characterized in that, Includes the following steps: Determine whether the number of stages input by the user is the same as the number of stages in the current operation plan of the signal; If the number of stages input by the user is found to be the same as the number of stages in the current running plan, then the end time of each stage formed in the current stage is taken as the end time set, wherein each end time of the stage is the sum of each stage number in the stage time input by the user and all previous stage numbers. Create an entity phase class, which includes a list of phase numbers, a phase duration, and an end time. Extract the phase durations from the list of phase numbers and add them together to obtain a new phase duration. Extract the last phase number from the phase and use the end time corresponding to the new phase as the phase end time. Using the created entity phase class, traverse each ring, initialize an end time in each ring, initialize each phase in the previous traversal of the ring, calculate the stage number contained in each phase, traverse the end time of each stage, if the current stage is earlier than the phase end time and the stage number is greater than the previously added stage number, then add the current stage to the phase and set the previously added stage number to the current stage number. Each phase is initialized with the calculated phase number information and the new phase list input by the user, and the phase end time and duration are updated to obtain the phase duration of each phase. The phase duration of each phase is compared with the preset rules to determine whether the phase duration meets the preset rules. If the phase duration does not meet the minimum green light duration rule set for the phase, only the length of each stage is exposed to the outside world, and the user can modify the stage duration.
2. The method for inferring each phase of a multi-ring scheme from the phase stage as described in claim 1, characterized in that, In the step of creating an entity phase class, the entity phase class includes member function calculation, which is an input phase set that modifies the duration and end time node of the phase.
3. The method for inferring each phase of a multi-ring scheme from the phase stage as described in claim 2, characterized in that, The member function calculation specifically involves retrieving the phase duration from the phase number list, adding the retrieved phase durations together to obtain the new phase duration, retrieving the last phase number from the phase number list, and using the end time point corresponding to the new phase as the phase end time.
4. A system for inferring each phase of a multi-loop scheme from the phase stage, characterized in that, include: The first judgment module (10) is used to determine whether the number of stages input by the user is the same as the number of stages in the current operation plan of the signal; The forming module (20) is used to, if it is found that the number of stages input by the user is the same as the number of stages in the current running plan, take the end time of each stage currently formed as the end time set, wherein each end time of the stage is the sum of each stage time input by the user and all previous stage numbers. The creation module (30) is used to create an entity phase class, which includes a phase number list, phase duration and end time. The phase duration is obtained by taking the phase number list and adding the phase durations together. The last phase number of the phase is taken out and the end time of the new phase is taken as the end time of the phase. The calculation module (40) is used to traverse each ring using the created entity phase class, initialize an end time in each ring, initialize each phase in the previous traversal of the ring, calculate the stage number contained in each phase, traverse the end time of each stage, and if the current stage is earlier than the phase end time and the stage number is greater than the previously added stage number, then add the current stage to the phase and set the previously added stage number to the current stage number. The update module (50) is used to initialize each phase with the calculated phase number information and the new phase list input by the user, and update the phase end time and duration to obtain the phase duration of each phase. The second judgment module (60) is used to compare the phase duration of each obtained phase with the preset rules and determine whether the phase duration meets the preset rules. If the phase duration does not meet the minimum green light duration rule set for the phase, only the length of each stage is exposed to the outside world, and the user can modify the stage duration.
5. The system for inferring each phase of a multi-ring scheme from the phase stage as described in claim 4, characterized in that, In the creation module (30), the entity phase class includes member function calculation, which is an input phase set that modifies the duration and end time node of the phase.
6. The system for inferring each phase of a multi-ring scheme from the phase stage as described in claim 5, characterized in that, The member function calculation specifically involves retrieving the phase duration from the phase number list, adding the retrieved phase durations together to obtain the new phase duration, retrieving the last phase number from the phase number list, and using the end time point corresponding to the new phase as the phase end time.