Method for controlling execution of instructions, controlled device, station server and execution device
By determining the consistency of the sender of the control command in the controlled device and requesting the station server to confirm the current control mode, the problem of execution errors caused by mode inconsistency in the passenger service system is solved, and the accurate execution of control commands during mode switching is achieved.
Patent Information
- Application Number
- CN202210031723.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-12
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2042-01-12
AI Technical Summary
After the control mode switch, the existing passenger service system may experience mode inconsistencies between the central server and the station server, leading to errors when the controlled equipment executes control commands.
The controlled device determines whether to execute the control command by checking if the sender of the current control command is consistent with the sender of the previous control command. If they are inconsistent, the device requests the current control mode from the station server and determines whether to execute the control command based on the obtained control mode and sender.
When the modes between the central server and the station server are inconsistent, errors in the controlled equipment when executing control commands are avoided, thus improving the reliability and stability of the system.
Smart Images

Figure CN116466613B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the field of rail transit technology, and in particular to a control instruction execution method, a controlled device, a station server and an execution device. BACKGROUND
[0002] A passenger service system generally adopts a primary and secondary control mode to control the controlled devices such as broadcasting devices and guiding devices in a station. The primary control mode is a central control mode in which the controlled devices are controlled by a central server, and the secondary control mode is a station control mode in which the controlled devices are controlled by a station server.
[0003] Currently, in a general application scenario, the passenger service system runs in the central control mode. When the central server fails or needs to start the secondary control mode due to other reasons, the passenger service system will switch to run in the station control mode.
[0004] However, after the control mode conversion of the existing passenger service system, the mode inconsistency between the central server and the station server may occur, resulting in errors in the execution of the control instructions by the controlled devices. SUMMARY
[0005] The present application provides a control instruction execution method, a controlled device, a station server and an execution device, which can avoid errors in the execution of control instructions by the controlled devices when the mode inconsistency between the central server and the station server occurs.
[0006] To achieve the above-mentioned purpose, the present application adopts the following technical solutions:
[0007] In a first aspect, the present application provides a control instruction execution method applied to a controlled device, comprising: in the case of receiving a current control instruction, determining whether the sender of the current control instruction is consistent with the sender of a previous control instruction; if it is determined that the sender of the current control instruction is inconsistent with the sender of the previous control instruction, sending a confirmation request for obtaining the current control mode of the service system to the station server; receiving the current control mode sent by the station server, and determining whether to execute the current control instruction according to the current control mode and the sender of the current control instruction.
[0008] The technical solution provided in the present application includes the following steps: when a controlled device receives a current control instruction, the controlled device does not directly execute the current control instruction, but compares the sender of the current control instruction with the sender of a previous control instruction to determine whether they are consistent. When it is determined that the sender of the current control instruction is inconsistent with the sender of the previous control instruction, it is indicated that the service system may have switched modes. Since mode switching in the service system is generally triggered by the station server and then the station server notifies the center server, the control mode of the station server is the control mode corresponding to the current application requirement. Therefore, when it is determined that the service system may have switched modes, the controlled device can request the station server to obtain the current control mode of the service system, and then determine whether to execute the current control instruction according to the obtained current control mode and the sender of the current control instruction. It can be seen that in the technical solution provided in the present application, the controlled device determines whether to execute the current control instruction by confirming the current control mode from the station server when the service system may have switched modes, so that when the modes of the center server and the station server are inconsistent, the controlled device can avoid errors when executing the control instruction.
[0009] Optionally, in a possible design, the above-mentioned "determining whether to execute the current control instruction according to the current control mode and the sender of the current control instruction" can include the following steps:
[0010] In the case where the current control mode is the station control mode, if the sender of the current control instruction is the station server, it is determined to execute the current control instruction, and if the sender of the current control instruction is the center server, it is determined not to execute the current control instruction.
[0011] In the case where the current control mode is the center control mode, if the sender of the current control instruction is the station server, it is determined not to execute the current control instruction, and if the sender of the current control instruction is the center server, it is determined to execute the current control instruction.
[0012] Optionally, in another possible design, after the above-mentioned "determining to execute the current control instruction", the control instruction execution method provided in the present application can further include the following step:
[0013] updating the previous control instruction with the current control instruction.
[0014] Optionally, in another possible design, after the above-mentioned "determining whether the sender of the current control instruction is consistent with the sender of the previous control instruction", the control instruction execution method provided in the present application can further include the following step:
[0015] if it is determined that the sender of the current control instruction is consistent with the sender of the previous control instruction, it is determined to execute the current control instruction.
[0016] In a second aspect, the present application provides a method for controlling execution of an instruction, which is applied to a station server and includes: receiving a confirmation request sent by a controlled device; the confirmation request is a request sent by the controlled device to the station server in a case where it is determined that a sender of a current control instruction received is inconsistent with a sender of a previous control instruction, and the confirmation request is used to acquire a current control mode of a service system; and sending a confirmation response carrying the current control mode to the controlled device.
[0017] Since mode switching in the service system is generally triggered by the station server side and then notified to the center server by the station server, and the center server can not be updated to the mode after switching in time due to network problems and the like, the control mode of the station server is an accurate control mode corresponding to the current application requirement. Therefore, the station server can send a confirmation response carrying the current control mode to the controlled device when the controlled device requests to acquire the current control mode. In this way, the controlled device can determine whether to execute the current control instruction according to the acquired current control mode, so as to avoid errors in execution of the control instruction by the controlled device when the modes of the center server and the station server are inconsistent.
[0018] Optionally, in another possible design, the method for controlling execution of an instruction provided by the present application further includes:
[0019] sending a network connection request to the center server in a case where the mode switching instruction is acquired;
[0020] if a network connection response sent by the center server is received within a first preset time length, sending an interrupt control instruction to the center server; the interrupt control instruction is used to instruct the center server to stop sending control instructions to the controlled device, and the interrupt control instruction carries a station control identifier of the station server;
[0021] if the network connection response is not received within the first preset time length, periodically sending a network connection request to the center server according to a preset period;
[0022] in a process of periodically sending the network connection request to the center server, if the network connection response is received, sending an interrupt control instruction to the center server.
[0023] In a third aspect, the present application provides a controlled device, which includes: a judgment module, a sending module, a receiving module and a determination module.
[0024] The judgment module is used to judge whether a sender of a current control instruction is consistent with a sender of a previous control instruction in a case where the receiving module receives the current control instruction.
[0025] The sending module is configured to send a confirmation request to the station server if the determination module determines that the sender of the current control instruction is inconsistent with the sender of the last control instruction; the confirmation request is used to obtain the current control mode of the service system.
[0026] The receiving module is configured to receive the current control mode sent by the station server.
[0027] The determination module is configured to determine whether to execute the current control instruction according to the current control mode received by the receiving module and the sender of the current control instruction.
[0028] Optionally, in a possible design manner, the determination module is specifically configured to:
[0029] In the case where the current control mode is the station control mode, if the sender of the current control instruction is the station server, it is determined to execute the current control instruction; if the sender of the current control instruction is the center server, it is determined not to execute the current control instruction.
[0030] In the case where the current control mode is the center control mode, if the sender of the current control instruction is the station server, it is determined not to execute the current control instruction; if the sender of the current control instruction is the center server, it is determined to execute the current control instruction.
[0031] Optionally, in another possible design manner, the control instruction execution apparatus provided in the present application can further include an updating module.
[0032] The updating module is configured to update the last control instruction with the current control instruction after the determination module determines to execute the current control instruction.
[0033] Optionally, in another possible design manner, the determination module is further configured to, after the determination module determines whether the sender of the current control instruction is consistent with the sender of the last control instruction, if it is determined that the sender of the current control instruction is consistent with the sender of the last control instruction, determine to execute the current control instruction.
[0034] In a fourth aspect, the present application provides a station server, including a receiving module and a sending module.
[0035] The receiving module is configured to receive a confirmation request sent by a controlled device; the confirmation request is a request sent by the controlled device to the station server in the case where it is determined that the sender of the received current control instruction is inconsistent with the sender of the last control instruction, and the confirmation request is used to obtain the current control mode of the service system.
[0036] The sending module is configured to send a confirmation response to the controlled device; the confirmation response carries the current control mode.
[0037] Optionally, in a possible design, the sending module is further configured to:
[0038] In the case where the mode switching instruction is acquired, a network connection request is sent to the central server;
[0039] If the network connection response sent by the central server is received within the first preset time length, an interrupt control instruction is sent to the central server; the interrupt control instruction is used to instruct the central server to stop sending control instructions to the controlled device, and the interrupt control instruction carries the station control identifier of the station server;
[0040] If the network connection response is not received within the first preset time length, the network connection request is periodically sent to the central server according to a preset period;
[0041] In the process of periodically sending the network connection request to the central server, if the network connection response is received, the interrupt control instruction is sent to the central server.
[0042] In a fifth aspect, the present application provides a control instruction execution apparatus, which comprises a memory, a processor, a bus and a communication interface; the memory is configured to store computer execution instructions; the processor is connected to the memory through the bus; when the control instruction execution apparatus is running, the processor executes the computer execution instructions stored in the memory, so that the control instruction execution apparatus executes the control instruction execution method provided in the first aspect or the second aspect.
[0043] Optionally, the control instruction execution apparatus can further comprise a transceiver, which is configured to execute the steps of receiving, sending or processing data, signaling or information under the control of the processor of the control instruction execution apparatus, for example, receiving the current control instruction.
[0044] Further optionally, the control instruction execution apparatus can be a physical machine for executing control instructions, or can be a part of the apparatus in the physical machine, for example, can be a chip system in the physical machine. The chip system is configured to support the control instruction execution apparatus to implement the functions involved in the first aspect or the second aspect, for example, to receive, send or process the data and / or information involved in the control instruction execution method. The chip system comprises a chip, and can further comprise other discrete devices or circuit structures.
[0045] In a sixth aspect, the present application provides a computer readable storage medium, and the computer readable storage medium stores instructions; when a computer executes the instructions, the computer executes the control instruction execution method provided in the first aspect or the second aspect.
[0046] In a seventh aspect, the present application provides a computer program product, which comprises computer instructions, when the computer instructions are executed on a computer, the computer is caused to execute the method for controlling execution of instructions as provided in the first aspect or the second aspect.
[0047] In an eighth aspect, the present application provides a system for controlling execution of instructions, which comprises a central server, the controlled device as provided in the third aspect, and the station server as provided in the fourth aspect.
[0048] It should be noted that the above computer instructions can be stored on a computer readable storage medium in whole or in part. The computer readable storage medium can be packaged together with the processor of the device for controlling execution of instructions, or can be packaged separately from the processor of the device for controlling execution of instructions, and the present application does not limit the same.
[0049] The description of the third aspect to the eighth aspect in the present application can refer to the detailed description of the first aspect or the second aspect; and the beneficial effects of the description of the third aspect to the eighth aspect can refer to the beneficial effect analysis of the first aspect or the second aspect, which will not be repeated here.
[0050] In the present application, the name of the above device for controlling execution of instructions does not constitute a limitation on the device or the functional module itself, and in actual implementation, these devices or functional modules can appear with other names. As long as the functions of each device or functional module are similar to those of the present application, they belong to the scope of the claims of the present application and equivalent technologies.
[0051] These aspects or other aspects of the present application will be more apparent in the following description. BRIEF DESCRIPTION OF DRAWINGS
[0052] Figure 1 An architectural schematic diagram of a system for controlling execution of instructions provided by an embodiment of the present application;
[0053] Figure 2 A flow schematic diagram of a method for controlling execution of instructions provided by an embodiment of the present application;
[0054] Figure 3 A flow schematic diagram of another method for controlling execution of instructions provided by an embodiment of the present application;
[0055] Figure 4 A flow schematic diagram of still another method for controlling execution of instructions provided by an embodiment of the present application;
[0056] Figure 5 A flow schematic diagram of still another method for controlling execution of instructions provided by an embodiment of the present application;
[0057] Figure 6A scene schematic diagram of a passenger service system provided by an embodiment of the present application is shown in FIG. 1.
[0058] Figure 7 A scene schematic diagram of another passenger service system provided by an embodiment of the present application is shown in FIG. 2.
[0059] Figure 8 A scene schematic diagram of still another passenger service system provided by an embodiment of the present application is shown in FIG. 3.
[0060] Figure 9 A scene schematic diagram of still another passenger service system provided by an embodiment of the present application is shown in FIG. 4.
[0061] Figure 10 A structure schematic diagram of a controlled device provided by an embodiment of the present application is shown in FIG. 5.
[0062] Figure 11 A structure schematic diagram of a station server provided by an embodiment of the present application is shown in FIG. 6.
[0063] Figure 12 A structure schematic diagram of an execution device of a control instruction provided by an embodiment of the present application is shown in FIG. 7. DETAILED DESCRIPTION
[0064] The execution method of a control instruction, the controlled device, the station server and the execution device provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0065] The term "and / or" in this document merely describes an association relationship of associated objects, and indicates that there can be three relationships, for example, A and / or B can represent three cases of existence of A alone, existence of A and B simultaneously, and existence of B alone.
[0066] The terms "first" and "second" and the like in the specification and drawings of the present application are used to distinguish different objects, or to distinguish different treatments of the same object, and are not used to describe a specific order of the objects.
[0067] In addition, the terms "include" and "have" and any variations thereof mentioned in the description of the present application are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but can optionally include other steps or units not listed or can optionally include other steps or units inherent to the process, method, product or device.
[0068] It should be noted that in the embodiments of the present application, the words "exemplary" or "for example" are used to mean serving as an example, instance, or illustration. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of the present application should not be construed as being more preferred or advantageous than other embodiments or design schemes. In fact, the use of the words "exemplary" or "for example" is intended to present concepts in a particular manner.
[0069] In the description of the present application, the meaning of "a plurality of" is two or more, unless otherwise specified.
[0070] The passenger service system generally adopts a primary and secondary control mode to control the broadcast equipment and guide equipment and other controlled devices in the station. Among them, the primary control mode is a central control mode in which the central server controls the controlled devices, and the secondary control mode is a station control mode in which the station server controls the controlled devices.
[0071] At present, in general application scenarios, the passenger service system runs in the central control mode, and when the central server fails or needs to start the secondary control mode due to other reasons, the passenger service system will be converted to run in the station control mode.
[0072] However, after the control mode conversion of the existing passenger service system, the mode inconsistency between the central server and the station server may occur, resulting in errors in the execution of the control instructions by the controlled devices.
[0073] In view of the problems existing in the prior art, the embodiments of the present application provide a control instruction execution method applied to a controlled device. In the method, the controlled device can determine whether the mode switching of the service system is possible by the consistency of the sender of the current control instruction and the sender of the last control instruction. And in the case of determining that the mode switching is possible, the controlled device determines whether to execute the current control instruction by confirming the current control mode from the station server. In this way, when the mode inconsistency between the central server and the station server occurs, the errors in the execution of the control instructions by the controlled devices can be avoided.
[0074] The control instruction execution method provided by the embodiments of the present application can be applied to a control instruction execution system. Figure 1 A structure of the control instruction execution system is shown. As shown in Figure 1 The control instruction execution system includes a central server 01, a station server 02, and at least one controlled device 03. The central server 01 is connected with each controlled device 03, and the station server 02 is connected with each controlled device 03.
[0075] The center server 01 and the station server 02 can be physical machines (such as servers) or virtual machines (VMs) deployed on physical machines.
[0076] The controlled device 03 can be a broadcasting device and a guiding device in a station, and the like. The controlled device 03 can receive a control instruction sent by the center server 01 or the station server 02, and perform a corresponding action according to the received control instruction.
[0077] The following describes the execution system of the control instruction shown in the above Figure 1 The execution system of the control instruction shown in the above
[0078] The processing process of the station server 02 on each controlled device 03 in the embodiment of the application is the same, and the following description of the embodiment of the application will be described by taking the processing of the station server 02 on one controlled device 03 as an example.
[0079] Referring to Figure 2 The control instruction execution method provided in the embodiment of the application includes S201-S203:
[0080] S201, the controlled device determines whether the sender of the current control instruction is consistent with the sender of the last control instruction in the case of receiving the current control instruction.
[0081] The control instruction execution system to which the control instruction execution method provided in the embodiment of the application is applied can be a passenger service system. When the passenger service system runs in a center control mode, the control of the controlled device in the passenger service system is realized by sending a control instruction to the controlled device by the center server. When the passenger service system runs in a station control mode, the control of the controlled device in the passenger service system is realized by sending a control instruction to the controlled device by the station server. Then, the controlled device can determine whether the control mode of the passenger service system is switched by judging the consistency of the sender of the current control instruction and the sender of the last control instruction.
[0082] The last control instruction can be the last received control instruction stored by the controlled device.
[0083] For example, if the controlled device determines that the sender of the current control instruction is the station server and the sender of the last control instruction is the center server, it can be determined that the sender of the current control instruction is inconsistent with the sender of the last control instruction; or if the controlled device determines that the sender of the current control instruction is the center server and the sender of the last control instruction is the station server, it can be determined that the sender of the current control instruction is inconsistent with the sender of the last control instruction.
[0084] S202, if the controlled device determines that the sender of the current control instruction is inconsistent with the sender of the last control instruction, sends a confirmation request to the station server.
[0085] The confirmation request is used to obtain the current control mode of the service system.
[0086] Generally, the mode switching in the passenger service system is triggered by the station server side. In one possible implementation, when the passenger service system is in the central control mode, if the network of the central server is abnormal and the network connection with the controlled device is interrupted, the controlled device will issue an alarm information to remind the station staff that the control of the controlled device by the central server is abnormal at this time. The station staff can switch the central control mode to the station control mode according to the alarm information issued by the controlled device. For example, the central control mode of the station server can be switched to the station control mode by triggering the electronic device connected to the station server. In another possible implementation, when there is a special operation demand in the station, the station staff can also trigger the electronic device connected to the station server to switch the central control mode of the station server to the station control mode. That is, when the mode switching is performed in the passenger service system, the station server side first performs the mode switching. Therefore, in the control instruction execution method provided in the present application, when the controlled device determines that the sender of the current control instruction is inconsistent with the sender of the last control instruction, the controlled device can send a confirmation request to the station server to obtain the current control mode of the service system.
[0087] Optionally, if the controlled device determines that the sender of the current control instruction is consistent with the sender of the last control instruction, the current control instruction can be determined to be executed.
[0088] In the case where the sender of the current control instruction is consistent with the sender of the last control instruction, it indicates that the control mode has not changed, and the current control instruction can be directly executed without sending a confirmation request to the station server for confirmation, so as to improve the speed of the controlled device executing the control instruction.
[0089] S203, the controlled device receives the current control mode sent by the station server, and determines whether to execute the current control instruction according to the current control mode and the sender of the current control instruction.
[0090] Optionally, in the case that the current control mode is the station control mode, if the sender of the current control instruction is the station server, the controlled device determines to execute the current control instruction, and if the sender of the current control instruction is the center server, the controlled device determines not to execute the current control instruction; in the case that the current control mode is the center control mode, if the sender of the current control instruction is the station server, the controlled device determines not to execute the current control instruction, and if the sender of the current control instruction is the center server, the controlled device determines to execute the current control instruction.
[0091] If the controlled device receives the current control mode sent by the station server as the station control mode, if the sender of the current control instruction is the center server, it indicates that although the station server has made mode change, the center server has not made mode change in time, that is, at this time, the station server and the center server are both controlling the controlled device, and both send control instructions to the controlled device. At this time, the controlled device only needs to execute the control instruction sent by the station server. That is, in the case that the current control mode is the station control mode, if the current control instruction is sent by the station server, the controlled device can execute the current control instruction, and if the current control instruction is sent by the center server, the controlled device does not execute the current control instruction.
[0092] Similarly, if the controlled device receives the current control mode sent by the station server as the center control mode, if the sender of the current control instruction is the station server, it indicates that the control system of the station server may be abnormal, causing the station server not to execute according to the current control mode and send an error instruction to the controlled device. At this time, the controlled device only needs to execute the control instruction sent by the center server according to the center control mode. That is, in the case that the current control mode is the center control mode, if the current control instruction is sent by the station server, the controlled device does not execute the current control instruction, and if the current control instruction is sent by the center server, the controlled device executes the current control instruction.
[0093] Optionally, if the controlled device determines that the sender of the current control instruction is inconsistent with the sender of the last control instruction, that is, it is determined that the control mode has changed, after the controlled device determines to execute the current control instruction, the controlled device can update the last control instruction with the current control instruction, so as to ensure that the change of the sender of the control instruction can still be used to judge whether the control mode has changed subsequently.
[0094] In the control command execution method provided in this application embodiment, when the controlled device receives the current control command, it does not directly execute the current control command. Instead, it first compares the sender of the current control command with the sender of the previous control command to determine their consistency. When it is determined that the sender of the current control command is inconsistent with the sender of the previous control command, it indicates that the service system may have undergone a mode switch. Since mode switching within the service system is generally triggered by the station server, and then the station server notifies the central server, the control mode of the station server corresponds to the control mode of the current requirement. Therefore, when the controlled device determines that the service system may have undergone a mode switch, it can request the current control mode of the service system from the station server, and then determine whether to execute the current control command based on the obtained current control mode and the sender of the current control command. It can be seen that in the technical solution provided in this application embodiment, when the service system may have undergone a mode switch, the controlled device determines whether to execute the current control command by confirming the current control mode with the station server. This can prevent errors when the controlled device executes control commands when the modes between the central server and the station server are inconsistent.
[0095] In summary, as described above, Figure 3 As shown, Figure 2 Step S203 can be replaced by S2031-S2032:
[0096] S2031. The controlled device receives the current control mode sent by the station server. If the current control mode is the station control mode, and the sender of the current control instruction is the station server, the controlled device will execute the current control instruction. If the sender of the current control instruction is the central server, the controlled device will not execute the current control instruction.
[0097] S2032. When the current control mode is the central control mode, if the sender of the current control command is the station server, the controlled device will determine not to execute the current control command; if the sender of the current control command is the central server, the controlled device will determine to execute the current control command.
[0098] Reference Figure 4 This application also provides a method for executing control instructions, applied to... Figure 1 The station server 02 in the control command execution system is shown. For example... Figure 4 As shown, the execution method of this control command may include S401-S402:
[0099] S401, The station server receives the confirmation request sent by the controlled device.
[0100] The confirmation request is a request sent by the controlled device to the station server in a case where it is determined that the sender of the current control instruction received is inconsistent with the sender of the last control instruction, and the confirmation request is used to obtain the current control mode of the service system.
[0101] S402, the station server sends a confirmation response carrying the current control mode to the controlled device.
[0102] In the execution method of the control instruction provided by the embodiments of the present application, the mode switching in the service system is generally triggered by the station server side, and then the center server is notified by the station server. The center server may not update to the switched mode in time due to network problems, and therefore the control mode of the station server is the accurate control mode corresponding to the current application requirement. Therefore, the station server can send a confirmation response carrying the current control mode to the controlled device when the controlled device requests to obtain the current control mode. In this way, the controlled device can determine whether to execute the current control instruction according to the obtained current control mode, so as to avoid errors in the execution of the control instruction by the controlled device when the modes of the center server and the station server are inconsistent.
[0103] Optionally, as shown in Figure 5 The embodiments of the present application also provide an execution method of a control instruction, applied to the station server 02 in the execution system of the control instruction as shown in Figure 1 As shown in Figure 5 The execution method of the control instruction can include S501-S503:
[0104] S501, the station server sends a network connection request to the center server in a case where a mode switching instruction is obtained.
[0105] Exemplarily, the mode switching instruction can be triggered by a trigger operation performed by a staff in the station on an electronic device connected with the station server, and is used to trigger the station server to switch the mode. It should be noted that in the embodiments of the present application, the mode switching instruction specifically refers to switching from the center control mode to the station control mode. After the station server switches the mode according to the mode switching instruction, the center server can be notified to switch the mode. Since the center server may have network abnormalities, the station server can first send a network connection request to the center server in a case where the mode switching instruction is obtained, to confirm whether the network of the center server is abnormal.
[0106] S502, if the station server receives a network connection response sent by the center server within a first preset time length, an interrupt control instruction is sent to the center server.
[0107] The interrupt control instruction is used to instruct the center server to stop sending control instructions to the controlled device, and the interrupt control instruction carries a station control identifier of the station server. The first preset time length can be a time length determined by a person in advance.
[0108] If the station server receives the network connection response sent by the center server within the first preset time length, it indicates that the network of the center server is normal. Then, the station server can send an interrupt control instruction to the center server. After receiving the interrupt control instruction, the center server stops controlling the controlled device, that is, stops sending control instructions to the controlled device.
[0109] S503, if the station server does not receive the network connection response within the first preset time length, periodically sends a network connection request to the center server according to a preset period. During the process of periodically sending the network connection request to the center server, if the network connection response is received, the interrupt control instruction is sent to the center server.
[0110] If the station server does not receive the network connection response sent by the center server within the first preset time length, it indicates that the network of the center server is abnormal, and the station server cannot normally notify the center server to change the mode. At this time, the station server can periodically send a network connection request to the center server, to confirm the network state of the center server, so as to timely obtain the message and notify the center server to change the mode when the network of the center server is normal.
[0111] In order to more clearly illustrate that the execution method of the control instruction provided in the embodiments of the present application can avoid errors of the controlled device when executing the control instruction, the following will be specifically described in detail through several specific application scenarios.
[0112] Referring to Figure 6 , a scene schematic diagram of a passenger service system is provided. The scene is a normal application scenario. As shown in Figure 6 , in this scenario, the passenger service system is controlled by the center server. In this scenario, the center server, the station server and the controlled device are all in the center control mode, and the center server can periodically synchronize data with the station server.
[0113] Referring to Figure 7 , another scene schematic diagram of a passenger service system is provided. As shown in Figure 7As shown in the figure, the scenario is that the center server network is normal and the station server changes the control mode to the station control mode. In this scenario, the station server can notify the center server to change the mode after the station server changes the mode itself. After receiving the notification, the center server stops sending control instructions to the controlled device, and the station server sends control instructions to the controlled device to realize the control of the controlled device. At this time, the center server can stop the periodic synchronization of data with the station server. In this scenario, the center server, the station server and the controlled device are all in the station control mode.
[0114] In Figure 6 and Figure 7 two scenarios, the modes of various devices in the passenger service system are unified, so there is no problem of error in the execution of control instructions by the controlled device due to the inconsistency of the modes of the devices in the system.
[0115] Referring to Figure 8 , another scenario schematic diagram of the passenger service system is provided. As shown in the figure, Figure 8 , the scenario is that the center server network is abnormal, and the station server changes the control mode to the station control mode. In this scenario, the station server fails to notify the center server to change the mode due to the abnormality of the center server network, and the station server can periodically attempt to notify the center server to change the mode until the center server network recovers. In this scenario, the station server and the controlled device are in the station control mode, and the center server is in the center control mode and changes to the station control mode after the network recovers.
[0116] In Figure 8 the scenario provided, although the modes of various devices in the passenger service system are not unified, the center server cannot send control instructions to the controlled device due to the abnormality of the center server network and the interruption of the link between the center server and the controlled device, so the station device only receives the control instructions sent by the station server, and at this time, there is no error in the execution of control instructions by the controlled device due to the inconsistency of the modes.
[0117] Referring to Figure 9 , another scenario schematic diagram of the passenger service system is provided. As shown in the figure, Figure 9 , the scenario is that the center server network is normal, the station server changes the control mode to the station control mode, but the station server fails to notify the center server to change the mode due to some reasons. In this scenario, the station server and the controlled device are in the station control mode, and the center server is in the center control mode. At this time, the center server and the station server simultaneously send control instructions to the controlled device.
[0118] In Figure 9In the provided scenario, although the modes of the devices in the passenger service system are not unified, the controlled device will confirm the control mode with the station server when the sender of the current control instruction is not consistent with the sender of the last control instruction. In this way, when the controlled device confirms that the current control mode is the station control mode, it only executes the control instruction sent by the station server and discards the control instruction sent by the center server, so that the controlled device will not execute the control instruction incorrectly due to the inconsistent modes.
[0119] Optionally, in the execution method of the control instruction provided in the embodiments of the application, the functions in the station control mode can also be configured. For example, the user can configure the functions in the station control mode on the interface of the electronic device (such as a mobile phone, a tablet computer, and a desktop computer) corresponding to the station server. Specifically, the user can lock the current interface on the interface of the electronic device, close the interface of the unavailable function, and only open the interface of the function to the administrator in the station control mode. By configuring the functions in the station control mode, the application requirements of different users in different scenarios can be met, the cost of fault maintenance can be reduced, and the availability and maintainability of the passenger service system are increased.
[0120] Figure 10 A possible structure diagram of the controlled device 03 in the execution system of the control instruction involved in the above embodiments is shown. The controlled device 03 includes a judgment module 31, a sending module 32, a receiving module 33, and a determination module 34.
[0121] The judgment module 31 performs S201 in the above method embodiments, the sending module 32 performs S202 in the above method embodiments, the receiving module 33 performs the part of receiving the current control mode sent by the station server in S203 in the above method embodiments, and the determination module 34 performs the part of determining whether to execute the current control instruction according to the current control mode and the sender of the current control instruction in S203 in the above method embodiments.
[0122] Specifically, the judgment module 31 is configured to determine whether the sender of the current control instruction is consistent with the sender of the last control instruction when the receiving module 33 receives the current control instruction.
[0123] The sending module 32 is configured to send a confirmation request to the station server if the judgment module 31 determines that the sender of the current control instruction is not consistent with the sender of the last control instruction. The confirmation request is used to obtain the current control mode of the service system.
[0124] The receiving module 33 is configured to receive the current control mode sent by the station server.
[0125] The determining module 34 is configured to determine whether to execute the current control instruction according to the sender of the current control instruction and the current control mode received by the receiving module 33.
[0126] Optionally, in a possible implementation, the determining module 34 is specifically configured to:
[0127] In the case where the current control mode is the station control mode, if the sender of the current control instruction is the station server, it is determined to execute the current control instruction, and if the sender of the current control instruction is the center server, it is determined not to execute the current control instruction.
[0128] In the case where the current control mode is the center control mode, if the sender of the current control instruction is the station server, it is determined not to execute the current control instruction, and if the sender of the current control instruction is the center server, it is determined to execute the current control instruction.
[0129] Optionally, in another possible implementation, the control instruction execution apparatus provided in the present application can further include an updating module.
[0130] The updating module is configured to update the previous control instruction with the current control instruction after the determining module 34 determines to execute the current control instruction.
[0131] Optionally, in another possible implementation, the determining module 34 is further configured to, after the judging module 31 judges whether the sender of the current control instruction is consistent with the sender of the previous control instruction, if it is determined that the sender of the current control instruction is consistent with the sender of the previous control instruction, determine to execute the current control instruction.
[0132] Optionally, the controlled device 03 can further include a storage module, which is configured to store program codes and the like of the controlled device 03.
[0133] Figure 11 A possible structural schematic diagram of the station server 02 in the control instruction execution system involved in the above embodiments is shown. The station server 02 includes a receiving module 21 and a sending module 22.
[0134] The receiving module 21 performs S401 in the method embodiments, and the sending module 22 performs S402 in the method embodiments.
[0135] Specifically, the receiving module 21 is configured to receive an acknowledgement request sent by the controlled device. The acknowledgement request is a request sent by the controlled device to the station server in the case where it is determined that the sender of the current control instruction received is inconsistent with the sender of the previous control instruction, and the acknowledgement request is used to obtain the current control mode of the service system.
[0136] The sending module 22 is configured to send a confirmation response to the controlled device, and the confirmation response carries the current control mode.
[0137] Optionally, in a possible design, the sending module 22 is further configured to:
[0138] In the case of obtaining the mode switching instruction, send a network connection request to the central server;
[0139] If the network connection response sent by the central server is received within the first preset time length, send an interrupt control instruction to the central server, and the interrupt control instruction is used to instruct the central server to stop sending control instructions to the controlled device, and the interrupt control instruction carries the station control identifier of the station server;
[0140] If the network connection response is not received within the first preset time length, periodically send a network connection request to the central server according to a preset period;
[0141] In the process of periodically sending the network connection request to the central server, if the network connection response is received, send an interrupt control instruction to the central server.
[0142] Optionally, the station server 02 can further include a storage module, configured to store program codes and the like of the station server 02.
[0143] As shown in Figure 12 The embodiment of the present application further provides a control instruction execution apparatus, including a memory 41, a processor 42 (42-1 and 42-2), a bus 43, and a communication interface 44; the memory 41 is configured to store computer execution instructions, the processor 42 is connected with the memory 41 through the bus 43; when the control instruction execution apparatus runs, the processor 42 executes the computer execution instructions stored in the memory 41, so that the control instruction execution apparatus executes the control instruction execution method applied to the controlled device or the control instruction execution method of the station server provided in the above embodiment.
[0144] In a specific implementation, as an embodiment, the processor 42 can include one or more central processing units (CPUs), for example, the CPU0 and the CPU1 shown in Figure 12 As an embodiment, the control instruction execution apparatus can include multiple processors 42, for example, the processor 42-1 and the processor 42-2 shown in Figure 12 Each CPU in these processors 42 can be a single-CPU or a multi-CPU. Here, the processor 42 can refer to one or more devices, circuits, and / or processing cores for processing data (for example, computer program instructions).
[0145] The memory 41 can be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM), or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disk storage, a magnetic disk storage or other magnetic storage devices, or any other medium capable of storing desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited thereto. The memory 41 can exist independently, and is connected to the processor 42 through the bus 43. The memory 41 can also be integrated with the processor 42.
[0146] In a specific implementation, the memory 41 is configured to store data in the present application and computer-executable instructions corresponding to software programs for implementing the present application. The processor 42 can control various functions of the execution device by running or executing the software programs stored in the memory 41 and calling the data stored in the memory 41.
[0147] The communication interface 44 uses any transceiver-like device for communicating with other devices or communication networks, such as a control system, a radio access network (RAN), a wireless local area network (WLAN), etc. The communication interface 44 can include a receiving unit for receiving functions and a sending unit for sending functions.
[0148] The bus 43 can be an industry standard architecture (ISA) bus, a peripheral component interconnect (PCI) bus, an extended industry standard architecture (EISA) bus, etc. The bus 43 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 12 Only one thick line is used in the figure, but it does not mean that there is only one bus or only one type of bus.
[0149] As an example, in combination with Figure 10 the function implemented by the receiving module in the controlled device is the same as the function implemented by the receiving unit in Figure 12 the function implemented by the determining module in the controlled device is the same as the function implemented by the processor in Figure 12 the function implemented by the storage module in the controlled device is the same as the function implemented by the memory in Figure 12 .
[0150] The explanation of the related content in the embodiment can refer to the above method embodiments, which will not be described here.
[0151] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above-mentioned division of functional modules is taken as an example for illustration, and in actual application, the above-mentioned functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device and unit described above can refer to the corresponding process in the foregoing method embodiments, which will not be described here.
[0152] The embodiment of the present application also provides a computer readable storage medium, and the computer readable storage medium stores instructions, when the computer executes the instructions, the computer executes the execution method of the control instruction applied to the controlled device or the execution method applied to the station server provided by the above-mentioned embodiment.
[0153] The computer readable storage medium, for example, can be, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a RAM, a ROM, an erasable programmable read-only memory (EPROM), a register, a hard disk, an optical fiber, a CD-ROM, an optical storage device, a magnetic storage device, or any suitable combination of the foregoing, or any other medium from which a computer can read instructions. The exemplary storage medium is coupled to the processor such that the processor can read information from, and write information to, the storage medium. Of course, the storage medium can be a part of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC). In an embodiment of the present application, the computer readable storage medium can be any tangible medium that can contain or store program codes in the form of instructions or data structures and that can be accessed by the instruction execution system, apparatus, or device.
[0154] The above description is merely illustrative of the application, and the scope of the application should be determined by reasonable interpretation of the appended claims.
Claims
1. A method for controlling execution of an instruction, applied to a controlled device, characterized in that, The method comprises the following steps: In the case of receiving a current control instruction, it is judged whether the sender of the current control instruction is consistent with the sender of a previous control instruction; If it is determined that the sender of the current control instruction is not consistent with the sender of the previous control instruction, a confirmation request is sent to a station server; the confirmation request is used to obtain a current control mode of a service system; The current control mode sent by the station server is received, and it is determined whether to execute the current control instruction according to the current control mode and the sender of the current control instruction, comprising: in the case of the current control mode being a station control mode, if the sender of the current control instruction is the station server, it is determined to execute the current control instruction, and if the sender of the current control instruction is a center server, it is determined not to execute the current control instruction; in the case of the current control mode being a center control mode, if the sender of the current control instruction is the station server, it is determined not to execute the current control instruction, and if the sender of the current control instruction is the center server, it is determined to execute the current control instruction; Wherein, the control mode comprises a center control mode and a running station control mode, in the case of the current control mode being the center control mode, the current control instruction to be executed is a control instruction sent by the center server, and in the case of the current control mode being the running station control mode, the current control instruction to be executed is an execution instruction sent by the station server.
2. The method of controlling execution of an instruction according to claim 1, wherein, After the current control instruction is determined to be executed, the method further comprises: The current control instruction is used to update the previous control instruction.
3. The method of controlling execution of an instruction according to claim 1, wherein, After it is judged whether the sender of the current control instruction is consistent with the sender of the previous control instruction, the method further comprises: If it is determined that the sender of the current control instruction is consistent with the sender of the previous control instruction, it is determined to execute the current control instruction.
4. A method of controlling execution of an instruction, applied to a station server, characterized by, The method comprises the following steps: A confirmation request sent by a controlled device is received; The confirmation request is a request sent by the controlled device to the station server in the case of determining that the sender of a received current control instruction is not consistent with the sender of a previous control instruction, and the confirmation request is used to obtain a current control mode of a service system; A confirmation response is sent to the controlled device; the confirmation response carries the current control mode; A confirmation response is sent to the controlled device; the confirmation response carries the current control mode; The control mode includes a central control mode and a running station control mode, when the current control mode is the central control mode, a current control instruction required to be executed by the controlled device is sent by a central server, when the current control mode is the running station control mode, the current control instruction required to be executed by the controlled device is sent to the controlled device; in the case that a mode switching instruction is acquired, a network connection request is sent to the central server; if the network connection response sent by the central server is received within a first preset time length, an interrupt control instruction is sent to the central server; the interrupt control instruction is used for instructing the central server to stop sending control instructions to the controlled device, and the interrupt control instruction carries a station control identifier of the station server; if the network connection response is not received within the first preset time length, the network connection request is periodically sent to the central server according to a preset period; in the process of periodically sending the network connection request to the central server, if the network connection response is received, the interrupt control instruction is sent to the central server.
5. A device to be controlled, characterized in that Comprise: The judgment module is used for judging whether the sender of the current control instruction is consistent with the sender of a previous control instruction in the case that the receiving module receives the current control instruction; The sending module is used for sending a confirmation request to a station server if the judgment module determines that the sender of the current control instruction is not consistent with the sender of the previous control instruction; the confirmation request is used for acquiring a current control mode of a service system; The receiving module is used for receiving the current control mode sent by the station server; The determination module is used for determining whether to execute the current control instruction according to the current control mode received by the receiving module and the sender of the current control instruction, including: in the case that the current control mode is a station control mode, if the sender of the current control instruction is the station server, it is determined to execute the current control instruction, and if the sender of the current control instruction is a central server, it is determined not to execute the current control instruction; in the case that the current control mode is a central control mode, if the sender of the current control instruction is the station server, it is determined not to execute the current control instruction, and if the sender of the current control instruction is the central server, it is determined to execute the current control instruction; The control mode includes a central control mode and a running station control mode, when the current control mode is the central control mode, a current control instruction required to be executed by the controlled device is sent by a central server, when the current control mode is the running station control mode, the current control instruction required to be executed is an execution instruction sent by the station server.
6. A station server, characterized by Comprise: The receiving module is used for receiving a confirmation request sent by a controlled device; The confirmation request is a request sent by the controlled device to the station server when it is determined that the sender of the current control instruction received is inconsistent with the sender of the last control instruction, and the confirmation request is used to obtain the current control mode of the service system; The sending module is configured to send a confirmation response to the controlled device, and the confirmation response carries the current control mode; The control mode includes a central control mode and a running station control mode, when the current control mode is the central control mode, the current control instruction required to be executed by the controlled device is sent by the central server, when the current control mode is the running station control mode, the current control instruction required to be executed by the controlled device is sent to the controlled device, in the case of obtaining a mode switching instruction, a network connection request is sent to the central server, if the network connection response sent by the central server is received within a first preset time period, an interrupt control instruction is sent to the central server, the interrupt control instruction is used to instruct the central server to stop sending control instructions to the controlled device, and the interrupt control instruction carries a station control identifier of the station server, if the network connection response is not received within the first preset time period, the network connection request is periodically sent to the central server according to a preset period, and in the process of periodically sending the network connection request to the central server, if the network connection response is received, the interrupt control instruction is sent to the central server.
7. A control command execution device, characterized in that, The memory is configured to store computer execution instructions, the processor and the memory are connected through the bus, and the communication interface is configured to communicate with the outside; When the control instruction execution device is running, the processor executes the computer execution instructions stored in the memory, so that the control instruction execution device executes the control instruction execution method according to any one of claims 1-3 or the control instruction execution method according to claim 4.
8. A computer-readable storage medium, characterized in that, The computer readable storage medium stores instructions, and when the computer executes the instructions, the computer executes the control instruction execution method according to any one of claims 1-3 or the control instruction execution method according to claim 4.
Citation Information
Patent Citations
Rail transit integrated monitoring system and main and backup control center switching method
CN110217273A
Control mode determination method, intelligent vehicle on-based controller and readable storage medium
CN112124377A