CN114328877A - Method and device for processing data of indicator, electronic equipment and storage medium - Google Patents

Method and device for processing data of indicator, electronic equipment and storage medium Download PDF

Info

Publication number
CN114328877A
CN114328877A CN202111672482.1A CN202111672482A CN114328877A CN 114328877 A CN114328877 A CN 114328877A CN 202111672482 A CN202111672482 A CN 202111672482A CN 114328877 A CN114328877 A CN 114328877A
Authority
CN
China
Prior art keywords
data
protocol
determining
sequence number
analysis method
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111672482.1A
Other languages
Chinese (zh)
Inventor
周淦
赵爽
周宇
刘贵聪
牛胜芬
王春霞
蒯亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
6th Research Institute of China Electronics Corp
Original Assignee
6th Research Institute of China Electronics Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 6th Research Institute of China Electronics Corp filed Critical 6th Research Institute of China Electronics Corp
Priority to CN202111672482.1A priority Critical patent/CN114328877A/en
Publication of CN114328877A publication Critical patent/CN114328877A/en
Pending legal-status Critical Current

Links

Images

Abstract

The application provides a method and a device for processing data of an indicator, electronic equipment and a storage medium, wherein the method is applied to an indicator system and comprises the following steps: acquiring indication data, wherein the indication data comprises a frame header and a data domain; analyzing the frame header, and determining the structural information of the data domain, wherein the structural information is used for representing the combination form of the data in the data domain; determining a data type and a parsing method of the data field based on the structure information; and analyzing the data domain according to the data type and the analysis method. By the method, data processing software does not need to be developed specifically for different data protocols, the digital display system can be compatible with various data protocols, and the applicability of the digital display system is improved.

Description

Method and device for processing data of indicator, electronic equipment and storage medium
Technical Field
The present application relates to the field of data processing, and in particular, to a method and an apparatus for processing digital display data, an electronic device, and a storage medium.
Background
Along with the fact that aerospace launch enters a construction stage from an early exploration stage in China, a launching task is in a blowout type growth situation, meanwhile, the technology of a carrier rocket is continuously developed, and more novel measurement and control equipment are continuously applied, so that stricter requirements and standards are provided for the guarantee capability of a launching field. In order to realize the rapid switching and expansion of the instruction display data (instruction display data) among different measurement and control schemes and different task models, the data processing software serving as important background service software of the instruction display system (instruction display system) needs to make corresponding adjustment on a data processing method. Due to the difference of the data protocols adopted by different transmitting fields, corresponding data processing software needs to be customized and developed for each data protocol, and the data processing software customized and developed for each data protocol is installed on the display indicating system, so that the interconnection, intercommunication and interoperation of display indicating data among different transmitting fields are realized. Therefore, the existing pointing display system has the problems of deep customization degree, long task preparation time and poor data access compatibility.
Disclosure of Invention
An object of the embodiments of the present application is to provide an indication data processing method, an indication data processing apparatus, an electronic device, and a storage medium, so as to improve the applicability of an indication system.
In a first aspect, the present application provides an indication data processing method, applied to an indication system, the method including: acquiring indication data, wherein the indication data comprises a frame header and a data domain; analyzing the frame header, and determining the structural information of the data domain, wherein the structural information is used for representing the combination form of the data in the data domain; determining a data type and a parsing method of the data field based on the structural information; and analyzing the data domain according to the data type and the analysis method.
In the embodiment of the application, firstly, the display data is acquired, the frame header of the display data is analyzed, the structural information corresponding to the data field of the display data is determined, then, the data type and the analysis method of the data field of the display data are determined based on the structural information, and then, the data field of the display data is analyzed according to the determined data type and the analysis method. By the mode, data processing software does not need to be developed specifically for different data protocols, the digital display system can be compatible with various data protocols, and the applicability of the digital display system is improved.
In an optional embodiment, the determining the data type of the data field based on the structural information and the parsing method include: determining a plurality of protocol sequence numbers included in the data field and data corresponding to the protocol sequence numbers one by one according to the structure information; aiming at each protocol serial number, determining a protocol model corresponding to each protocol serial number from a preset protocol template library, wherein the protocol model comprises a data type and an analysis method corresponding to the protocol serial number; correspondingly, the parsing the data field according to the data type and the parsing method includes: and analyzing the data corresponding to the corresponding protocol sequence number in the data domain according to the data type corresponding to each protocol sequence number and an analysis method.
In an optional embodiment, the data field includes a first protocol sequence number, first data corresponding to the first protocol sequence number, a second protocol sequence number, and second data corresponding to the second protocol sequence number, and the structure information includes: the data bit number of the protocol sequence number is N, and determining a plurality of protocol sequence numbers included in the data field and data corresponding to the protocol sequence numbers one to one according to the structure information includes: determining the first N bits in the data field as the first protocol sequence number according to the data bit number; determining a first protocol model from a preset protocol template library according to the first protocol sequence number, wherein the first protocol model comprises the data length L of first data, the data type of the first data and an analysis method of the first data; determining data from the (N + 1) th bit to the (N + L) th bit in the data field as first data corresponding to the first protocol sequence number according to the length of the first data; determining data from the (N + L + 1) th bit to the (N + L + N) th bit in the data field as the second protocol sequence number according to the data bits; determining a second protocol model from a preset protocol template library according to the second protocol sequence number, wherein the second protocol model comprises the data length M of second data, the data type of the second data and an analysis method of the second data; and determining that the data from the N + L + N +1 th bit to the N + L + N + M th bit in the data field is the second data corresponding to the second protocol sequence number according to the length of the second data, wherein the N, M, L is a natural number greater than 0.
In an optional embodiment, the protocol model further includes a parameter dictionary ID, and after the parsing the data field according to the data type and the parsing method, the method further includes: matching a corresponding parameter dictionary from a preset parameter dictionary library according to the parameter dictionary ID, wherein the parameter dictionary is used for representing attribute information of data corresponding to the protocol serial number; and caching the data corresponding to the protocol serial number and the parameter dictionary of the data corresponding to the protocol serial number.
In the embodiment of the application, a mapping relation between a protocol template and a parameter dictionary is established through a parameter dictionary ID, and the parameter dictionary represents attribute information of data corresponding to a protocol serial number. And after the pointing display system analyzes the pointing display data, matching a corresponding parameter dictionary from a preset parameter dictionary library according to the parameter dictionary ID in the protocol template, thereby determining the actual meaning represented by the pointing display data, and caching the data corresponding to the protocol serial number and the parameter dictionary of the data corresponding to the protocol serial number. Therefore, the actual meaning of the data corresponding to the protocol sequence number can be conveniently inquired subsequently.
In an optional embodiment, the protocol model further includes a topic model ID, and after the caching the data corresponding to the protocol sequence number and the parameter dictionary of the data corresponding to the protocol sequence number, the method further includes: determining a topic model from a preset topic model library according to the topic model ID, wherein the topic model comprises: a data interface for forwarding the data corresponding to the protocol serial number; and forwarding the analyzed data corresponding to the protocol serial number according to the data interface.
In the embodiment of the application, a mapping relation between a protocol template and a theme model is established through a theme model ID, the analyzed data is packaged according to the theme model ID in the protocol model, a data interface is further determined according to the theme model corresponding to the theme model ID, and the analyzed data packaged according to the theme model ID is forwarded through the data interface, so that the high-efficiency circulation of the display data is realized.
In an alternative embodiment, the topic model further comprises: one or more of a generation mode, a tested object, a subject name, a data sender and a release state.
In an alternative embodiment, the data types include: single-value type parameters, multi-value type parameters, state type parameters, instruction type parameters, source codes and remote measurement type parameters; the analysis method comprises the following steps: a single-precision floating-point analysis method, a multi-precision floating-point analysis method, an integer data analysis method, a character string analysis method, and a bit operation analysis method.
In a second aspect, the present application provides an apparatus for processing digital display data, which is applied to a digital display system, the apparatus comprising: the acquisition module is used for acquiring the display data, and the display data comprises a frame header and a data domain; a frame header analyzing module, configured to analyze the frame header and determine structural information of the data domain, where the structural information is used to represent a combination form of data in the data domain; a determining module for determining a data type and a parsing method of the data field based on the structure information; and the data domain analyzing module is used for analyzing the data domain according to the data type and the analyzing method.
In an optional embodiment, the determining module is specifically configured to determine, according to the structure information, a plurality of protocol sequence numbers included in the data field and data corresponding to the plurality of protocol sequence numbers one to one; aiming at each protocol serial number, determining a protocol model corresponding to each protocol serial number from a preset protocol template library, wherein the protocol model comprises a data type and an analysis method corresponding to the protocol serial number; correspondingly, the data field analysis module is specifically configured to analyze the data corresponding to the corresponding protocol sequence number in the data field according to the data type and the analysis method corresponding to each protocol sequence number.
In an optional embodiment, the data field includes a first protocol sequence number, first data corresponding to the first protocol sequence number, a second protocol sequence number, and second data corresponding to the second protocol sequence number, and the structure information includes: the data bit number of the protocol sequence number is N, and the determining module is specifically configured to determine, according to the data bit number, that the first N bits in the data field are the first protocol sequence number; determining a first protocol model from a preset protocol template library according to the first protocol sequence number, wherein the first protocol model comprises the data length L of first data, the data type of the first data and an analysis method of the first data; determining data from the (N + 1) th bit to the (N + L) th bit in the data field as first data corresponding to the first protocol sequence number according to the length of the first data; determining data from the (N + L + 1) th bit to the (N + L + N) th bit in the data field as the second protocol sequence number according to the data bits; determining a second protocol model from a preset protocol template library according to the second protocol sequence number, wherein the second protocol model comprises the data length M of second data, the data type of the second data and an analysis method of the second data; and determining that the data from the N + L + N +1 th bit to the N + L + N + M th bit in the data field is the second data corresponding to the second protocol sequence number according to the length of the second data, wherein the N, M, L is a natural number greater than 0.
In an optional embodiment, the protocol model further includes a parameter dictionary ID, and the apparatus further includes a parameter dictionary matching module, configured to match a corresponding parameter dictionary from a preset parameter dictionary library according to the parameter dictionary ID, where the parameter dictionary is used to represent attribute information of data corresponding to the protocol serial number; and the caching module is used for caching the data corresponding to the protocol serial number and the parameter dictionary of the data corresponding to the protocol serial number.
In an optional implementation manner, the protocol model further includes a topic model ID, the apparatus further includes a topic model matching module, configured to determine a topic model from a preset topic model library according to the topic model ID, where the topic model includes: a data interface for forwarding the data corresponding to the protocol serial number; and the forwarding module is used for forwarding the analyzed data corresponding to the protocol serial number according to the data interface.
In an alternative embodiment, the topic model further comprises: one or more of a generation mode, a tested object, a subject name, a data sender and a release state.
In an alternative embodiment, the data types include: single-value type parameters, multi-value type parameters, state type parameters, instruction type parameters, source codes and remote measurement type parameters; the analysis method comprises the following steps: a single-precision floating-point analysis method, a multi-precision floating-point analysis method, an integer data analysis method, a character string analysis method, and a bit operation analysis method.
In a third aspect, the present application provides an electronic device, comprising: a processor, a memory, and a bus; the processor and the memory are communicated with each other through the bus; the memory stores program instructions executable by the processor, the processor being capable of executing the method of any one of the preceding embodiments when invoked by the processor.
In a fourth aspect, the present application provides a storage medium having stored thereon computer program instructions which, when read and executed by a computer, perform the method according to any of the preceding embodiments.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a flowchart of an instruction data processing method according to an embodiment of the present application;
fig. 2 is a block diagram of an instruction data processing apparatus according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Icon: 200-a display data processing device; 201-an acquisition module; 202-frame header parsing module; 203-a determination module; 204-a data domain parsing module; 300-an electronic device; 301-a processor; 302-a communication interface; 303-a memory; 304-bus.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
Referring to fig. 1, fig. 1 is a flowchart of an instruction data processing method according to an embodiment of the present disclosure, where the instruction data processing method is applied to an instruction system, and the instruction data processing method may include the following steps:
step 101: and acquiring the indication data.
Step 102: and analyzing the frame header to determine the structural information of the data domain.
Step 103: the data type and parsing method of the data field are determined based on the structure information.
Step 104: and analyzing the data domain according to the data type and the analysis method.
The method for processing the data of the pointing display is applied to the pointing display system, and the pointing display system is connected with a plurality of other systems. Wherein the other system may be a control system of different transmit fields. The control system of the different transmission fields sends the indication data generated by itself to the indication system. Because the different transmitting fields adopt different data protocols, in order to realize interconnection, intercommunication and interoperation of the display data among the different transmitting fields, the display data generated by the different transmitting fields are firstly sent to a display system. The method comprises the steps that an indication system processes and analyzes indication data of different data protocols by adopting an indication data processing method provided by the application, and determines structural information of a data domain of the indication data by analyzing a frame header of the indication data; and determining the data type and the analysis method of the data domain based on the structural information, and further analyzing the data domain according to the determined data type and the analysis method.
The above method is described in detail below.
Step 101: and acquiring the indication data.
In the embodiment of the application, firstly, the indication data is acquired. In the embodiment of the application, a data format is provided, and the data format includes a frame header and a data field. The frame header stores various frame header information, and the subsequent steps of the embodiment of the application are conveniently realized by analyzing the frame header.
Optionally, the frame header information may further include various information for verification, for example, the frame header information may include information source verification information for verifying the information source of the display data; the information sink checking information is used for checking the information sink of the indication data; time settlement information for performing time settlement on the indication data; and the frame continuous checking information is used for sequentially checking the indication data and ensuring that each data frame is received according to a preset sequence.
It can be understood that the frame header information is only an example provided in the embodiment of the present application, and the present application does not specifically limit the type of the parity included in the frame header information, and a person skilled in the art can select different parity information as the frame header information according to actual requirements.
Optionally, the display data may include: the system comprises information such as information of life and insurance, measurement and control information, electricity measurement and generation information, measurement and generation ground service information, meteorological information and communication information.
The health protection information is the physiological guarantee information of the astronaut, and comprises the following steps: various physiological information of the astronaut, such as heart rate, blood pressure, respiration and the like, is acquired by the physical guarantee equipment on the rocket.
The measurement and control information is measurement and control information formed by aircrafts such as rockets, satellites and the like during measurement and control joint debugging and actual combat missions.
The power generation testing information is rocket overall network testing information and satellite overall network testing information, namely testing information and state information formed in the test launching process of the rocket and the satellite.
The ground service information is the state information of ground facility equipment needing close attention during the launching test task.
The weather information is the attention information of commanders such as short-term forecast, weather live and the like provided by a meteorological department of a transmitting field.
The communication information is the monitoring information of the whole communication network system of the transmission layer, the service bearing layer and the data layer, which is realized by comprehensively monitoring the situation of the communication network.
It is understood that the above-mentioned various types of information are data in the data domain.
It should be noted that the above-mentioned display data is only an example provided in the embodiment of the present application, and the display data may further include video monitoring information, decision analysis information, auxiliary command information, and the like. The type of information included in the indication data is not particularly limited in this application.
Step 102: and analyzing the frame header to determine the structural information of the data domain.
In the embodiment of the application, after the indication data is acquired, the frame header of the indication data is analyzed, and the structural information of the data domain is determined. Specifically, after a frame of indication data is acquired, the frame header analysis is performed on the frame of indication data. The frame header information includes a structure information that characterizes the combination of data in the data field.
For convenience of explanation, steps 103 and 104 will be described together.
Step 103: the data type and parsing method of the data field are determined based on the structure information.
Step 104: and analyzing the data domain according to the data type and the analysis method.
In the embodiment of the application, after the frame header of the indication data is analyzed, the structural information of the data domain is determined, and the data type and the analysis method of the data domain are determined based on the structural information. And after the indicating system determines the data type and the analyzing method of the data in the data domain, analyzing the data domain according to the determined data type and the analyzing method.
As an alternative implementation, the step 103 may include the following steps:
and determining a plurality of protocol sequence numbers and data corresponding to the protocol sequence numbers one by one according to the structure information.
And aiming at each protocol serial number, determining a protocol model corresponding to the protocol serial number from a preset protocol template library, wherein the protocol model comprises a data type corresponding to the protocol serial number and an analysis method.
Accordingly, the step 104 may include the following steps:
and analyzing the data corresponding to the corresponding protocol sequence number in the data domain according to the data type corresponding to each protocol sequence number and an analysis method.
It is to be understood that, since the processing principle of each frame of the indication data is the same, for convenience of description and understanding, the above step 103 will be described below by taking a certain frame of the indication data as an example.
As an optional implementation manner, the determining, according to the structure information, a plurality of protocol sequence numbers included in the data field and data corresponding to the plurality of protocol sequence numbers in a one-to-one manner may include the following steps:
the method comprises the steps that firstly, a first protocol model is determined from a preset protocol template library according to a first protocol serial number, and the first protocol model comprises the data length L of first data, the data type of the first data and an analysis method of the first data;
secondly, determining data from the (N + 1) th bit to the (N + L) th bit in the data field as first data corresponding to the first protocol sequence number according to the length of the first data;
thirdly, determining data from the (N + L + 1) th bit to the (N + L + N) th bit in the data field as a second protocol sequence number according to the data bits;
fourthly, determining a second protocol model from a preset protocol template library according to the second protocol sequence number, wherein the second protocol model comprises the data length M of second data, the data type of the second data and an analysis method of the second data;
and fifthly, determining that the data from the (N + L + N + 1) th bit to the (N + L + N + M) th bit in the data field is the second data corresponding to the second protocol sequence number according to the length of the second data.
In this embodiment of the present application, the data field of the pointing display data includes a first protocol serial number, first data corresponding to the first protocol serial number, a second protocol serial number, and second data corresponding to the second protocol serial number, and the structural information includes: the number of data bits of the protocol sequence number is N.
A data field may be understood as a number of bits of data. The indicating system determines the data bit number of the protocol sequence number to be N according to the structure information, so that the 1 st bit to the N th bit in the data field represent the first protocol sequence number. The indication system firstly determines a first protocol sequence number according to the 1 st bit to the Nth bit in the data field, and then determines a first protocol template from a preset protocol template library according to the first protocol sequence number. The data length L of the first data, the data type of the first data and the analysis method of the first data are stored in the first protocol template. And the indicating system determines the data from the (N + 1) th bit to the (N + L) th bit in the data field as the first data corresponding to the first protocol sequence number according to the data length L of the first data.
After the first data is determined, the data bits of the protocol sequence number are N, so the data from the N + L +1 th bit to the N + L + N th bit in the data field represent the second protocol sequence number. And the indication system determines a second protocol sequence number according to the data from the (N + L + 1) th bit to the (N + L + N) th bit in the data field, and then determines a second protocol template from a preset protocol template library according to the second protocol sequence number. The second protocol template stores the data length M of the second data, the data type of the second data, and the parsing method of the second data, as in the first protocol template. And the indicating system determines the data from the (N + L + N + 1) th bit to the (N + L + N + M) th bit in the data field as second data corresponding to the second protocol sequence number according to the data length M of the second data.
Through the mode, the indication display system determines the first protocol serial number, the first data corresponding to the first protocol serial number, the second protocol serial number and the second data corresponding to the second protocol serial number which are included in the data field according to the structure information.
The first protocol template comprises the data length L of the first data, the data type of the first data and the analysis method of the first data, so that the first data is analyzed according to the data type of the first data and the analysis method of the first data after the first data is determined by the pointing display system according to the data length L of the first data. Similarly, after the second data is determined according to the data length M of the second data, the second data is analyzed according to the data type of the second data and the analysis method of the second data by the pointing display system.
The N, M, L numbers are all natural numbers greater than 0. The specific value of N, M, L is not specifically limited in the present application, and can be flexibly set according to the actual situation.
It can be understood that a protocol template library is pre-stored in the display system, a plurality of protocol templates are stored in the protocol template library, and one protocol template corresponds to one protocol serial number. And the structural information in the frame header of the indicating data represents the data bit number occupied by the protocol sequence number in the data field. The protocol sequence number and the data corresponding to the protocol sequence number are sequentially arranged to form a data field of the pointing display data. The data bit number, the data type and the analysis method of the data corresponding to the protocol serial number are stored in the protocol template corresponding to the protocol serial number. After the instruction display data is obtained, a first protocol serial number is determined according to the structural information of the frame head of the instruction display data, a corresponding protocol template is determined according to the first protocol serial number, then the data corresponding to the first protocol serial number and the corresponding data type and analysis method are determined according to the protocol template, and the data are analyzed according to the data type and analysis method.
And then determining a second protocol serial number according to the structure information, determining a corresponding protocol template according to the second protocol serial number, further determining data corresponding to the second protocol serial number and a corresponding data type and analysis method according to the protocol template, and analyzing the data according to the data type and the analysis method. And circulating the above processes to analyze the data field of the indication data.
Optionally, the data types may include: single value type parameter, multiple value type parameter, state type parameter, instruction type parameter, source code and remote measuring type parameter. The resolution method may include: a single-precision floating-point analysis method, a multi-precision floating-point analysis method, an integer data analysis method, a character string analysis method, and a bit operation analysis method. It should be noted that the above data types and analysis methods may be combined with each other. For example, the single-valued parameter analysis method may be any one of a single-precision floating-point analysis method, a multi-precision floating-point analysis method, an integer data analysis method, a character string analysis method, and a bit operation analysis method. In addition, the single-precision floating-point analysis method, the multi-precision floating-point analysis method, the integer data analysis method, the character string analysis method, and the bit operation analysis method may be understood as five types of analysis methods, and each type of analysis method may include one or more specific analysis methods.
In the actual application process, a standardized analysis method library corresponding to various analysis methods is stored in advance in the display system, and after the data type and the analysis method of a certain data in the data field are determined, the corresponding analysis method is matched from the standardized analysis method library, and the data is analyzed according to the analysis method. For the specific analysis process of various analysis methods, reference is made to the prior art, and details are not repeated here.
As an optional implementation manner, the protocol model further includes a parameter dictionary ID, and after the data field is parsed according to the data type and the parsing method, the method for processing the instruction data provided by the present application further includes:
matching a corresponding parameter dictionary from a preset parameter dictionary library according to the parameter dictionary ID;
and caching the data corresponding to the protocol serial number and the parameter dictionary of the data corresponding to the protocol serial number.
In the embodiment of the application, the parameter dictionary is used for representing attribute information of data corresponding to the protocol sequence number. Specifically, the parameter dictionary may include the following:
Figure BDA0003453431840000131
it should be noted that each parameter dictionary ID corresponds to a parameter dictionary.
And establishing a mapping relation between the protocol template and the parameter dictionary through the ID of the parameter dictionary, wherein the parameter dictionary represents attribute information of data corresponding to the protocol serial number. And after the pointing display system analyzes the pointing display data, matching a corresponding parameter dictionary from a preset parameter dictionary library according to the parameter dictionary ID in the protocol template, thereby determining the actual meaning represented by the pointing display data, and caching the data corresponding to the protocol serial number and the parameter dictionary of the data corresponding to the protocol serial number. The actual meaning of the data corresponding to the protocol sequence number is convenient to inquire subsequently.
As an optional implementation manner, the protocol model further includes a topic model ID, and after the data corresponding to the protocol sequence number and the parameter dictionary of the data corresponding to the protocol sequence number are cached, the method further includes:
determining a theme model from a preset theme model library according to the theme model ID, wherein the theme model comprises: a data interface for forwarding data corresponding to the protocol sequence number;
and forwarding the data corresponding to the analyzed protocol serial number according to the data interface.
In the embodiment of the application, after the data corresponding to a certain protocol serial number in the data field is analyzed by the indicating and displaying system, the theme model corresponding to the theme model ID is determined from the preset theme model library according to the theme model ID in the protocol model. The topic model comprises: and the data interface is used for forwarding data corresponding to the protocol sequence number. In the actual application process, after the data is analyzed by the indication system, the analyzed data needs to be sent to other equipment through a corresponding data interface for display. And pre-establishing a theme model library, wherein the theme model library corresponds to a plurality of theme models, and each theme model corresponds to one theme model ID. One topic model ID may correspond to a plurality of parameter dictionary IDs. Because the parameter dictionary ID corresponds to the data in the data field of the pointing data, after the data corresponding to a certain protocol serial number is analyzed, a topic model ID can be matched through the parameter dictionary ID of the data, a data interface is further determined according to the topic model corresponding to the topic model ID, and the data corresponding to the analyzed protocol serial number is forwarded through the data interface.
And establishing a mapping relation between the protocol template and the theme model through the theme model ID. Because the mapping relation also exists between the protocol template and the parameter dictionary, the mapping relation among the protocol template, the parameter template and the topic model is formed. According to the embodiment of the application, the analyzed data are packaged according to the theme model ID in the protocol model, the data interface is determined according to the theme model corresponding to the theme model ID, and the analyzed data packaged according to the theme model ID are forwarded through the data interface, so that the high-efficiency circulation of the display data is realized.
As an optional implementation, the topic model further includes: one or more of a generation mode, a tested object, a subject name, a data sender and a release state. For example, the topic model may include the following:
Figure BDA0003453431840000141
Figure BDA0003453431840000151
it should be noted that each topic model ID corresponds to a topic model. In the topic model, the topic name is used for describing the content represented by the topic, so that the subsequent commander can conveniently determine the actual meaning of the data corresponding to the topic.
As an alternative implementation, a specific form of the protocol template is provided as follows:
Figure BDA0003453431840000152
Figure BDA0003453431840000161
it should be noted that each protocol sequence number corresponds to one protocol template.
Wherein the calculation ID and the calculation method are used to determine the data type and the parsing method. Numbering each analysis method in advance, wherein the number corresponding to the numbering is the calculation ID. The name corresponding to the analysis method is the calculation method. In this embodiment, in addition to the parameter dictionary ID, the topic model ID, the data length, the calculation ID, and the calculation method mentioned in the above embodiments, the protocol template further includes other attributes or processing strategies of the data, for example: upper limit, lower limit, caching strategy, warehousing strategy, storage parameters and the like.
To sum up, an embodiment of the present application provides a method for processing instruction data, which includes first obtaining instruction data, parsing a frame header of the instruction data, determining structural information corresponding to a data field of the instruction data, then determining a data type and a parsing method of the data field of the instruction data based on the structural information, and then parsing the data field of the instruction data according to the determined data type and the parsing method. By the mode, data processing software does not need to be developed specifically for different data protocols, the digital display system can be compatible with various data protocols, and the applicability of the digital display system is improved.
Based on the same inventive concept, the embodiment of the application also provides an indicator data processing device. Referring to fig. 2, fig. 2 is a block diagram of an indicator data processing apparatus according to an embodiment of the present disclosure, the indicator data processing apparatus is configured in an indicator system, and the indicator data processing apparatus 200 may include:
an obtaining module 201, configured to obtain display data, where the display data includes a frame header and a data field;
a frame header parsing module 202, configured to parse the frame header and determine structural information of the data domain, where the structural information is used to represent a combination form of data in the data domain;
a determining module 203 for determining a data type and a parsing method of the data field based on the structure information;
and the data domain analyzing module 204 is configured to analyze the data domain according to the data type and the analyzing method.
In an optional embodiment, the determining module is specifically configured to determine, according to the structure information, a plurality of protocol sequence numbers included in the data field and data corresponding to the plurality of protocol sequence numbers one to one; aiming at each protocol serial number, determining a protocol model corresponding to each protocol serial number from a preset protocol template library, wherein the protocol model comprises a data type and an analysis method corresponding to the protocol serial number; correspondingly, the data field analysis module is specifically configured to analyze the data corresponding to the corresponding protocol sequence number in the data field according to the data type and the analysis method corresponding to each protocol sequence number.
In an optional embodiment, the data field includes a first protocol sequence number, first data corresponding to the first protocol sequence number, a second protocol sequence number, and second data corresponding to the second protocol sequence number, and the structure information includes: the data bit number of the protocol sequence number is N, and the determining module is specifically configured to determine, according to the data bit number, that the first N bits in the data field are the first protocol sequence number; determining a first protocol model from a preset protocol template library according to the first protocol sequence number, wherein the first protocol model comprises the data length L of first data, the data type of the first data and an analysis method of the first data; determining data from the (N + 1) th bit to the (N + L) th bit in the data field as first data corresponding to the first protocol sequence number according to the length of the first data; determining data from the (N + L + 1) th bit to the (N + L + N) th bit in the data field as the second protocol sequence number according to the data bits; determining a second protocol model from a preset protocol template library according to the second protocol sequence number, wherein the second protocol model comprises the data length M of second data, the data type of the second data and an analysis method of the second data; and determining that the data from the N + L + N +1 th bit to the N + L + N + M th bit in the data field is the second data corresponding to the second protocol sequence number according to the length of the second data, wherein the N, M, L is a natural number greater than 0.
In an optional embodiment, the protocol model further includes a parameter dictionary ID, and the apparatus further includes a parameter dictionary matching module, configured to match a corresponding parameter dictionary from a preset parameter dictionary library according to the parameter dictionary ID, where the parameter dictionary is used to represent attribute information of data corresponding to the protocol serial number; and the caching module is used for caching the data corresponding to the protocol serial number and the parameter dictionary of the data corresponding to the protocol serial number.
In an optional implementation manner, the protocol model further includes a topic model ID, the apparatus further includes a topic model matching module, configured to determine a topic model from a preset topic model library according to the topic model ID, where the topic model includes: a data interface for forwarding the data corresponding to the protocol serial number; and the forwarding module is used for forwarding the analyzed data corresponding to the protocol serial number according to the data interface.
In an alternative embodiment, the topic model further comprises: one or more of a generation mode, a tested object, a subject name, a data sender and a release state.
In an alternative embodiment, the data types include: single-value type parameters, multi-value type parameters, state type parameters, instruction type parameters, source codes and remote measurement type parameters; the analysis method comprises the following steps: a single-precision floating-point analysis method, a multi-precision floating-point analysis method, an integer data analysis method, a character string analysis method, and a bit operation analysis method.
Referring to fig. 3, fig. 3 is a schematic structural diagram of an electronic device 300 according to an embodiment of the present application, where the electronic device 300 includes: at least one processor 301, at least one communication interface 302, at least one memory 303, and at least one bus 304. Wherein the bus 304 is used for realizing direct connection communication of these components, the communication interface 302 is used for communicating signaling or data with other node devices, and the memory 303 stores machine readable instructions executable by the processor 301. When the electronic device 300 is in operation, the processor 301 communicates with the memory 303 via the bus 304, and the machine-readable instructions, when called by the processor 301, perform the above-described method of processing the instructional data.
The processor 301 may be an integrated circuit chip having signal processing capabilities. The Processor 301 may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. Which may implement or perform the various methods, steps, and logic blocks disclosed in the embodiments of the present application. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The Memory 303 may include, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Read Only Memory (EPROM), an electrically Erasable Read Only Memory (EEPROM), and the like.
It will be appreciated that the configuration shown in fig. 3 is merely illustrative and that electronic device 300 may include more or fewer components than shown in fig. 3 or have a different configuration than shown in fig. 3. The components shown in fig. 3 may be implemented in hardware, software, or a combination thereof. In the embodiment of the present application, the electronic device 300 may be, but is not limited to, an entity device such as a desktop, a notebook computer, a smart phone, an intelligent wearable device, and a vehicle-mounted device, and may also be a virtual device such as a virtual machine. In addition, the electronic device 300 is not necessarily a single device, but may also be a combination of multiple devices, such as a server cluster, and the like.
In addition, the present application further provides a computer storage medium, where a computer program is stored, and when the computer program is executed by a computer, the steps of the method for processing pointing data in the foregoing embodiments are executed.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
In addition, units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
Furthermore, the functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
It should be noted that the functions, if implemented in the form of software functional modules and sold or used as independent products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (10)

1. A method for processing data of an indicator, which is applied to an indicator system, comprises the following steps:
acquiring indication data, wherein the indication data comprises a frame header and a data domain;
analyzing the frame header, and determining the structural information of the data domain, wherein the structural information is used for representing the combination form of the data in the data domain;
determining a data type and a parsing method of the data field based on the structural information;
and analyzing the data domain according to the data type and the analysis method.
2. The method of claim 1, wherein determining the data type and parsing method for the data field based on the structure information comprises:
determining a plurality of protocol sequence numbers included in the data field and data corresponding to the protocol sequence numbers one by one according to the structure information;
aiming at each protocol serial number, determining a protocol model corresponding to each protocol serial number from a preset protocol template library, wherein the protocol model comprises a data type and an analysis method corresponding to the protocol serial number;
correspondingly, the parsing the data field according to the data type and the parsing method includes:
and analyzing the data corresponding to the corresponding protocol sequence number in the data domain according to the data type corresponding to each protocol sequence number and an analysis method.
3. The method of claim 2, wherein the data field comprises a first protocol sequence number, first data corresponding to the first protocol sequence number, a second protocol sequence number, and second data corresponding to the second protocol sequence number, and wherein the configuration information comprises: the data bit number of the protocol sequence number is N, and determining a plurality of protocol sequence numbers included in the data field and data corresponding to the protocol sequence numbers one to one according to the structure information includes:
determining the first N bits in the data field as the first protocol sequence number according to the data bit number;
determining a first protocol model from a preset protocol template library according to the first protocol sequence number, wherein the first protocol model comprises the data length L of first data, the data type of the first data and an analysis method of the first data;
determining data from the (N + 1) th bit to the (N + L) th bit in the data field as first data corresponding to the first protocol sequence number according to the length of the first data;
determining data from the (N + L + 1) th bit to the (N + L + N) th bit in the data field as the second protocol sequence number according to the data bits;
determining a second protocol model from a preset protocol template library according to the second protocol sequence number, wherein the second protocol model comprises the data length M of second data, the data type of the second data and an analysis method of the second data;
and determining that the data from the N + L + N +1 th bit to the N + L + N + M th bit in the data field is the second data corresponding to the second protocol sequence number according to the length of the second data, wherein the N, M, L is a natural number greater than 0.
4. The method of claim 2, wherein the protocol model further comprises a parameter dictionary ID, and wherein after the parsing the data field according to the data type and the parsing method, the method further comprises:
matching a corresponding parameter dictionary from a preset parameter dictionary library according to the parameter dictionary ID, wherein the parameter dictionary is used for representing attribute information of data corresponding to the protocol serial number;
and caching the data corresponding to the protocol serial number and the parameter dictionary of the data corresponding to the protocol serial number.
5. The method of claim 4, wherein the protocol model further comprises a topic model ID, and after the caching the data corresponding to the protocol sequence number and the parameter dictionary of the data corresponding to the protocol sequence number, the method further comprises:
determining a topic model from a preset topic model library according to the topic model ID, wherein the topic model comprises: a data interface for forwarding the data corresponding to the protocol serial number;
and forwarding the analyzed data corresponding to the protocol serial number according to the data interface.
6. The method of claim 5, wherein the topic model further comprises: one or more of a generation mode, a tested object, a subject name, a data sender and a release state.
7. The method of any of claims 1-6, wherein the data types include: single-value type parameters, multi-value type parameters, state type parameters, instruction type parameters, source codes and remote measurement type parameters;
the analysis method comprises the following steps: a single-precision floating-point analysis method, a multi-precision floating-point analysis method, an integer data analysis method, a character string analysis method, and a bit operation analysis method.
8. An apparatus for processing pointing display data, which is applied to a pointing display system, the apparatus comprising:
the acquisition module is used for acquiring the display data, and the display data comprises a frame header and a data domain;
a frame header analyzing module, configured to analyze the frame header and determine structural information of the data domain, where the structural information is used to represent a combination form of data in the data domain;
a determining module for determining a data type and a parsing method of the data field based on the structure information;
and the data domain analyzing module is used for analyzing the data domain according to the data type and the analyzing method.
9. An electronic device, comprising: a processor, a memory, and a bus; the processor and the memory are communicated with each other through the bus; the memory stores program instructions executable by the processor, the processor invoking the program instructions to perform the method of any one of claims 1-7.
10. A storage medium having stored thereon computer program instructions which, when read and executed by a computer, perform the method of any one of claims 1-7.
CN202111672482.1A 2021-12-31 2021-12-31 Method and device for processing data of indicator, electronic equipment and storage medium Pending CN114328877A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111672482.1A CN114328877A (en) 2021-12-31 2021-12-31 Method and device for processing data of indicator, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111672482.1A CN114328877A (en) 2021-12-31 2021-12-31 Method and device for processing data of indicator, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114328877A true CN114328877A (en) 2022-04-12

Family

ID=81020753

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111672482.1A Pending CN114328877A (en) 2021-12-31 2021-12-31 Method and device for processing data of indicator, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114328877A (en)

Similar Documents

Publication Publication Date Title
US10642721B2 (en) Generation of automated testing scripts by converting manual test cases
CN112187558B (en) Data verification method and device and electronic equipment
CN114500690B (en) Interface data processing method and device, electronic equipment and storage medium
CN105243329B (en) The method and device of android system bug excavation
CN111694828A (en) Data processing method, device, system and storage medium
CN115757483A (en) Automatic testing method and device, electronic equipment and storage medium
JP2023036681A (en) Task processing method, processing device, electronic equipment, storage medium, and computer program
CN112966824A (en) Deployment method and device of inference library and electronic equipment
CN112631924A (en) Automatic testing method and device, computer equipment and storage medium
CN109783287B (en) Test instruction generation method, system, terminal and medium based on configuration file
CN110990346A (en) File data processing method, device, equipment and storage medium based on block chain
CN112527678A (en) Method, apparatus, device and storage medium for testing protocol
CN114328877A (en) Method and device for processing data of indicator, electronic equipment and storage medium
CN109446686B (en) Method for analyzing logical connection relation between devices in equipment
WO2023151397A1 (en) Application program deployment method and apparatus, device, and medium
CN116185393A (en) Method, device, equipment, medium and product for generating interface document
CN110858143B (en) Installation package generation method, device, equipment and storage medium
CN110659280A (en) Road blocking abnormity detection method and device, computer equipment and storage medium
CN111430013B (en) Image date complementing method, device, equipment and storage medium
CN111859985B (en) AI customer service model test method and device, electronic equipment and storage medium
CN112527278A (en) Smart form generating and issuing method, device, terminal and storage medium
CN112084114A (en) Method and apparatus for testing an interface
CN111639173A (en) Epidemic situation data processing method, device, equipment and storage medium
CN110333897A (en) A kind of interface allocation method, device, medium and electronic equipment
CN113656324B (en) Full-link test method, device, equipment and medium for disease input and decision

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination