Traffic data processing method and electronic equipment
By receiving and conversion of binary communication data streams in the urban rail signal maintenance system into the processing method and equipment of data model objects, the problem of low traffic data processing efficiency and complex operation in existing technologies has been solved, and more efficient data processing and more efficient data processing and Reduce the complexity of the operation.
Patent Information
- Application Number
- CN202310877377.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-17
- Publication Date
- 2025-01-28
AI Technical Summary
When processing traffic data, the existing technology of urban rail signal maintenance systems is inefficient and complex in operation. When pre-set functions cannot meet business needs, they need to perform tedious operations such as demand review, plan modification, software development and system deployment.
By providing a processing method and electronic device for traffic data, receiving binary communication data streams, converting to the corresponding data model object, and displaying the display results of the data model object on the first page. This method and device can respond to the operation of the user, dynamically handle traffic data, and no need to re -develop and deploy the system.
It improves the processing efficiency of traffic data, reduces the complexity of the operation, and allows the results of the data model object directly when the user needs changes, without additional system development and deployment.
Smart Images

Figure CN119377301A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data processing, and in particular to a method and electronic device for processing traffic data. Background Art
[0002] In the urban rail signal maintenance system, it is necessary to monitor analog quantities such as the switch operating current so that automatic warning or alarm can be issued when the analog quantity exceeds the set range; or, monitor switching quantities such as the rise and fall of the relay so that the working rules of the relay can be understood through the periodic change diagram.
[0003] However, when the pre-set functions of the maintenance system cannot meet business needs, if you want to normally identify these analog quantities or switch quantities, or make other settings based on these quantities, you need to perform a series of operations such as corresponding demand review, solution modification, software development, and system deployment, which is inefficient and cumbersome. Summary of the invention
[0004] In an exemplary embodiment of the present application, a method for processing traffic data and an electronic device are provided to improve the processing efficiency of the maintenance system for traffic data and reduce the complexity of operation.
[0005] According to a first aspect of an exemplary embodiment, a method for processing traffic data is provided, comprising:
[0006] Respond to the user's first action on the initial page;
[0007] Receiving a binary communication data stream from a target interface of a target business system; wherein the binary communication data stream is traffic data;
[0008] Converting a binary communication data stream into a corresponding data model object; wherein the data model object is a digital description of traffic data;
[0009] Display the first page; wherein the first page includes the display result of converting the binary communication data stream into the corresponding data model object.
[0010] According to a second aspect of the exemplary implementation, there is provided an electronic device including a processor and a data transmission unit;
[0011] The processor is configured to: respond to a first operation of the user on the initial page;
[0012] The data transmission unit is configured to: receive a binary communication data stream from a target interface of a target business system; wherein the binary communication data stream is traffic data;
[0013] The processor is also configured to: display a first page; wherein the first page includes a display result of converting a binary communication data stream into a corresponding data model object.
[0014] According to a third aspect of an exemplary embodiment, a traffic data processing device is provided, comprising:
[0015] A processing unit, used to: respond to a first operation of a user on an initial page;
[0016] The communication unit is used to: receive a binary communication data stream from a target interface of a target business system; wherein the binary communication data stream is traffic data;
[0017] The processing unit is further used to: convert the binary communication data stream into a corresponding data model object; wherein the data model object is a digital description of the traffic data;
[0018] The display unit is used to: display a first page; wherein the first page includes a display result of a data model object.
[0019] According to a fourth aspect of the exemplary implementation, a computer storage medium is provided, in which computer program instructions are stored. When the instructions are executed on a computer, the computer executes the method for processing traffic data according to the first aspect.
[0020] In the embodiment of the present application, if the user has a need to view or otherwise process traffic data, the electronic device can respond to the user's first operation on the initial page, and the first operation can be clicking a button used to trigger the user's need. In this way, since the traffic data directly generated by the target interface of the target business system is a binary communication data stream, the electronic device receives the binary communication data stream. In addition, the electronic device converts the binary communication data stream into a corresponding data model object, which is a digital description of the traffic data. With such a design, when the user's needs change, there is no need to redevelop and deploy the maintenance system, and the display results including the data model object can be directly displayed on the first page, thereby improving the processing efficiency of the traffic data and reducing the complexity of the operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0022] Figure 1 An application scenario diagram of a method for processing traffic data provided by an embodiment of the present application is exemplarily shown;
[0023] Figure 2A flow chart of a method for processing traffic data provided by an embodiment of the present application is exemplified;
[0024] Figure 3 An exemplary display diagram of an initial page provided in an embodiment of the present application is shown;
[0025] Figure 4 A schematic diagram of a process of converting a binary communication data stream into a corresponding data model object provided by an embodiment of the present application is exemplified;
[0026] Figure 5 A schematic diagram exemplarily shows a process of processing traffic data provided by an embodiment of the present application;
[0027] Figure 6 A schematic diagram of a process of serializing a custom entity class from a binary communication data stream provided by an embodiment of the present application is exemplarily shown;
[0028] Figure 7 A flowchart showing a specific execution process of serializing a custom entity class provided by an embodiment of the present application is exemplified;
[0029] Figure 8 A custom monitoring setting interface provided by an embodiment of the present application is exemplarily shown;
[0030] Fig. 9 A curve monitoring display interface provided by an embodiment of the present application is exemplarily shown;
[0031] Fig.10 A custom alarm setting interface provided by an embodiment of the present application is exemplarily shown;
[0032] Fig.11 The following is a schematic diagram showing the structure of a data processing device provided by an embodiment of the present application;
[0033] Fig.12 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is exemplarily shown. DETAILED DESCRIPTION
[0034] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0035] (1) Urban rail signal: The certificate for commanding train operation, whether it is a ground signal or an onboard signal, the train can only run when the signal allows it, otherwise the onboard signal will be used for safety protection. The device that outputs the urban rail signal can be an onboard communication data transmission device, etc.
[0036] (2) Class and object: A general term for two computer languages that use computers as carriers. Objects are abstractions of objective things, and classes are abstractions of objects. Classes are an abstract data type. The relationship between the two is that objects are instances of classes, and classes are templates for objects.
[0037] In the urban rail signal maintenance system, it is necessary to monitor analog quantities such as the switch operating current so that automatic warning or alarm can be issued when the analog quantity exceeds the set range; or, monitor switching quantities such as the rise and fall of the relay so that the working rules of the relay can be understood through the periodic change diagram.
[0038] However, when the pre-set functions of the maintenance system cannot meet business needs, if you want to normally identify these analog quantities or switch quantities, or make other settings based on these quantities, you need to perform a series of operations such as corresponding demand review, solution modification, software development, and system deployment, which is inefficient and cumbersome.
[0039] To this end, an embodiment of the present application provides a method for processing traffic data, in which traffic data in the form of a binary communication data stream is converted into a data model object, which is a digital description of the traffic data, and the display results including the data model object are displayed on the first page. In this way, when user needs change, there is no need to redevelop and deploy the maintenance system, and the display results including the data model object can be directly displayed on the first page, which improves efficiency and reduces operation complexity.
[0040] After introducing the design ideas of the embodiments of the present application, the following briefly introduces the application scenarios to which the technical solutions of the embodiments of the present application can be applied. It should be noted that the application scenarios introduced below are only used to illustrate the embodiments of the present application and are not limited. In specific implementation, the technical solutions provided by the embodiments of the present application can be flexibly applied according to actual needs.
[0041] refer to Figure 1 , showing an application scenario diagram of a method for processing traffic data, wherein a target business system obtains traffic data from an on-board communication data transmission device through a target interface, and sends the traffic data to an electronic device, in which an urban rail signal maintenance system is integrated, and the urban rail signal maintenance system (hereinafter referred to as the maintenance system) processes the traffic data.
[0042] To further illustrate the technical solution provided by the embodiment of the present application, this is described in detail below in conjunction with the accompanying drawings and specific implementation methods. Although the embodiment of the present application provides the method operation steps shown in the following embodiments or drawings, more or fewer operation steps may be included in the method based on routine or no creative labor. In the steps where there is no necessary causal relationship logically, the execution order of these steps is not limited to the execution order provided in the embodiment of the present application.
[0043] Combine the following Figure 1 The application scenario shown is shown in Figure 2 A flow chart of a method for processing traffic data is shown, which is applied to an urban rail signal maintenance system, and the urban rail signal maintenance system is deployed on an electronic device to illustrate the technical solution provided in an embodiment of the present application.
[0044] S201: Responding to the user's first operation on the initial page.
[0045] S202: Receive a binary communication data stream from a target interface of a target business system.
[0046] Among them, the binary communication data stream is traffic data.
[0047] S203: Convert the binary communication data stream into a corresponding data model object.
[0048] Among them, the data model object is a digital description of traffic data.
[0049] S204: Display the first page.
[0050] The first page includes the display result of the data model object.
[0051] In the embodiment of the present application, if the user has a need to view or otherwise process traffic data, the electronic device can respond to the user's first operation on the initial page, and the first operation can be clicking a button used to trigger the user's need. In this way, since the traffic data directly generated by the target interface of the target business system is a binary communication data stream, the electronic device receives the binary communication data stream. In addition, the electronic device converts the binary communication data stream into a corresponding data model object, which is a digital description of the traffic data. With this design, when the user's needs change, there is no need to redevelop and deploy the maintenance system, and the display results including the data model object can be directly displayed on the first page, which improves efficiency and reduces operational complexity.
[0052] In S201, the initial page may be a basic display page of the maintenance system, which may include basic controls or icons for user operations, etc. In the embodiment of the present application, the first operation may be generated when the user clicks an icon representing a viewing operation when the user has viewing or other needs. Figure 3 A display diagram of an initial page provided in an embodiment of the present application.
[0053] In relation to S202, the business system may be a track operation time control system, a stop management system, etc. Each business system includes multiple interfaces, and the interfaces can be used for signal transmission. The target business system is any business system, and the target interface is any interface among the interfaces of the target business system. In an embodiment of the present application, the maintenance system receives a binary communication data stream from a target interface of the target business system, and the type of the binary communication data stream is traffic data, such as operation time, lane change information, etc. In a specific example, a binary communication data stream from a target interface of a target business system may be received through an inter-process message or a communication interface.
[0054] Regarding S203, in order to avoid changing or redeploying the maintenance system when business needs change, after receiving the binary communication data stream, the binary communication data stream is converted into a corresponding data model object, which is a digital description of the traffic data.
[0055] In a specific example, a mapping module may be provided in the maintenance system, and the mapping module may map binary communication data streams received by different interfaces into specified data model objects according to the input configuration parameters.
[0056] For example, Figure 4 A schematic diagram of a process for converting a binary communication data stream into a corresponding data model object provided by an embodiment of the present application, Figure 4 At least the following steps are included:
[0057] S203-1: Identify the interface type identifier and frame type identifier of the binary communication data stream.
[0058] Since different interfaces have different types, after receiving the binary communication data stream, the interface type identifier of the binary communication data stream is identified. In addition, different frames also have different types, and the frame type identifier is also identified here. Exemplarily, according to the frame rate, there may be multiple frames per second. Here, one frame is used as an example for explanation.
[0059] S203-2: Determine the type of the target interface according to the interface type identifier, and determine the type of the target frame according to the frame type identifier.
[0060] Since the type identifier has a certain correspondence with the type, the type of the target interface can be determined according to the interface type identifier, and the type of the target frame can be determined according to the frame type identifier.
[0061] S203-3: According to the type of the target interface and the type of the target frame, search for a corresponding protocol conversion rule in the memory space.
[0062] The memory space stores protocol conversion rules corresponding to different interface types and different frame types. Therefore, the type of the target interface and the type of the target frame are input into the memory space for searching, and the corresponding protocol rules can be found.
[0063] Exemplarily, the information stored in the memory space can be obtained through steps A1-A3:
[0064] A1: Determine a first configuration file set corresponding to the target business system.
[0065] The first configuration file set includes at least one protocol stack conversion rule, the target business system includes at least one interface, each interface corresponds to an interface protocol file, each interface protocol file includes multiple protocol frames, and each protocol frame corresponds to a protocol frame conversion rule.
[0066] Optionally, for each interface protocol file, a model object class declaration file is added according to the rules in the interface protocol file, corresponding class members are added according to the type and length of each field in the protocol frame, and frame description methods are added as needed. In this way, since the target business system has multiple interfaces, the multiple protocol frame conversion rules corresponding to the target business system are obtained to form a first configuration file set. In a specific example, it is assumed that N protocol frame conversion rules are included.
[0067] A2: Determine a second configuration file according to the first configuration file set, and a preset interface type set and frame type set.
[0068] Exemplarily, the maintenance system pre-sets an interface type set, such as including multiple interface types, and pre-sets a frame type set, such as multiple frame types. The first configuration file set includes N protocol frame conversion rules. Therefore, according to the N protocol frame conversion rules, multiple interface types and multiple frame types, an index relationship between the interface type, the frame type and the protocol conversion rule can be obtained, and the second configuration file can be used to describe the index relationship.
[0069] A3: Dynamically compile the first configuration file set according to the second configuration file, and store the compiled first configuration file set into the memory space.
[0070] In order to improve the efficiency of data processing, the first configuration file set is dynamically compiled using the index relationship, and the obtained first configuration file set is stored in the memory space so that it can be used when searching for the corresponding protocol conversion rules in the memory space according to the type of the target interface and the type of the target frame. This storage process is a persistent storage process.
[0071] Exemplarily, the dynamic compilation process can be implemented by setting a dynamic loading module inside the maintenance system. Such a design can load the mapping logic of new binary communication data to the data model without modifying the code, and can achieve new requirements without affecting the existing software functions when the business changes.
[0072] The dynamic compilation process can include two methods: A3-1 and A3-2:
[0073] Method A3-1:
[0074] When the binary communication data stream is received, each first configuration file in the first configuration file set is loaded according to the second configuration file to dynamically compile the first configuration file set.
[0075] In this mode, the dynamic compilation time is when the maintenance system is started, that is, when the maintenance system receives the binary communication data stream. During the compilation process, each first configuration file in the first configuration file set is loaded according to the second configuration file, thereby realizing dynamic compilation of the first configuration file set.
[0076] Method A3-2:
[0077] Each first configuration file in the first configuration file set under each directory in the second configuration file is detected in real time to dynamically compile the first configuration file set.
[0078] In this method, dynamic compilation is real-time. During the compilation process, each first configuration file in the first configuration file set under different directories in the second configuration file is detected in real time. Such a design can realize dynamic compilation of the first configuration file set.
[0079] S203-4: Apply the binary serialization class and the corresponding protocol conversion rules to convert the binary communication data stream into the corresponding data model object.
[0080] The binary serialization class includes a basic class, an array class, and a custom class. The basic class may be Byte, Char, Decimal, Double, Int16, Int32, etc.; the array class may be Byte[], Char[], IList, IDictionary, etc. In the embodiment of the present application, the binary serialization class and the corresponding protocol conversion rules are applied to convert the binary communication data stream into the corresponding data model object.
[0081] Since the number of frames is related to the frame rate, when a binary communication data stream includes multiple frames, the corresponding data models are multiple. In this case, the method in the embodiment of the present application further includes:
[0082] Apply set constraints to filter multiple data model objects.
[0083] In a specific example, the constraint condition may be determined and set in the following manner: in response to a second operation of the user on the second page, a constraint condition corresponding to the second operation is generated.
[0084] The constraint condition is a combination of an interface type constraint, a frame type constraint, a time range constraint, and a field range constraint. The second page includes a query statistics setting window, a curve monitoring setting window, or an early warning setting window.
[0085] In the actual application process, the process of generating constraint conditions can be generated by the second operation of the user on the second page. Exemplarily, the management class in the data model object implements various services; through constraints such as interface, frame type, time range and attribute value range of each field, the data model objects obtained in real time or from persistent data are retrieved or filtered, and the upper-level business is returned. Among them, the upper-level business can be the specific business included in the target business system.
[0086] Involving S204, displaying the first page.
[0087] The first page includes the display result of the data model object.
[0088] The converted data model objects are usually used for abnormal warning and data retrieval. Therefore, in the embodiment of the present application, functions such as visual rule editing are implemented. For example, the functions of adding warning, alarm or monitoring curve rules for the attributes and changes of different data model objects can be realized through human-computer interaction on the interface, and interactive query statistics functions are also provided.
[0089] In a specific example, the maintenance system includes an editor component that implements a general custom model class object automatic mapping interface, provides automatic loading of attribute parameters and descriptions after selecting a specified class, and enables operators to set search conditions by editing the range of corresponding attribute values and logical operations. The corresponding module obtains data sets from the service provided by the data model object management class according to the set conditions and displays them together.
[0090] Therefore, compared with the station-level maintenance system in the urban railway signal system in the prior art, which generally only has functions such as data collection and preset fault alarm, when the preset functions cannot meet the business needs, a series of operations such as corresponding demand review, solution modification, software development, system deployment, etc. are required, which are inefficient and cumbersome. The embodiment of the present application realizes the mapping function of general binary communication data to data model objects, and realizes the hot deployment of new data processing functions through dynamic compilation and dynamic loading. In addition, a custom and extensible interface data monitoring function is realized, and new monitoring content can be added or modified without affecting existing functions and without rewriting the code. Specifically, the monitoring content can be customizable and extensible analog quantities and switch quantities.
[0091] Figure 5 A schematic diagram of a traffic data processing process provided in an embodiment of the present application, wherein interface 1 and interface 2 are taken as examples to illustrate the process of maintenance software receiving and processing data frames through a business system.
[0092] In order to make the technical solution of this application more perfect, the following specific examples are used to illustrate the process of converting binary communication data stream into data model objects:
[0093] Figure 6 A schematic diagram of a process for serializing a custom entity class from a binary communication data stream provided in an embodiment of the present application.
[0094] S601: Input binary communication data stream.
[0095] S602: Determine whether a dynamic class of the corresponding frame type can be obtained from the loaded dynamic class set. If so, execute S603; otherwise, return.
[0096] S603: Initialize the binary processing class instance.
[0097] S604: Determine that the return value is a binary processing class instance and perform a binary serialization operation.
[0098] Figure 7 A flowchart of a specific execution process of serializing a custom entity class provided in an embodiment of the present application.
[0099] S701: Create a dynamic class instance.
[0100] S702: Obtain a property set of a dynamic class through reflection.
[0101] S703: traverse the attribute set, if the traversal is not completed, execute S704, otherwise return the dynamic class instance.
[0102] S704: Obtain instance attributes and their types.
[0103] S705: Read corresponding attribute values from the binary communication data stream.
[0104] S707: Return the dynamic class instance.
[0105] pass Figure 6 and Figure 7 It can be seen that the conversion logic needs to pass in the binary communication data stream Buff and the protocol frame type Type to be serialized, and then obtain the corresponding dynamic class DynamicType from the loaded protocol frame conversion dynamic class according to the protocol frame type, and then initialize the instance bn of the binary processing class Binary, and pass in the dynamic type parameter, and finally call the binary serialization method TryRead of bn and return the result.
[0106] Among them, the TryRead process of Binary is Figure 6 as well as Figure 7 As shown in , first create the dynamic class DynamicType instance Value, then obtain the MemberInfo collection Ms of the dynamic class, then traverse the collection Ms to obtain the various attributes Member and their types Mtype of the instance Value in turn, and read the value from the binary communication data stream according to the type, so as to modify the value of the corresponding attribute of Value, and finally return the dynamic class instance Value.
[0107] Figure 8 A custom monitoring setting interface provided for the embodiment of the present application generates an interface list on the left according to the configuration. After clicking the corresponding interface, the right interface generates a drop-down list based on the dynamic class of all communication protocol frames of this interface that are dynamically loaded. When a certain protocol frame is selected, a list of monitored points will be generated based on the attribute fields of this protocol frame class, and then the monitoring conditions or monitoring curve colors can be set as needed. The generated configuration can be saved persistently for next use, and can also be used for curve display of historical data.
[0108] Fig. 9 A curve monitoring and display interface is provided in an embodiment of the present application, and this interface draws a curve for the data of specified bytes of the received interface binary communication data according to the above-mentioned added configuration rules.
[0109] Fig.10 A custom alarm setting interface provided in the embodiment of the present application can set monitoring points as in the custom monitoring setting, and can also customize the alarm domain value, alarm level, alarm group, alarm content, alarm logic, etc. Different domain values and alarm logic can be set for different devices of the same type.
[0110] In the embodiment of the present application, the processing module for binary communication data can be integrated into the maintenance software, which can monitor real-time data and process persistent historical data. In practical applications, the binary communication data processing module can be set separately from the maintenance software, and obtain real-time communication data or directly obtain persistent historical data from the maintenance software through communication. It is also possible to obtain data from multiple maintenance software in parallel, and the upper-level business logic can add an intelligent analysis system based on big data to provide more comprehensive intelligent operation and maintenance functions.
[0111] Compared with the existing technology, it can warn or alarm abnormal data without setting fault codes in advance; at the same time, it can monitor specific switch quantities and analog quantities without writing codes; in addition, different monitoring domain values can be set for different devices of the same type. The created warning and monitoring rules can be applied to both real-time communication data processing and persistent historical communication data processing.
[0112] like Fig.11 As shown, based on the same inventive concept, an embodiment of the present application provides a traffic data processing device, including a processing unit 111, a communication unit 112 and a display unit 113.
[0113] The processing unit 111 is used to: respond to the first operation of the user on the initial page;
[0114] The communication unit 112 is used to: receive a binary communication data stream from a target interface of a target business system; wherein the binary communication data stream is traffic data;
[0115] The processing unit 111 is further used to: convert the binary communication data stream into a corresponding data model object; wherein the data model object is a digital description of the traffic data;
[0116] The display unit 113 is used to display a first page, wherein the first page includes a display result of a data model object.
[0117] In a possible implementation manner, the processing unit 111 is specifically configured to:
[0118] Identify the interface type identifier and the frame type identifier of the binary communication data stream; determine the type of the target interface according to the interface type identifier, and determine the type of the target frame according to the frame type identifier;
[0119] According to the type of the target interface and the type of the target frame, the corresponding protocol conversion rule is searched in the memory space; wherein the memory space stores the protocol conversion rules corresponding to different interface types and different frame types;
[0120] Apply the binary serialization class and the corresponding protocol conversion rules to convert the binary communication data stream into the corresponding data model object.
[0121] In a possible implementation manner, the processing unit 111 is further configured to:
[0122] Determine a first configuration file set corresponding to the target business system; wherein the first configuration file set includes at least one protocol stack conversion rule, the target business system includes at least one interface, each interface corresponds to an interface protocol file, each interface protocol file includes multiple protocol frames, and each protocol frame corresponds to a protocol frame conversion rule;
[0123] Determine a second configuration file according to the first configuration file set, and a preset interface type set and a frame type set; wherein the second configuration file includes an index relationship between the interface type, the frame type and the protocol conversion rule;
[0124] The first configuration file set is dynamically compiled according to the second configuration file, and the compiled first configuration file set is stored in the memory space.
[0125] In a possible implementation manner, the processing unit 111 is specifically configured to:
[0126] When receiving the binary communication data stream, loading each first configuration file in the first configuration file set according to the second configuration file to dynamically compile the first configuration file set; or
[0127] Each first configuration file in the first configuration file set under each directory in the second configuration file is detected in real time to dynamically compile the first configuration file set.
[0128] In a possible implementation manner, if the binary communication data stream includes multiple frames, then there are multiple corresponding data model objects; the processing unit 111 is further configured to:
[0129] Apply set constraints to filter multiple data model objects.
[0130] In a possible implementation, the processing unit 111 is further configured to determine the constraint condition in the following manner:
[0131] In response to a second operation of the user on the second page, a constraint condition corresponding to the second operation is generated; wherein the constraint condition is a combination of an interface type constraint, a frame type constraint, a time range constraint, and a field range constraint.
[0132] In a possible implementation, the operation includes a query operation, a monitoring operation, or an early warning operation;
[0133] The second page includes a query statistics setting window, a curve monitoring setting window or an early warning setting window.
[0134] In a possible implementation, the communication unit 112 is specifically configured to:
[0135] Receive binary communication data stream from the target interface of the target business system through inter-process messages or communication interfaces.
[0136] In a possible implementation, the processing unit 111 is further configured to determine the binary serialization class in the following manner:
[0137] Generate binary serialization classes; binary serialization classes include basic classes, array classes, and custom classes.
[0138] Since the device is the device in the method in the embodiment of the present application, and the principle of solving the problem by the device is similar to that of the method, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0139] like Fig.12 As shown, based on the same inventive concept, an embodiment of the present application provides an electronic device, which includes a processor 1201 and a data transmission unit 1202.
[0140] The processor is configured to: respond to a first operation of the user on the initial page;
[0141] The data transmission unit is configured to: receive a binary communication data stream from a target interface of a target business system; wherein the binary communication data stream is traffic data;
[0142] The processor is also configured to: display a first page; wherein the first page includes a display result of converting a binary communication data stream into a corresponding data model object.
[0143] In an optional implementation, the processor 1201 is specifically configured to execute:
[0144] Identify the interface type identifier and the frame type identifier of the binary communication data stream; determine the type of the target interface according to the interface type identifier, and determine the type of the target frame according to the frame type identifier;
[0145] According to the type of the target interface and the type of the target frame, the corresponding protocol conversion rule is searched in the memory space; wherein the memory space stores the protocol conversion rules corresponding to different interface types and different frame types;
[0146] Apply the binary serialization class and the corresponding protocol conversion rules to convert the binary communication data stream into the corresponding data model object.
[0147] In an optional implementation, the processor 1201 is further configured to execute:
[0148] Determine a first configuration file set corresponding to the target business system; wherein the first configuration file set includes at least one protocol stack conversion rule, the target business system includes at least one interface, each interface corresponds to an interface protocol file, each interface protocol file includes multiple protocol frames, and each protocol frame corresponds to a protocol frame conversion rule;
[0149] Determine a second configuration file according to the first configuration file set, and a preset interface type set and a frame type set; wherein the second configuration file includes an index relationship between the interface type, the frame type and the protocol conversion rule;
[0150] The first configuration file set is dynamically compiled according to the second configuration file, and the compiled first configuration file set is stored in the memory space.
[0151] In an optional implementation, the processor 1201 is specifically configured to execute:
[0152] When receiving the binary communication data stream, loading each first configuration file in the first configuration file set according to the second configuration file to dynamically compile the first configuration file set; or
[0153] Each first configuration file in the first configuration file set under each directory in the second configuration file is detected in real time to dynamically compile the first configuration file set.
[0154] In an optional implementation, if the binary communication data stream includes multiple frames, the corresponding data model objects are multiple; the processor 1201 is further configured to execute:
[0155] Apply set constraints to filter multiple data model objects.
[0156] In an optional implementation, the processor 1201 is specifically configured to execute: determining the setting constraint condition in the following manner:
[0157] In response to a second operation of the user on the second page, a constraint condition corresponding to the second operation is generated; wherein the constraint condition is a combination of an interface type constraint, a frame type constraint, a time range constraint, and a field range constraint.
[0158] In an optional implementation, the operation includes a query operation, a monitoring operation, or an early warning operation;
[0159] The second page includes a query statistics setting window, a curve monitoring setting window or an early warning setting window.
[0160] In an optional implementation, the processor 1201 is specifically configured to execute:
[0161] Receive binary communication data stream from the target interface of the target business system through inter-process messages or communication interfaces.
[0162] In an optional implementation, the processor 1201 is specifically configured to execute: determining the binary serialization class in the following manner:
[0163] Generate binary serialization classes; binary serialization classes include basic classes, array classes, and custom classes.
[0164] The embodiment of the present application also provides a computer storage medium, in which computer program instructions are stored. When the instructions are executed on a computer, the computer executes the steps of the above-mentioned traffic data processing method.
[0165] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0166] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0167] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0168] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0169] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A method for processing traffic data, characterized in that: include: Respond to the user's first action on the initial page; Receiving a binary communication data stream from a target interface of a target business system; wherein the binary communication data stream is traffic data; Converting the binary communication data stream into a corresponding data model object; wherein the data model object is a digital description of the traffic data; Display a first page; wherein the first page includes the display result of the data model object.
2. The method according to claim 1, characterized in that The converting the binary communication data stream into a corresponding data model object comprises: Identify the interface type identifier and frame type identifier of the binary communication data stream; Determine the type of the target interface according to the interface type identifier, and determine the type of the target frame according to the frame type identifier; According to the type of the target interface and the type of the target frame, searching the memory space for the corresponding protocol conversion rule; wherein the memory space stores the protocol conversion rules corresponding to different interface types and different frame types; The binary communication data stream is converted into a corresponding data model object by applying a binary serialization class and the corresponding protocol conversion rule.
3. The method according to claim 2, characterized in that The method further comprises: Determine a first configuration file set corresponding to the target business system; wherein the first configuration file set includes at least one protocol stack conversion rule, the target business system includes at least one interface, each interface corresponds to an interface protocol file, each interface protocol file includes multiple protocol frames, and each protocol frame corresponds to a protocol frame conversion rule; Determine a second configuration file according to the first configuration file set, and a preset interface type set and a preset frame type set; wherein the second configuration file includes an index relationship between an interface type, a frame type and a protocol conversion rule; The first configuration file set is dynamically compiled according to the second configuration file, and the compiled first configuration file set is stored in the memory space.
4. The method according to claim 3, characterized in that The dynamically compiling the first configuration file set according to the second configuration file includes: When the binary communication data stream is received, each first configuration file in the first configuration file set is loaded according to the second configuration file to dynamically compile the first configuration file set; or Each first configuration file in the first configuration file set under each directory in the second configuration file is detected in real time to dynamically compile the first configuration file set.
5. The method according to claim 2, characterized in that: If the binary communication data stream includes multiple frames, then the corresponding data model objects are multiple; the method further includes: The set constraint conditions are applied to filter the plurality of data model objects.
6. The method according to claim 5, characterized in that The setting constraints are determined as follows: In response to a second operation of the user on the second page, a constraint condition corresponding to the second operation is generated; wherein the constraint condition is a combination of an interface type constraint, a frame type constraint, a time range constraint, and a field range constraint.
7. The method according to claim 6, characterized in that The operation includes a query operation, a monitoring operation or an early warning operation; The second page includes a query statistics setting window, a curve monitoring setting window or an early warning setting window.
8. The method according to any one of claims 1 to 7, characterized in that: The receiving of a binary communication data stream from a target interface of a target business system comprises: Receive binary communication data stream from the target interface of the target business system through inter-process messages or communication interfaces.
9. The method according to any one of claims 2 to 7, characterized in that: The binary serialization class is determined as follows: Generate a binary serialization class; wherein the binary serialization class includes a basic class, an array class and a custom class.
10. An electronic device, characterized in that: including a processor and a data transmission unit; The processor is configured to: respond to a first operation of a user on an initial page; The data transmission unit is configured to: receive a binary communication data stream from a target interface of a target business system; wherein the binary communication data stream is traffic data; The processor is further configured to: display a first page; wherein the first page includes a display result of converting the binary communication data stream into a corresponding data model object.