A Method for Subscribing and Updating Multi-Source Data of the Client in a Rail Transit Operation and Control System
By grouping management of subscription data and configuring the graphical attribute mapping in the client software of the rail transit control system, the problems of long development cycle, poor flexibility and low real-time efficiency of existing systems during multi-system data fusion are solved, and more efficient data transmission and system stability are achieved.
Patent Information
- Application Number
- CN202111600441.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-24
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2041-12-24
AI Technical Summary
When the existing rail transit control system is integrated with multiple systems, the data forwarding method leads to a long development cycle, poor system flexibility, low real-time efficiency, and high server pressure.
Based on the idea of unified differentiation, the client software groupes the subscription data according to the server group number, constructs the mapping relationship between the configuration symbol attributes and the subscription variables, and initiates subscription and updates variables and symbols.
The software development cycle has been reduced, the data transmission path has been optimized, the data real-timeness has been improved, and the system's stability and flexibility have been improved.
Smart Images

Figure CN114398382B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of rail transit, and particularly relates to a method for subscribing and updating multi-source data of a client of a rail transit operation control system, an electronic device, and a computer-readable storage medium. Background Art
[0002] The train automatic monitoring system, the integrated monitoring system, and the vehicle expert system are important components of rail transit. Currently, the main operation mode is still the relatively independent operation and management of each professional system, with a small amount of data interaction. With the development of the industry, the market prefers an operation control system that integrates multi-system data.
[0003] Currently, when the rail transit motion system realizes multi-system data integration, it adopts a data forwarding method to centralize the data of different servers on the same server, and each client subscribes to the data from this server. The implementation of this method requires developing a large number of data forwarding interfaces for each server, with a long development cycle and poor system flexibility. Due to multiple data forwards, the system real-time efficiency is low, and the data of each system is centralized on the same server, resulting in high server pressure and low efficiency. It can be seen that this method cannot meet the growing industry needs. Summary of the Invention
[0004] The purpose of the present invention is to provide a method for subscribing and updating multi-source data of a client of a rail transit operation control system, an electronic device, and a computer-readable storage medium. The client software groups and manages the subscribed data according to the server group number based on the idea of unified differentiation, constructs a mapping relationship between the configuration diagram symbol attributes and the subscribed variables, and initiates subscriptions and updates variables and diagram symbols according to the data grouping and mapping relationship. This method reduces the software development cycle, optimizes the data transmission path, improves the real-time performance of data, and enhances the stability and flexibility of the system.
[0005] To achieve the above purposes, the present invention is realized through the following technical solutions:
[0006] A method for subscribing and updating multi-source data of a client of a rail transit operation control system, which is applied to the client of the operation control system, includes the following steps:
[0007] S1. Group and import the subscribed variables of each group of servers, where each group of servers has a pre-planned corresponding group number;
[0008] S2. Register the diagram symbols by window, and bind the diagram symbol attributes to variables;
[0009] S3. Initiate subscriptions to each group of servers according to the window, subscription number, and grouping group number;
[0010] S4. Receive the data published by each server, update the variable values and the diagram symbol status, and realize the subscription of multi-data sources.
[0011] Further, step S1 further includes importing user variables of the motion control system client.
[0012] Further, step S1 specifically includes:
[0013] Step S11: Store the subscription variable files exported from different servers in different directories, and establish a correspondence between the directories and the server group numbers; wherein, the subscription variable file is a document that stores all the subscription variables previously exported from each server in the format of numerical type and variable name.
[0014] Step S12: Store the client user variables in a document in the format of numerical type and variable name, and store the user variable file in another directory; wherein, the client user variables in the user variable file are divided into global variables and split-screen variables. The global variables have the same state in multiple screens of the same client, and the variable branch is global. The split-screen variables have different states in multiple screens of the same client, and the variable branch is local.
[0015] Step S13: Import variables from each directory. The variables in different directories are grouped and managed. The variables in the same group are stored separately in the map according to the data type. When importing split-screen variables, multiple copies of the variables will be copied according to the number of monitors, and the variable name will be suffixed with #i to achieve the purpose of different multi-screen states.
[0016] Further, step S2 performs icon registration by window, and binds icon attributes to variables, specifically including:
[0017] Step S21: When the client software first opens a certain window, traverse all the configuration icons in the window to construct a window variable list corresponding to the window, and establish a correspondence between the window variable list and the window name.
[0018] Step S22: Search for each variable in the window variable list from the imported variables, and fill the configuration icon information for the variable management class to achieve the purpose of registering the configuration icons; wherein the configuration icon information includes: datamodel pointer, configuration icon pointer, icon attribute pointer, and data display method.
[0019] Further, when opening the same window on another display screen, since the datamodel of the two views is the same, steps S21 and S22 are not executed repeatedly.
[0020] Further, step S22 uses the red-black tree search method to search for each variable in the window variable list from the imported variables.
[0021] Further, step S3 initiates subscriptions to each group of servers according to the window, subscription number, and grouping group number, specifically including:
[0022] Step S31: For each window, group by server group number to construct a list of grouped variables, and each list of grouped variables has a corresponding relationship with this window;
[0023] Step S32: One window applies for a subscription number and initiates a subscription to each server according to the group number. The subscription information includes: subscription number, server group number, variable names, variable indexes, and data types in the list of grouped variables.
[0024] Further, step S4 receives the data published by each server and updates the variable values and the status of graphic symbols, specifically including:
[0025] Step S41: After receiving the changed data of a certain server, search for variables in groups according to the server group number, data type, and variable index, update the variable values, and record the updated variables;
[0026] Step S42: Traverse all the recorded updated variables and update the status of the configuration graphic symbols according to the graphic symbol registration information.
[0027] Further, step S4 also includes updating the client user variables, specifically including:
[0028] If the client user variables are updated, trigger the script to update the variable values, and then update the status of the configuration graphic symbols according to the graphic symbol registration information.
[0029] An electronic device includes a processor, a communication interface, a memory, and a communication bus. Among them, the processor, the communication interface, and the memory complete communication with each other through the communication bus;
[0030] The memory is used to store computer programs;
[0031] The processor is used to implement the steps of the method for subscribing to and updating multi-source data of the client of the rail transit operation control system described above when executing the programs stored on the memory.
[0032] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the steps of the method for subscribing to and updating multi-source data of the client of the rail transit operation control system described above.
[0033] Compared with the prior art, the present invention has the following advantages:
[0034] 1. The present invention realizes the grouped management of multi-source data and the interface integration of multi-source data through the methods of data grouped import, graphic symbol registration, and data grouped subscription and update; presenting multi-professional data to users simultaneously helps improve the efficiency of user business processing;
[0035] 2. The present invention reduces the development work of data forwarding interfaces through the method of multi-source data subscription on the client side, optimizes the network transmission path of data, reduces data loss caused by network failures, and improves the real-time performance of data and the stability of the system.
[0036] 3. The present invention can configure the subscribed data sources through the client side, enhancing the flexibility of the system.
[0037] 4. The present invention adopts the method of sharing the datamodel, reducing the memory consumption of the workstation, reducing the number of icon registrations, and reducing the number of icons that variables need to drive, thereby improving the performance of the client software. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions of the present invention, the drawings required for description will be briefly introduced below. Obviously, the drawings in the following description are an embodiment of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts:
[0039] Figure 1 It is a flowchart of the method for subscribing and updating multi-source data of the client of the rail transit operation control system provided by an embodiment of the present invention.
[0040] Figure 2 It is a flowchart of subscribing to multiple data sources of the client in a specific example of the present invention.
[0041] Figure 3 It is a schematic diagram of the scheme of the planned server group number in the present invention.
[0042] Figure 4 It is a schematic diagram of icon registration in the present invention.
[0043] Figure 5 It is a schematic diagram of subscription distribution and return in the present invention.
[0044] Figure 6 It is a block diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0045] The following further elaborates on the solution proposed by the present invention in conjunction with the accompanying drawings and specific embodiments. According to the following description, the advantages and features of the present invention will be clearer. It should be noted that the accompanying drawings are in a very simplified form and all use non-precise scales, only for the purpose of conveniently and clearly assisting in explaining the embodiments of the present invention. In order to make the purpose, features, and advantages of the present invention more obvious and understandable, please refer to the accompanying drawings. It should be known that the structures, scales, sizes, etc. shown in the drawings of this specification are only used to cooperate with the content disclosed in the specification for those familiar with this technology to understand and read, and are not used to limit the limiting conditions for the implementation of the present invention. Therefore, they do not have technical substantive significance. Any modification of the structure, change of the proportional relationship, or adjustment of the size, without affecting the effects that the present invention can produce and the purposes that can be achieved, should still fall within the scope covered by the technical content disclosed by the present invention.
[0046] As Figure 1 shown, a method for subscribing to and updating multi-source data of the client of a rail transit operation and control system provided by the present invention is applied to the client of the operation and control system, subscribing to data from the servers of multiple systems, and including the following steps:
[0047] S1. Group and import the subscription variables of each group of servers, where each group of servers has a corresponding group number pre-planned;
[0048] S2. Register the graphic symbols according to the window, and bind the graphic symbol attributes to the variables;
[0049] S3. Initiate subscriptions to each group of servers according to the window, subscription number, and group number of the group;
[0050] S4. Receive the data published by each server, update the variable values and the status of the graphic symbols, and realize the subscription of multi-data sources.
[0051] Furthermore, step S1 may further include importing the user variables of the client of the operation and control system to facilitate the subscription and update of the user variables of the client.
[0052] The specific content of step S1 is as follows:
[0053] S11. Store the subscription variable files exported from different servers in different directories, and establish the corresponding relationship between the directory and the server group number; among them, the subscription variable file is a document that stores all the subscription variables pre-exported from each server in the format of numerical type and variable name; the numerical types include: BIT (Boolean type), INT (integer type), LNG (long integer type), REG (floating point type), TXT (character type);
[0054] Step S22: Store the subscription variable files exported from different servers in different directories of the workstation, and establish the corresponding relationship between the directories and the server group numbers; export all the subscription data of each server, and store the subscription data in the document in the format of numerical type and variable name.
[0055] Step S12: Store the client user variables in the document in the format of numerical type and variable name, and store the user variable file in another directory; among them, the client user variables in the user variable file are divided into global variables and split-screen variables. The global variables have the same state in multiple screens of the same client, and the variable branch is global. The split-screen variables have different states in multiple screens of the same client, and the variable branch is local.
[0056] Step S13: Import variables from each directory, manage variables in different directories in groups, store variables in the same group separately in the map according to the data type. When importing split-screen variables, multiple copies of the variables will be copied according to the number of monitors, and the variable name will be suffixed with #i to achieve the purpose of different multi-screen states.
[0057] In the present invention, variables in the same group are stored separately in the map according to the data type. One is to prevent the map from being too bloated, and separate storage can support a larger amount of data; the other is that storing the same data type together can reduce memory fragmentation, which stems from the operating system memory allocation mechanism and byte alignment mechanism.
[0058] Step S2 is used to configure the subscription variable names and user variable names into the configuration diagram symbol attributes, and whether to configure variables from different data sources in the same window according to actual needs; the diagram symbol refers to a window control, and the variable names of the control diagram symbol attributes are configured in a configuration manner; specifically as follows:
[0059] Step S21: When the client software first opens a certain window, traverse all the configuration diagram symbols in the window, construct the window variable list corresponding to the window, and establish the corresponding relationship between the window variable list and the window name.
[0060] Step S22: Search for each variable in the window variable list from the imported variables, and fill the configuration diagram symbol information for the variable management class to achieve the purpose of registering the configuration diagram symbols; the configuration diagram symbol information includes: datamodel pointer, configuration diagram symbol pointer, diagram symbol attribute pointer, data display method. Preferably, the red-black tree search method is used to search for each variable in the window variable list from the imported variables.
[0061] In addition, when the same window is opened on another display screen, since the datamodel of the two views is the same, steps S21 and S22 are not repeated.
[0062] After the configuration diagram symbols are registered, all variables in the window variable list are known to belong to the server group number. The window variable list is grouped by group number, and the client user variables are filtered out during grouping. The client local variables do not need to be subscribed from the server and are for internal use of the client.
[0063] The specific steps of step S3 are as follows:
[0064] Step S31: For each window, group by the server group number to construct a grouped variable list, and each grouped variable list has a corresponding relationship with the window;
[0065] Step S32: A window applies for a subscription number and initiates a subscription to each server according to the group number. The subscription information includes: subscription number, server group number, variable names, variable indexes, and data types in the grouped variable list.
[0066] Among them, step S31 constructs the corresponding relationship between the grouped variable list and the window name for re-subscription. When the client disconnects and reconnects to a certain group of servers, the client software obtains the variable list from this mapping table and initiates a re-subscription; in step S32, a window applies for a subscription number, even if the window is a multi-server data fusion interface.
[0067] The specific steps of step S4 are as follows:
[0068] Step S41: After the client receives the changed data of a certain server, search for variables in groups according to the server group number, data type, and variable index, update the variable values, and record the updated variables to obtain a variable update list;
[0069] Step S42: Traverse the variable update list and update the status of the configuration diagram symbols according to the symbol registration information.
[0070] In addition, if the client user variable is updated, the user operates the software interface to trigger the script to update the variable value, and then update the status of the configuration diagram symbols according to the symbol registration information.
[0071] Next, in combination with Figures 2 - 5 a specific example of the present invention will be described in detail.
[0072] First, referring to Figure 2 、 Figure 3 the group number division and subscription data preparation process of the present invention will be introduced:
[0073] Step 100: First, uniformly plan group numbers for the servers and workstations (i.e., clients) involved in the motion control system. The group number of the ATS server is group = 100, the group number of the integrated monitoring server is group = 200, the group number of the vehicle dispatching server is group = 300, the group number of the ATS workstation is group = 1000, the group number of the integrated monitoring workstation is group = 2000, the group number of the vehicle expert workstation is group = 3000, and the group number of the motion control workstation (i.e., the aforementioned motion control system client) is group = 4000. After the group numbers are divided, each group of servers or workstations already has a unique identification number. Figure 3 The division of group numbers herein is only for illustrative purposes and is not limited to this division scenario.
[0074] Step 101: Export the subscribed variable data sets of each group of servers and store them in a document. The data set of the ATS server is ats_data_set, the data set of the integrated monitoring server is iscs_data_set, and the data set of the vehicle dispatching server is rs_data_set. Create a new directory ats in the client software environment of the ATS workstation and place the document of ats_data_set in it, and configure the workstation to subscribe to the server data of group = 100. And so on, in the client software environment of the motion control workstation, place the documents of ats_data_set, iscs_data_set, and rs_data_set in the directories ats, iscs, and rs respectively, and configure the workstation to subscribe to the server data of group = 100, group = 200, and group = 300. Each workstation imports the client user variable data set client_data_set = {TXT, global.user_name; TXT, global.role_name; INT, local.menu_lv1; INT, local.menu_lv2;...}, and the directory is client.
[0075] Step 102: After the workstation client software is started, load the data sets in the corresponding directories according to the subscription configuration. The client software of the motion control workstation loads the data sets in the directories ats, iscs, rs, and client, and manages them in groups. The group numbers of the management classes corresponding to the directories are group = 100, group = 200, group = 300, and group = 4000. Each management class creates mapping tables bit_map, int_map, lng_map, reg_map, and txt_map according to different variable types, and the primary key is the variable index.
[0076] First, refer to Figure 2 、 Figure 4 to introduce the icon registration process of the present invention, including the following steps:
[0077] Step 103, when the client software first opens a certain window, traverse all the configuration icons in the window, collect all variables and register them; the icon registration information includes the datamodel pointer, the configuration icon pointer, the icon attribute pointer, and the data display method;
[0078] Step 104, for the menu window file menu.doc, the menu items m1, m2, m3,... are controlled by the same client user variable {INT, local.menu_lv1}, and each bit of the variable controls one menu; when registering, the icon information of m1, m2, m3,... on the monitor1 is registered to the split-screen variable {INT, local.menu_lv1#1}, while that of monitor2 is registered to {INT, local.menu_lv1#2}; the variable {INT, local.menu_lv1} and its split-screen variables are managed by the variable management class var_manager_4000 with the group number 4000;
[0079] Step 105, for the icon registration of the non-menu window file v1.doc, the icon attribute variables of icon c1 {BIT, circle_visible; REG, circle_bkclr} come from the server group = 200, and the icon information will be registered to the variable management class var_manager_200 with the group number 200. The icon c1 will be registered to the icon list shape_list included in the variable circle_visible and the shape_list of the variable circle_bkclr; the icon attribute variables of icon s1 {BIT, square_visible; REG, square_bkclr} come from the server group = 300, and the icon information will be registered to the variable management class var_manager_300 with the group number 300; the icon attribute variable of icon t1 {TXT, global.user_name} is a client user variable, and the icon information will be registered to the variable management class var_manager_4000 with the group number 4000;
[0080] Step 106, monitor2 also opens v1.doc, and its datamodel is the same as that of monitor1's v1.doc, that is, it is shared and no longer registered repeatedly, unless v1.doc contains split-screen variables; for the icon attribute variables of icon s2 {BIT, square_visible; REG, square_bkclr}, so its icon information is also registered to var_manager_300.
[0081] Reference Figure 2 、 Figure 5, introduce the subscription distribution and back-to-school update process of the present invention, including the following steps:
[0082] Step 107, obtain the variable list v1_var_list{BIT, circle_visible; REG, circle_bkclr; BIT, square_visible; REG, square_bkclr; TXT, global.user_name} of v1.doc via Step 104. Before initiating a subscription request, first apply for a subscription number sub_no = 1. There is a one-to-one correspondence among the subscription number, window document name, and variable list;
[0083] Step 108, group v1_var_list according to the group number of the server to which the variable belongs, and obtain the grouped list of subscription variables for each group of servers v1_group200_var_list{BIT, circle_visible; REG, circle_bkclr}, v1_group300_var_list{BIT, square_visible; REG, square_bkclr}, while the client user variable {TXT, global.user_name} is filtered;
[0084] Step 109, window v1.doc initiates a subscription to each server with the subscription number sub_no = 1, subscribes to the data {BIT, circle_visible; REG, circle_bkclr} from server group = 200, and subscribes to the data {BIT, square_visible; REG, square_bkclr} from server group = 300; The subscription information sent by the workstation to the server includes: subscription number, server group number, variable name, variable index, data type;
[0085] Step 110, wait to receive the subscription back-to-school from each server; After receiving the data back-to-school from server group = 200, retrieve the variable management class var_manager_200; Then update the variable group v1_group200_var_list{BIT, circle_visible; REG, circle_bkclr} included in the subscription number sub_no = 1, that is, retrieve the boolean variable mapping table bit_map according to the type BIT of the variable circle_visible, and update the variable value according to the variable index of circle_visible. The same applies to the variable circle_bkclr; The same applies to the data update of the remaining server groups;
[0086] Step 111, after updating the variable values, update the icon status bound to the variable according to the registration information; after the value of the variable circle_bkclr changes, traverse and update the icon status in its shape_list, that is, update the background color of icon c1 in v1.doc of monitor1. Since the icon c1 in v1.doc of monitor2 shares the datamodel, the background color will be updated synchronously; after the value of the variable square_bkclr changes, traverse and update the icon status in its shape_list, that is, update the background color of icon s1 in v1.doc of monitor1 and the background color of icon s2 in v2.doc of monitor3.
[0087] Step 112, the update of the client user variable subscription can be understood as the client software initiating a persistent subscription to itself, and the subscription content is all client user variables client_data_set = {TXT, global.user_name; TXT, global.role_name; INT, local.menu_lv1; INT, local.menu_lv2;...}, and the update is performed by user operations; when the user admin logs in to the client software, the variable global.user_name is updated to admin, and then refer to Step 111 to update the bound icon status, that is, update the string display of icons t1 and t2 to admin; when the user switches the first-level menu, that is, when updating the value of the variable local.menu_lv1, the user switches to the menu item m1, and the bit position corresponding to the variable local.menu_lv1 is 1, and the remaining bit positions are 0; since this variable is a split-screen variable, when the user operates the menu on monitor1 and switches to m1, what is actually updated is the variable local.menu_lv#1.
[0088] Step 113, when the client reconnects after disconnecting from a group of servers, the client software initiates a re-subscription of all existing subscription numbers to the group of servers according to the mapping relationship between the subscription number and the server subscription variable list, ensuring that after reconnection, the icon status is consistent with the variable values.
[0089] The above combines Figures 3 - 5 Details the multi-source data subscribed by the motion control workstation client from the ATS server, the integrated monitoring server, and the vehicle adjustment server. It can be understood that the present invention is also applicable to the ATS workstation client and the integrated monitoring workstation client, and only subscribes to the ats server or only subscribes to the integrated monitoring server through configuration.
[0090] In summary, the method for subscribing and updating multi-source data of the client of the rail transit operation and control system provided by the present invention groups and manages the subscribed data according to the server group number and data type based on the idea of unified differentiation, constructs the mapping relationship between the configuration diagram symbol attributes and the subscribed variables, and initiates the subscription and updates of the variables and diagram symbols according to the data grouping and mapping relationship. This method shortens the software development cycle, optimizes the data transmission path, improves the real-time performance of the data, and enhances the stability and flexibility of the system.
[0091] Based on the same inventive concept, according to the embodiment of the method for subscribing and updating multi-source data of the client of the above rail transit operation and control system, the present invention also provides an electronic device, as Figure 6 shown, including a processor 301, a communication interface 302, a memory 303, and a communication bus 304. Among them, the processor 301, the communication interface 302, and the memory 303 complete mutual communication through the communication bus 304.
[0092] The memory 303 is used to store a computer program.
[0093] When the processor 301 is used to execute the program stored on the memory 303, it realizes the steps of the above method for subscribing and updating multi-source data of the client of the rail transit operation and control system.
[0094] The communication bus mentioned in the above electronic device can be divided into an address bus, a data bus, a control bus, etc. For the sake of convenience of representation, only a thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The communication interface is used for communication between the above electronic device and other devices. The memory may include a random access memory (RAM), and may also include a non-volatile memory (NVM). The above processor may be a general-purpose processor.
[0095] In another embodiment provided by the present invention, a computer-readable storage medium is also provided. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it realizes the steps of any of the above methods for subscribing and updating multi-source data of the client of the rail transit operation and control system.
[0096] It should be noted that in this text, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising said element.
[0097] Although the content of the present invention has been described in detail through the above preferred embodiments, it should be recognized that the above description should not be considered as a limitation of the present invention. After those skilled in the art have read the above content, various modifications and alternatives to the present invention will be obvious. Therefore, the protection scope of the present invention should be defined by the appended claims.
Claims
1. A method for subscribing to and updating multi-source data of a client in a rail transit operation control system, characterized in that, Applied to the client of the motion control system, including the following steps: S1. Group-import the subscribed variables of each group of servers, where each group of servers has a pre-planned corresponding group number; import the user variables of the motion control system client; S2. Register the graphic symbols by window, and bind the graphic symbol attributes to variables; S3. Initiate subscriptions to each group of servers according to the window, subscription number, and group number of the group; S4. Receive the data published by each server, update the variable values and the states of the graphic symbols, and achieve the subscription of multiple data sources; Step S1 specifically includes: Step S11. Store the subscribed variable files exported from different servers in different directories, and establish the corresponding relationship between the directory and the server group number; wherein, the subscribed variable file is a document that stores all the subscribed variables previously exported from each server in the format of numerical type and variable name; Step S12. Store the client user variables in a document according to the format of numerical type and variable name, and store the user variable file in another directory; wherein, the client user variables in the user variable file are divided into global variables and screen variables. The global variables have the same state on multiple screens of the same client, and the variable branch is global. The screen variables have different states on multiple screens of the same client, and the variable branch is local; Step S13. Import variables from each directory, manage the variables in different directories in groups, store the variables in the same group separately in the map according to the data type, and when importing the screen variables, copy multiple copies of the variables according to the number of monitors, and add the suffix #i to the variable name to achieve the purpose of different multi-screen states.
2. The method for subscribing and updating multi-source data of the client of the rail transit operation control system according to claim 1, wherein, Step S2 registers the graphic symbols by window and binds the graphic symbol attributes to variables, specifically including: Step S21. When the client software first opens a certain window, traverse all the configuration graphic symbols in the window, construct the window variable list corresponding to this window, and form the corresponding relationship between the window variable list and the window name; Step S22. Search for each variable in the window variable list from the imported variables, and fill the configuration graphic symbol information for the variable management class to achieve the purpose of registering the configuration graphic symbols; wherein the configuration graphic symbol information includes: datamodel pointer, configuration graphic symbol pointer, graphic symbol attribute pointer, data display method.
3. The method for subscribing and updating multi-source data of the client of the rail transit operation control system according to claim 2, wherein, When opening the same window on another display screen, since the datamodel of the two views is the same, steps S21 and S22 are not executed repeatedly.
4. The method for subscribing and updating multi-source data of the client of the rail transit operation control system according to claim 3, wherein, Step S22 uses the red-black tree search method to search for each variable in the window variable list from the imported variables.
5. The method for subscribing and updating multi-source data of the client of the rail transit operation control system according to claim 1, characterized in that, Step S3 initiates subscriptions to each group of servers according to the window, subscription number, and group number of the group, specifically including: Step S31. For each window, group by the server group number, construct the grouped variable list, and each grouped variable list has the corresponding relationship with this window; Step S32. Apply for a subscription number for one window, and initiate subscriptions to each server according to the group number. The subscription information includes: subscription number, server group number, variable names, variable indexes, and data types of each variable in the grouped variable list.
6. The method for subscribing and updating multi-source data of the client of the rail transit operation control system according to claim 1, characterized in that, Step S4 receives the data published by each server, updates the variable values and the states of the graphic symbols, specifically including: Step S41: After receiving the change data of a certain server, search for variables in groups according to the server group number, data type, and variable index, update the variable values, and record the updated variables. Step S42: Traverse all the recorded updated variables and update the status of the configuration icons according to the icon registration information.
7. The method for subscribing and updating multi-source data of the client of the rail transit operation control system according to claim 1, wherein Step S4 further includes updating the client user variables, specifically including: If the client user variables are updated, trigger the script to update the variable values, and then update the status of the configuration icons according to the icon registration information.
8. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus. Among them, the processor, the communication interface, and the memory complete mutual communication through the communication bus. The memory is used to store computer programs. The processor is used to implement the steps of the method for subscribing to and updating multi-source data of the client of the rail transit operation control system according to any one of claims 1-7 when executing the program stored on the memory.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, it implements the steps of the method for subscribing to and updating multi-source data of the client of the rail transit operation control system according to any one of claims 1-7.
Citation Information
Patent Citations
Client device and host device subscriptions
CN106605208A
Batch subscribing / publishing method
CN107819801A