Signal system interface information conversion method, device, electronic device and storage medium
By receiving input information in the signal system and performing one-dimensional and data conversion according to the input numerical structure, the problem of complex and high cost in the interface information conversion process in the prior art is solved, and efficient interface conversion and the effect of reducing test costs is achieved.
Patent Information
- Application Number
- CN202111011530.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-31
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2041-08-31
AI Technical Summary
In the prior art, the development and testing of signal system interface information conversion process is difficult, and the labor and time costs are relatively high.
By receiving input information sent by external systems, one-dimensionalize it according to the input numerical structure, all attributes form a unified position identification sequence, and data conversion is performed based on the position identification sequence and the conversion processing settings, etching of the position identification sequence after the attribute is converted, and the format is rearranged according to the input numerical structure to form target information.
It realizes comprehensive and centralized interface conversion processing for input information from different sources and structures, reducing the probability of interface errors and reducing testing costs.
Smart Images

Figure CN113792095B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of urban rail transit, and in particular to a signal system interface information conversion method, device, electronic equipment and storage medium. Background Art
[0002] The signal system of urban rail transit is a highly automated command system. With the continuous deepening of operational refinement, the signal system needs to add many interface functions. Converting input information into data required by the signal system is an important part of the interface function.
[0003] In related technologies, developers usually implement interface information conversion by writing code. Since the interface data faced by the signal system is industrial data, including various sensors or sensor fusion information, there are many interfaces, and each interface includes multiple input information. In addition, the information has a quantitative inclusion relationship and a complex structure, which makes the code writing process more complicated, the testing difficulty increases, and the labor and time costs are relatively high. In addition, when new requirements appear in the system or the original requirements change, it is necessary to repeatedly develop interface functions for multi-attribute conversion, which leads to an increase in overall costs. Summary of the invention
[0004] The present invention provides a signal system interface information conversion method, device, electronic device and storage medium, which are used to solve the problems in the prior art that the information conversion process is difficult to develop and test, and has relatively high labor cost and time cost.
[0005] The present invention provides a signal system interface information conversion method, comprising: receiving input information sent by an external system; one-dimensionalizing the input information according to an input numerical structure, so that all attributes of the input information form a unified position identifier sequence, and the position identifier sequence includes the position identifier of each attribute in the input information; based on the position identifier of each attribute, determining the content exceeding the position identifier sequence in an attribute conversion list, and inserting the content into the tail of the position identifier sequence to achieve expansion of the position identifier sequence; based on the expanded position identifier sequence and conversion processing settings, performing data conversion to obtain a position identifier sequence after attribute conversion; according to the attribute conversion list, removing the position identifiers in the position identifier sequence after attribute conversion that do not belong to the attribute conversion list to achieve etching of the position identifier sequence after attribute conversion, and rearranging the format according to the input numerical structure to form target information.
[0006] According to a signal system interface information conversion method provided by the present invention, the input information is one-dimensionalized according to the input numerical structure so that all attributes of the input information form a unified position identification sequence, including: according to the input numerical structure of the input information, each attribute in the input numerical structure is obtained; for each attribute, a one-dimensional sequence is formed to ensure that each attribute has a unique position identification; based on the unique position identification of each attribute, a unified position identification sequence is formed.
[0007] According to a signal system interface information conversion method provided by the present invention, the attribute conversion list corresponds to the input numerical structure; the attribute conversion list includes position identifiers of some or all attributes in the input information; or, the attribute conversion list includes position identifiers of some or all attributes in the input information, and position identifiers of newly added attributes not included in the input information; the position identifiers of the newly added attributes not included in the input information are the contents in the attribute conversion list that exceed the position identifier sequence.
[0008] According to a signal system interface information conversion method provided by the present invention, data conversion is performed based on an expanded position identifier sequence and a conversion processing setting to obtain a position identifier sequence after attribute conversion, including: determining the conversion settings of each attribute based on the position identifier of each attribute in the expanded position identifier sequence and the conversion settings of each position identifier in the conversion processing setting; based on the conversion settings of any attribute, converting the input data of any attribute to obtain a conversion result of any attribute; the input data of any attribute includes the conversion results of other attributes and / or the input data of any attribute in the input information.
[0009] According to a signal system interface information conversion method provided by the present invention, the conversion settings include at least one of remaining unchanged, specifying a decimal point position based on an input value, corresponding a value based on input text, corresponding text based on an input value, performing operations based on an input value, and calculating a timestamp.
[0010] According to a signal system interface information conversion method provided by the present invention, the position identifier sequence after attribute conversion is based on the attribute conversion list, and the position identifiers that do not belong to the attribute conversion list are removed to achieve the etching of the position identifier sequence after attribute conversion, and the format is rearranged according to the input numerical structure to form the target information, including: determining the part of the position identifiers to be removed that do not belong to the attribute conversion list in the position identifier sequence after attribute conversion; removing the part to be removed in the position identifier sequence after attribute conversion to achieve the etching of the position identifier sequence after attribute conversion; rearranging the format of the etched position identifier sequence according to the input numerical structure, that is, reforming the original attributes of the similar structure. At this time, the attributes and the input attributes have completed the transformation processing to form the target information.
[0011] The present invention also provides a signal system interface information conversion device, comprising: an input information receiving unit, used to receive input information sent by an external system; a one-dimensionalization unit, used to one-dimensionalize the input information according to the input numerical structure, so that all attributes of the input information form a unified position identifier sequence, and the position identifier sequence includes the position identifier of each attribute in the input information; an expansion unit, used to determine the content in the attribute conversion list that exceeds the position identifier sequence based on the position identifier of each attribute, and insert the content into the end of the position identifier sequence to achieve expansion of the position identifier sequence; a data conversion unit, used to perform data conversion based on the expanded position identifier sequence and the conversion processing settings to obtain the position identifier sequence after attribute conversion; an etching unit, used to remove the position identifiers in the position identifier sequence after attribute conversion that do not belong to the attribute conversion list according to the attribute conversion list, to achieve etching of the position identifier sequence after attribute conversion, and rearrange the format according to the input numerical structure to form the target information.
[0012] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of any of the above-mentioned signal system interface information conversion methods are implemented.
[0013] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the signal system interface information conversion method as described in any one of the above items are implemented.
[0014] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the steps of any of the above-mentioned signal system interface information conversion methods are implemented.
[0015] The signal system interface information conversion method, device, electronic device and storage medium provided by the present invention perform comprehensive and centralized interface conversion processing on input information from different sources and with different structures according to the correspondence between the preset input numerical structure, attribute conversion list and conversion processing settings. The specific information conversion process does not need to distinguish the source or function of the input information. It only needs to determine the input numerical structure of the input information to achieve interface conversion in a unified process, thereby fundamentally reducing the probability of interface errors and reducing testing costs while ensuring test results. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0017] Figure 1 It is a flow chart of the signal system interface information conversion method provided by the present invention;
[0018] Figure 2 is a flow chart of step 120 in the signal system interface information conversion method provided by the present invention;
[0019] Figure 3 is a flow chart of step 140 in the signal system interface information conversion method provided by the present invention;
[0020] Figure 4 is a flow chart of step 150 in the signal system interface information conversion method provided by the present invention;
[0021] Figure 5 It is a structural schematic diagram of the signal system interface information conversion device provided by the present invention;
[0022] Figure 6 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0023] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0024] Figure 1is a flow chart of the signal system interface information conversion method provided by the present invention, such as Figure 1 As shown, the method comprises the following steps:
[0025] Step 110: receiving input information sent by an external system.
[0026] Here, the external system is a system that needs to exchange information with the signal system, and the information exchange referred to here does not include the information exchange within the signal system. The external system can be one or more, and the embodiment of the present invention does not specifically limit this.
[0027] Input information refers to information input from an external system to the signal system. The information source may be various external systems, and each external system may correspond to one or more pieces of input information. For example, the input information received by the signal system from the external system may include one or more of the following: area control input information, train input information, interlocking input information, and train automatic supervision system input information.
[0028] The reception here may be real-time reception, that is, responding to real-time transmission of an external system, or may be regular reception according to a preset time interval.
[0029] The signal system receives a large amount of input information sent by the external system and the structure is relatively complex. Therefore, information conversion is an important part of the interface function, including collecting external input information according to the required constraints and converting it into the required data. The system analyzes the converted data and performs logical analysis, data statistics, content retrieval and other processing to realize the information conversion function of the interface through the following steps.
[0030] Step 120 , one-dimensionalize the input information according to the input numerical structure, so that all attributes of the input information form a unified position identifier sequence, and the position identifier sequence includes the position identifier of each attribute in the input information.
[0031] Specifically, the numerical structure is a collection of data attributes that have one or more specific relationships with each other, and the numerical structure may include one or more levels of data attributes. In the embodiment of the present invention, the input numerical structure may be pre-set as an operation parameter, and there may be multiple input numerical structures corresponding to different interface services and information conversion requirements. Since the input information includes attributes of multiple data, different attributes need to be processed differently in the interface information conversion, and the input numerical structure may be used to identify the data attributes contained in the input information.
[0032] According to the input numerical structure of the input information, the corresponding positions of the attributes in the input information are converted into sequences, and the attributes at different levels are converted into the same position identification method, that is, a unified position identification sequence is formed.
[0033] Step 130, based on the position identifier of each attribute, determine the content in the attribute conversion list that exceeds the position identifier sequence, and insert the content into the end of the position identifier sequence to achieve expansion of the position identifier sequence.
[0034] Specifically, the attribute conversion list is a set of data attributes to be obtained after conversion. Interface information conversion is performed for different input information, and the data content to be obtained may be different. Here, the attribute conversion list can also be pre-set as an operating parameter and corresponds to the input value structure.
[0035] It should be noted that the attribute conversion list may include the position identifiers of some or all attributes in the input information, or may include the position identifiers of some or all attributes in the input information, and the position identifiers of newly added attributes not included in the input information.
[0036] The position identifiers of the newly added attributes not included in the input information are the contents beyond the position identifier sequence in the attribute conversion list.
[0037] When the attribute conversion list includes the location identifiers of newly added attributes not included in the input information, the location identifiers of these newly added attributes are inserted into the tail of the location identifier sequence obtained in step 120, so that the content of the location identifier sequence obtained by one-dimensionalization in step 120 is increased, thereby realizing the expansion of the location identifier sequence.
[0038] Step 140, based on the expanded position identification sequence and the conversion processing settings, data conversion is performed to obtain a position identification sequence after attribute conversion.
[0039] Here, the conversion processing settings are preset and correspond to the input value structure, that is, before the information is converted, the corresponding relationship between the input value structure, the attribute conversion list and the conversion processing settings has been preset.
[0040] The conversion processing settings here may include conversion settings for each attribute in the expanded position identifier sequence, which may be absolute conversion, numerical conversion, and multiple numerical conversion, etc. Absolute conversion means that no matter what value is input, the default value is used; numerical conversion is determined by the input information once to determine the content to be converted; multiple numerical conversion includes the content converted after the input information or the information after the input once or other multiple numerical conversions are fused and calculated.
[0041] According to the expanded position identification sequence and the corresponding conversion processing settings, a position identification sequence after attribute conversion is obtained.
[0042] Step 150, according to the attribute conversion list, remove the position identifiers in the position identifier sequence after attribute conversion that do not belong to the attribute conversion list, implement the etching of the position identifier sequence after attribute conversion, and rearrange the format according to the input value structure to form the target information.
[0043] Here, the target information can be data information required to implement the interface function, or data information required by the signal system for subsequent logic analysis, data statistics or content retrieval. Considering that the attribute conversion list may be different from the input numerical structure, some data in the input numerical structure is used as an intermediate quantity during the conversion process and is not the final required data. Therefore, according to the attribute conversion list, the position identifiers that do not belong to the attribute conversion list in the position identifier sequence after the attribute conversion are removed to realize the etching of the position identifier sequence after the attribute conversion, and the format is rearranged according to the input numerical structure to form the target information.
[0044] The signal system interface information conversion method provided by the embodiment of the present invention performs comprehensive and centralized interface conversion processing on input information from different sources and with different structures according to the correspondence between the preset input numerical structure, the attribute conversion list and the conversion processing settings. The specific information conversion process does not need to distinguish the source or function of the input information. It only needs to determine the input numerical structure of the input information to achieve interface conversion in a unified process, thereby fundamentally reducing the probability of interface errors and reducing testing costs while ensuring test results.
[0045] Based on the above embodiments, Figure 2 is a flow chart of step 120 in the signal system interface information conversion method provided by the present invention, such as Figure 2 As shown, step 120 includes:
[0046] Step 121, according to the input value structure of the input information, obtain each attribute in the input value structure;
[0047] Step 122, for each attribute, a one-dimensional sequence is formed to ensure that each attribute has a unique position identification table;
[0048] Step 123: Based on the unique location identifier of each attribute, a unified location identifier sequence is formed.
[0049] Specifically, considering that the input numerical structure may contain multiple attributes, there are also many attributes that need to be converted. When performing data conversion, it is necessary to ensure that the position identifier of each attribute remains consistent, and different position identifiers correspond to different attributes to avoid multiple occurrences of a certain attribute that cannot be identified. Therefore, according to the input numerical structure of the input information, each attribute in the input numerical structure is obtained, and a one-dimensional sequence is formed for each attribute to ensure that each attribute has a unique position identifier table. Then, according to the unique position identifier of each attribute, a unified position identifier sequence is formed, that is, according to the position identifier sequence, any attribute of the corresponding input information can be described.
[0050] In one embodiment, the following table shows the data attributes that the region control input information may include:
[0051]
[0052]
[0053] If the input value structure is public information + train information frame within the area, the input value structure is converted into a position identification sequence. All position identification sequences are as follows:
[0054] First position: Region controller ID
[0055] First position: station code
[0056] First position: station name
[0057] First position: Is one system the main control?
[0058] First position: Is the second system the main control?
[0059] First position: timestamp
[0060] First position: Train information frame in the area, second position: 1, third position: Train ID
[0061] The first position: the train information frame in the area, the second position, 1, the third position, the train running direction
[0062] First position: train information frame in the area, second position, 1, third position, train position
[0063] First position: Train information frame in the area, second position: 2, third position: Train ID
[0064] The first position: the train information frame in the area, the second position: 2, the third position: the train running direction
[0065] First position: train information frame in the area, second position, 2, third position, train position
[0066] The number of trains cannot be determined before receiving the data. If there are two trains in the train information frame, the position relationship of the second train ID attribute is: first position: train information frame in the area, second position, 2, third position, train ID.
[0067] If the input value structure is public information + alarm frame, and there are 2 alarms in the attribute conversion list in the alarm frame, the alarm type and alarm subtype need to be merged into an alarm flag. At this time, the expanded position identification sequence is as follows:
[0068] First position: Region controller ID
[0069] First position: station code
[0070] First position: station name
[0071] First position: Is one system the main control?
[0072] First position: Is the second system the main control?
[0073] First position: timestamp
[0074] First position: alarm frame, second position: 1, third position: alarm type
[0075] First position: alarm frame, second position: 1, third position: alarm subtype
[0076] First position: alarm frame, second position: 1, third position: alarm flag combining alarm type and alarm subtype
[0077] First position: alarm frame, second position: 1, third position: alarm description
[0078] First position: alarm frame, second position: 2, third position: alarm type
[0079] First position: alarm frame, second position: 2, third position: alarm subtype
[0080] First position: alarm frame, second position: 2, third position: alarm flag combining alarm type and alarm subtype
[0081] First position: alarm frame, second position: 2, third position: alarm description
[0082] In another embodiment, the following table shows the data attributes that the train input information may include:
[0083]
[0084] The following table shows the data attributes that the interlock input information may contain:
[0085]
[0086] The above information conversion method can be used to convert different data attributes contained in different input information.
[0087] The method provided by the embodiment of the present invention converts the corresponding positions of attributes in the information into a sequence according to the input numerical structure, converts attributes of different levels into the same position identification method, and obtains the position identification of each attribute in the input numerical structure, thereby ensuring that each attribute has a unique position identification. At the same time, any attribute of the corresponding input information can be described according to the position identification sequence, thereby avoiding a certain attribute from appearing multiple times and being unable to be identified, thereby improving the accuracy of attribute conversion.
[0088] Based on the above embodiment, the attribute conversion list corresponds to the input numerical structure; the attribute conversion list includes the position identifiers of some or all attributes in the input information; or, the attribute conversion list includes the position identifiers of some or all attributes in the input information, as well as the position identifiers of newly added attributes not included in the input information; the position identifiers of newly added attributes not included in the input information are the contents in the attribute conversion list that exceed the position identifier sequence.
[0089] Specifically, the attribute conversion list may correspond to the input numerical structure, the position identifier of each attribute in the input information, and the corresponding attribute conversion list includes the original position identifier, or adds a new position identifier based on the original part of the attribute, or reduces the original position identifier;
[0090] If the content of the attribute conversion list exceeds the position identifier sequence of the input information, that is, a new position identifier based on the original part of the attributes is added, it is inserted at the end of the position identifier sequence to expand the original position identifier sequence. Note that the original position identifier is not reduced at this time.
[0091] Based on any of the above embodiments, Figure 3 is a flow chart of step 140 in the signal system interface information conversion method provided by the present invention, such as Figure 3 As shown, step 140 includes:
[0092] Step 141, determining a conversion setting for each attribute based on the position identifier of each attribute in the expanded position identifier sequence and the conversion setting of each position identifier in the conversion processing setting;
[0093] Step 142, based on the conversion setting of the attribute, convert the input data of the attribute to obtain the conversion result of the attribute;
[0094] The input data of the attribute includes conversion results of other attributes and / or the input data of the attribute in the input information.
[0095] Specifically, the conversion setting of each position identifier in the conversion processing setting can be pre-set according to the data to be obtained, and can be a conversion of the input information value. For example, in a communication frame, the communication status is identified by hexadecimal 0x55, 0xff, which needs to be converted into decimal states 0, 1; it can also be a merger of input information. For example, in an alarm frame, the alarm type and alarm subtype need to be merged into an alarm flag; it can also be a reduction of input information. For example, in a device status frame, two types of processing are required, one of which only requires the board ID and whether the board is normal, and no other information is required.
[0096] Considering that each location identifier may contain multiple attributes, and any attribute may correspond to multiple location identifiers. According to the location identifiers of each attribute in the expanded location identifier sequence and the conversion settings of each location identifier, the conversion settings of the attribute under the location identifier can be determined. Then, according to the conversion settings of the attribute under the location identifier, the input data of the attribute is converted to obtain the conversion result of the attribute.
[0097] It should be noted that the input data of the attribute can be the input data of the attribute in the input information; it can also be the conversion result of other attributes. For example, assuming the attribute A4, the position (C3, B4, A4), the corresponding input value is the converted value of (C1, B1, A2); it can also be the conversion result of other attributes and the input data of the attribute.
[0098] Based on any of the above embodiments, the conversion settings include at least one of remaining unchanged, specifying a decimal point position based on an input value, corresponding a value to an input text, corresponding text to an input value, performing operations based on an input value, and calculating a timestamp.
[0099] The conversion settings are pre-set and can be set according to the functions that the interface needs to implement and the required data content. Among them, remain unchanged means that the conversion result is the same as the input data, and the input data remains unchanged; specify the decimal point position based on the input value, for example, dividing the input value by 10 means that the decimal point position is one, dividing by 100 means that the decimal point position is two, and so on; based on the corresponding value of the input text, it means that the text content is converted into the corresponding value; based on the corresponding text of the input value, it means that the text content is converted into the corresponding text; based on the corresponding text of the input value, it means that the text content is converted into the corresponding text; based on the input value, it is calculated, for example, assuming the attribute A4, the position (C2, B3, A4), the conversion setting is the converted value of (C1, B1, A2) plus the converted value of (C1, B2, A3).
[0100] Based on any of the above embodiments, Figure 4 is a flow chart of step 150 in the signal system interface information conversion method provided by the present invention, such as Figure 4 As shown, step 150 includes:
[0101] Step 151, determining the part of the position identifiers to be removed that do not belong to the attribute conversion list in the position identifier sequence after the attribute conversion;
[0102] Step 152, removing the portion to be removed in the position identification sequence after the attribute conversion, and implementing the etching of the position identification sequence after the attribute conversion;
[0103] Step 153, rearrange the format of the etched position identification sequence according to the input numerical structure, that is, reformat the original attributes of the similar structure. At this time, the attributes and the input attributes have completed the transformation process to form the target information.
[0104] Taking into account that not every attribute location identifier in the conversion result is the location information required by the system, usually the location identifier of each attribute in the attribute conversion list is the location information required by the system. Therefore, we first determine the location identifiers that do not belong to the attribute conversion list, and remove these location identifiers to realize the etching of the location identifier sequence after the attribute conversion.
[0105] Here, the original similar structure is a structure similar to the input numerical structure. According to the input numerical structure, the etched position identification sequence is rearranged to form an attribute of a structure similar to the input numerical structure. At this point, the attribute and the input attribute complete the information conversion to form the target information that the signal system needs to obtain.
[0106] In order to better explain the signal system interface information conversion method provided by the present invention, in another embodiment, the specific operation mode of the method is as follows:
[0107] 1) Assume that the input information D1, D1 corresponds to the input numerical structure C1: B1, B2, C2: B3;
[0108] 2) Assume that the numerical structure of B1 is: A1, A2;
[0109] 3) Assume that the numerical structure of B2 is: A2, A3;
[0110] 4) Assume that B3 has the following numerical structure: A4;
[0111] 5) The position identifier sequence D2 is converted into the input numerical structure: (C1, B1, A1), (C1, B1, A2), (C1, B2, A2), (C1, B2, A3), (C2, B3, A4);
[0112] 6) Assume the attribute conversion list: C1: B1, B2, C3: B4;
[0113] 7) Assume that the numerical structure of B4 in the attribute conversion list: A4, A5, and the numerical structures of other B1, B2 are consistent with the input numerical structure;
[0114] 8) The corresponding numerical structure of the expanded position identifier sequence D2 is: (C1, B1, A1), (C1, B1, A2), (C1, B2, A2), (C1, B2, A3), (C2, B3, A4), (C3, B4, A4), (C3, B4, A5);
[0115] 9) Assume that after the attribute conversion, the name increases by ' and the position remains unchanged;
[0116] 10) Assume attribute A1, position identifier (C1, B1, A1), corresponding input value "0x55", "0xff";
[0117] 11) Assume that attribute A1, location identifier (C1, B1, A1), and conversion settings remain unchanged;
[0118] 12) Assuming attribute A1, when receiving "0x55", it is converted to "0x55" to get A1';
[0119] 13) Assume attribute A2, position label (C1, B1, A2), corresponding input values "11", "23", "24", "25", "26";
[0120] 14) Assume attribute A2, position identifier (C1, B1, A2), conversion settings are "11":"10026","23":"10126","24":"10226","25":"10326","26":"10426";
[0121] 15) Assume that attribute A2, when receiving "23", it is converted to "10126", and when receiving a value out of range, it is converted to a null value, resulting in A2';
[0122] 16) Assume attribute A2, position label (C1, B2, A2), corresponding input values "11", "23", "24", "25", "26";
[0123] 17) Assume attribute A2, position identifier (C1, B2, A2), conversion settings are "11":"10026","23":"10126","24":"10226","25":"10326","26":"10426333";
[0124] 18) Assume that attribute A2, when receiving "26", is converted to "10426333", and when receiving a value out of range, is converted to a null value, resulting in A2';
[0125] 19) Assume attribute A3, position identifier (C1, B2, A3), the corresponding input value needs to specify a decimal point;
[0126] 20) Assume that the attribute A3, the position label (C1, B2, A3), and the conversion setting are "DIVISION":"100","65535":"Invalid value", which means that the input value is divided by 100. If the input value is 65535, it is an invalid value;
[0127] 21) Assuming attribute A3, when receiving "3770", it is converted to "37.70" and obtained A3';
[0128] 22) Assume that attribute A4, position label (C2, B3, A4), the corresponding input value is the value after conversion of (C1, B1, A2) and (C1, B2, A3);
[0129] 23) Assume attribute A4, position identifier (C2, B3, A4), the conversion setting is the value after conversion of (C1, B1, A2) plus the value after conversion of (C1, B2, A3);
[0130] 24) Assume attribute A4, when (C1, B1, A2) receives "24", it is converted to "10226", when (C1, B2, A3) receives "4300", it is converted to "43.00", A3 is converted to "10269.00", and we get A4';
[0131] 25) Assume that attribute A4, position label (C3, B4, A4), the corresponding input value is the converted value of (C1, B1, A2);
[0132] 26) Assume attribute A4, position identifier (C3, B4, A4), and conversion setting is unchanged;
[0133] 27) Assuming attribute A4, when (C1, B1, A2) receives "24", it is converted to "10226" and A4' is obtained;
[0134] 28) Assume attribute A5, location label (C3, B4, A5), no input;
[0135] 29) Assume that attribute A5, location identifier (C3, B4, A5), and conversion setting is to calculate timestamp;
[0136] 30) Assuming attribute A5, when the output needs to be converted, the timestamp is calculated to obtain A5'.
[0137] 31) After conversion, the corresponding position identification sequence of D3 is: (C1, B1, A1'), (C1, B1, A2'), (C1, B2, A2'), (C1, B2, A3'), (C2, B3, A4'), (C3, B4, A4'), (C3, B4, A5');
[0138] 32) According to the attribute conversion list: C1: B1, B2, C3: B4, the corresponding numerical structure of D3 after etching is: C1: B1, B2, C3: B4; and the format is rearranged according to the input numerical structure to form the target information: (C1, B1, A1'), (C1, B1, A2'), (C1, B2, A2'), (C1, B2, A3'), (C3, B4, A4'), (C3, B4, A5').
[0139] The signal system interface information conversion method provided by the embodiment of the present invention performs comprehensive and centralized interface conversion processing on input information of different sources and structures. The specific information conversion process does not need to distinguish the source or function of the input information. It only needs to determine the input numerical structure of the input information to achieve interface conversion of a unified process, thereby fundamentally reducing the probability of interface errors, reducing testing costs while ensuring test results.
[0140] The signal system interface information conversion device provided by the present invention is described below. The signal system interface information conversion device described below and the signal system interface information conversion method described above can be referenced to each other.
[0141] Figure 5 is a schematic diagram of the structure of the signal system interface information conversion device provided by the present invention, such as Figure 5 As shown, the device includes: an input information receiving unit 510, which is used to receive input information sent by an external system; a one-dimensionalization unit 520, which is used to one-dimensionalize the input information according to the input numerical structure, so that all attributes of the input information form a unified position identifier sequence, and the position identifier sequence includes the position identifier of each attribute in the input information; an expansion unit 530, which is used to determine the content in the attribute conversion list that exceeds the position identifier sequence based on the position identifier of each attribute, and insert the content into the end of the position identifier sequence to achieve expansion of the position identifier sequence; a data conversion unit 540, which is used to perform data conversion based on the expanded position identifier sequence and the conversion processing settings to obtain the position identifier sequence after the attribute conversion; an etching unit 550, which is used to remove the position identifiers that do not belong to the attribute conversion list in the position identifier sequence after the attribute conversion according to the attribute conversion list, to achieve etching of the position identifier sequence after the attribute conversion, and rearrange the format according to the input numerical structure to form the target information.
[0142] The signal system interface information conversion device provided in the embodiment of the present invention performs comprehensive and centralized interface conversion processing on input information from different sources and with different structures according to the correspondence between the preset input numerical structure, the attribute conversion list and the conversion processing settings. The specific information conversion process does not need to distinguish the source or function of the input information. It only needs to determine the input numerical structure of the input information to achieve interface conversion in a unified process, thereby fundamentally reducing the probability of interface errors and reducing testing costs while ensuring test results.
[0143] Based on any of the above embodiments, the one-dimensionalization unit 520 is used to: obtain each attribute in the input numerical structure according to the input numerical structure of the input information; form a one-dimensional sequence for each attribute to ensure that each attribute has a unique position identifier; and form a unified position identifier sequence based on the unique position identifier of each attribute.
[0144] Based on any of the above embodiments, the data conversion unit 540 is used to: determine the conversion settings of each attribute based on the position identifier of each attribute in the expanded position identifier sequence and the conversion settings of each position identifier in the conversion processing settings; based on the conversion settings of any of the attributes, convert the input data of any of the attributes to obtain the conversion result of any of the attributes; the input data of any of the attributes includes the conversion results of other attributes and / or the input data of any of the attributes in the input information.
[0145] Based on any of the above embodiments, the etching unit 550 is used to: determine the part of the position identifiers to be removed that do not belong to the attribute conversion list in the position identifier sequence after the attribute conversion; remove the part to be removed in the position identifier sequence after the attribute conversion to implement the etching of the position identifier sequence after the attribute conversion; rearrange the format of the etched position identifier sequence according to the input numerical structure, that is, reformat the original attributes with similar structures. At this time, the attributes and the input attributes have completed the transformation processing to form the target information.
[0146] Figure 6 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 6As shown, the electronic device may include: a processor (processor) 610, a communication interface (Communications Interface) 620, a memory (memory) 630 and a communication bus 640, wherein the processor 610, the communication interface 620, and the memory 630 communicate with each other through the communication bus 640. The processor 610 can call the logic instructions in the memory 630 to execute the signal system interface information conversion method, which includes: receiving input information sent by an external system; according to the input numerical structure, one-dimensionalizing the input information so that all attributes of the input information form a unified position identifier sequence, and the position identifier sequence includes the position identifier of each attribute in the input information; based on the position identifier of each attribute, determining the content in the attribute conversion list that exceeds the position identifier sequence, and inserting the content into the end of the position identifier sequence to achieve expansion of the position identifier sequence; based on the expanded position identifier sequence and the conversion processing settings, performing data conversion to obtain a position identifier sequence after attribute conversion; according to the attribute conversion list, removing the position identifiers in the position identifier sequence after attribute conversion that do not belong to the attribute conversion list to achieve etching of the position identifier sequence after attribute conversion, and rearranging the format according to the input numerical structure to form the target information.
[0147] In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0148] On the other hand, the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, the computer program including program instructions, and when the program instructions are executed by a computer, the computer can execute the signal system interface information conversion method provided by the above methods, the method including: receiving input information sent by an external system; according to the input numerical structure, one-dimensionalizing the input information so that all attributes of the input information form a unified position identifier sequence, and the position identifier sequence includes the position identifier of each attribute in the input information; based on the position identifier of each attribute, determining the content in the attribute conversion list that exceeds the position identifier sequence, and inserting the content into the end of the position identifier sequence to achieve expansion of the position identifier sequence; based on the expanded position identifier sequence and the conversion processing settings, performing data conversion to obtain a position identifier sequence after attribute conversion; according to the attribute conversion list, removing the position identifiers in the position identifier sequence after attribute conversion that do not belong to the attribute conversion list to achieve etching of the position identifier sequence after attribute conversion, and rearranging the format according to the input numerical structure to form the target information.
[0149] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the above-mentioned signal system interface information conversion method, the method comprising: receiving input information sent by an external system; according to the input numerical structure, one-dimensionalizing the input information so that all attributes of the input information form a unified position identifier sequence, the position identifier sequence including the position identifier of each attribute in the input information; based on the position identifier of each attribute, determining the content in the attribute conversion list that exceeds the position identifier sequence, and inserting the content into the end of the position identifier sequence to achieve expansion of the position identifier sequence; based on the expanded position identifier sequence and the conversion processing settings, performing data conversion to obtain a position identifier sequence after attribute conversion; according to the attribute conversion list, removing the position identifiers in the position identifier sequence after attribute conversion that do not belong to the attribute conversion list to achieve etching of the position identifier sequence after attribute conversion, and rearranging the format according to the input numerical structure to form the target information.
[0150] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, i.e., they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.
[0151] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or some parts of the embodiment.
[0152] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A signal system interface information conversion method, characterized in that: include: Receive input information sent by external systems; According to the input numerical structure, the input information is one-dimensionalized so that all attributes of the input information form a unified position identifier sequence, and the position identifier sequence includes a position identifier of each attribute in the input information; Based on the position identifier of each attribute, determine the content in the attribute conversion list that exceeds the position identifier sequence, and insert the content into the tail of the position identifier sequence to expand the position identifier sequence, and in the above expansion process, do not reduce the original position identifier; Based on the expanded position identification sequence and the conversion processing setting, data conversion is performed to obtain the position identification sequence after attribute conversion; According to the attribute conversion list, the position identifiers in the position identifier sequence after the attribute conversion that do not belong to the attribute conversion list are removed to implement the etching of the position identifier sequence after the attribute conversion, and the format is rearranged according to the input numerical structure to form the target information.
2. The signal system interface information conversion method according to claim 1, characterized in that: The one-dimensionalization of the input information according to the input numerical structure so that all attributes of the input information form a unified position identification sequence includes: According to the input value structure of the input information, each attribute in the input data structure is obtained; For each of the attributes, a one-dimensional sequence is formed to ensure that each of the attributes has a unique position identifier; Based on the unique location identifier of each attribute, a unified location identifier sequence is formed.
3. The signal system interface information conversion method according to claim 1, characterized in that: The attribute conversion list corresponds to the input value structure; the attribute conversion list includes position identifiers of some or all attributes in the input information; Alternatively, the attribute conversion list includes position identifiers of some or all attributes in the input information, and position identifiers of newly added attributes not included in the input information; The position identifiers of the newly added attributes not included in the input information are the contents in the attribute conversion list that exceed the position identifier sequence.
4. The signal system interface information conversion method according to claim 1, characterized in that: The data conversion is performed based on the expanded position identification sequence and the conversion processing setting to obtain the position identification sequence after attribute conversion, including: Determining a conversion setting for each attribute based on the position identifier of each attribute in the expanded position identifier sequence and the conversion setting for each position identifier in the conversion processing setting; Based on the conversion setting of any attribute, convert the input data of any attribute to obtain the conversion result of any attribute; The input data of any attribute includes conversion results of other attributes and / or the input data of any attribute in the input information.
5. The signal system interface information conversion method according to claim 4, characterized in that: The conversion settings include at least one of remaining unchanged, specifying a decimal point position based on an input value, corresponding a value based on input text, corresponding text based on an input value, performing operations based on an input value, and calculating a timestamp.
6. The signal system interface information conversion method according to claim 1, characterized in that: The method of removing the position identifiers that do not belong to the attribute conversion list in the position identifier sequence after the attribute conversion according to the attribute conversion list, implementing the etching of the position identifier sequence after the attribute conversion, and rearranging the format according to the input numerical structure to form the target information includes: Determine a portion of the position identifiers to be removed that do not belong to the attribute conversion list in the position identifier sequence after the attribute conversion; Removing the portion to be removed from the position identification sequence after the attribute conversion, so as to implement etching of the position identification sequence after the attribute conversion; The position identification sequence after etching is rearranged in format according to the input numerical structure, that is, the attributes of the original similar structure are reformed. At this time, the attributes and the input attributes have completed the transformation process to form the target information.
7. A signal system interface information conversion device, characterized in that: include: An input information receiving unit, used for receiving input information sent by an external system; A one-dimensionalization unit, used to perform one-dimensionalization on the input information according to the input numerical structure, so that all attributes of the input information form a unified position identifier sequence, and the position identifier sequence includes a position identifier of each attribute in the input information; An expansion unit, used for determining the content in the attribute conversion list that exceeds the position identifier sequence based on the position identifier of each attribute, and inserting the content into the tail of the position identifier sequence to expand the position identifier sequence, and in the above expansion process, the original position identifier is not reduced; A data conversion unit, used for performing data conversion based on the expanded position identification sequence and the conversion processing setting to obtain the position identification sequence after attribute conversion; The etching unit is used to remove the position identifiers in the position identifier sequence after the attribute conversion that do not belong to the attribute conversion list according to the attribute conversion list, realize the etching of the position identifier sequence after the attribute conversion, and rearrange the format according to the input numerical structure to form the target information.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the signal system interface information conversion method according to any one of claims 1 to 6 are implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the signal system interface information conversion method as claimed in any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the signal system interface information conversion method as claimed in any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Test result data storage method and device, terminal equipment and storage medium
CN110874324A
KR20210090558A