Data format conversion method and device, equipment, medium and product
By extracting features from the initial cabling link table, constructing regular expression matching, and using a dispatcher to distribute the matching results to the standard table, the technical problem of large differences in cabling link table formats in the prior art, making it difficult to form digital assets, is solved, thereby improving the efficiency and accuracy of data processing.
Patent Information
- Application Number
- CN202511175244.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-21
- Publication Date
- 2025-12-05
AI Technical Summary
In existing technologies, the large differences in the formats of manually collected cabling link tables, which do not support automatic acquisition, make it difficult to form digital assets.
By extracting features from the initial wiring link table, constructing a regular expression for matching, and using a dispatcher to distribute the matching results to a standard table, the format conversion of the initial wiring link table is achieved.
It realizes the format conversion of the initial cabling link table, solves the technical problem that the large differences in the format of manually collected cabling link tables make it difficult to form digital assets, and improves the efficiency and accuracy of data processing.
Smart Images

Figure CN121071013A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of data processing, and particularly relates to a data format conversion method and device, equipment, medium and product. BACKGROUND
[0002] Due to long construction time, uneven construction technology, and lack of effective wiring comprehensive management tools, large data centers have diversified wiring link tables. Since some old machine rooms do not support physical means collection, only manual recording of Excel tables and repeated verification in the change process can be performed, the data collection efficiency is low, and the manual recording of Excel tables has large recording mode differences.
[0003] How to perform format conversion on the wiring link table collected manually due to the lack of automatic collection to form digital assets and help large data center digital construction is a technical problem to be solved in the current wiring field. SUMMARY
[0004] Embodiments of the application provide a data format conversion method, device, equipment, storage medium and computer program product to solve the technical problem of large format differences of manually collected wiring link tables and difficulty in forming digital assets in related technologies.
[0005] In a first aspect, embodiments of the application provide a data format conversion method, which includes:
[0006] obtaining an initial wiring link table, the initial wiring link table including wiring link information, the wiring link information including a plurality of fields;
[0007] extracting target features of the plurality of fields in the wiring link information, and constructing a regular matching expression according to the target features;
[0008] performing regular matching on the initial wiring link table according to the regular matching expression;
[0009] using a distributor to distribute the matching result of the regular matching to a standard table according to a distribution rule to obtain a target wiring link table, so as to realize format conversion of the initial wiring link table; wherein the distribution rule is set according to the target features.
[0010] In a second aspect, embodiments of the application provide a data format conversion device, which includes:
[0011] an obtaining module configured to obtain an initial wiring link table, the initial wiring link table including wiring link information, the wiring link information including a plurality of fields;
[0012] an extracting module configured to extract target features of the plurality of fields in the wiring link information, and construct a regular matching expression according to the target features;
[0013] The matching module is configured to perform regular matching on the initial wiring link table according to a regular matching expression.
[0014] The distribution module is configured to distribute the matching result of the regular matching into a standard table according to a distribution rule by using a distributor to obtain a target wiring link table, so as to realize format conversion of the initial wiring link table; wherein the distribution rule is set according to a target feature.
[0015] In a third aspect, an electronic device is provided, and the device comprises:
[0016] a processor and a memory storing programs or instructions;
[0017] The processor executes the programs or instructions to implement the method described above.
[0018] In a fourth aspect, a computer readable storage medium is provided, and the computer readable storage medium stores programs or instructions, which are executed by a processor to implement the method described above.
[0019] In a fifth aspect, a computer program product is provided, and instructions in the computer program product are executed by a processor of an electronic device to cause the electronic device to perform the method described above.
[0020] In the embodiments of the present application, the features of the wiring link information in the initial wiring link table are extracted, then the initial wiring link table is regularly matched according to the regular matching expression constructed according to the features, and finally the matching result of the regular matching is distributed into a standard table by using a distributor to obtain a target wiring link table. By distributing the information of the initial wiring link table into the standard table, format conversion of the initial wiring link information table is realized, and the technical problem that the wiring link table collected manually has large format difference and is difficult to form digital assets is solved. BRIEF DESCRIPTION OF DRAWINGS
[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required to be used in the embodiments of the present application will be briefly introduced below. Those skilled in the art can also obtain other drawings according to these drawings without creative labor.
[0022] Figure 1 is a flowchart of a data format conversion method according to an embodiment of the present application;
[0023] Figure 2 is a flowchart of a data distribution method according to an embodiment of the present application;
[0024] Figure 3is a whole flow schematic diagram of a data format conversion method according to an embodiment of the present application;
[0025] Figure 4 is a structure block diagram of a data format conversion device according to an embodiment of the present application;
[0026] Figure 5 is a structure schematic diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0027] The features and exemplary embodiments of various aspects of the present application will be described below in detail, in order to make the purposes, technical solutions and advantages of the present application more clear, the present application will be further described in detail below in combination with the drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, but not to limit the present application. For those skilled in the art, the present application can be implemented without some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by showing examples of the present application.
[0028] It should be noted that, in this paper, relationship terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between the entities or operations. Moreover, the terms "include", "contain" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or includes elements inherent to such process, method, article or device. Without more limitations, the elements defined by the statement "include" do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0029] In addition, it should be noted that the acquisition, storage, use, processing and the like of data in the embodiments of the present application comply with the relevant provisions of national laws and regulations.
[0030] It should be noted that in the embodiments of the present application, some software, components, models and the like may be mentioned, which should be considered as exemplary, and the purpose is only to illustrate the feasibility of the implementation of the technical solutions of the present application, but it does not mean that the applicant has or will necessarily use the scheme.
[0031] To solve the problem of large format difference of the manually collected wiring link table in the prior art and difficulty in forming digital asset technology, an embodiment of the present application provides a data format conversion method, which can be applied to a device for converting the format of the wiring link table and used for standardizing the wiring link table to form a digital asset. Figure 1 is a flowchart of a data format conversion method according to an embodiment of the present application, as shown in Figure 1 The data format conversion method can include the following steps:
[0032] S110, obtaining an initial wiring link table.
[0033] In S110, the wiring link table includes wiring link information, and the wiring link information includes a plurality of fields, which can be link number, link port, interface type, cable type, fiber type, link type and line sequence standard of the wiring link, respectively. These fields can be presented in the form of columns in the wiring link table.
[0034] For example, the initial wiring link table can be as shown in Table 1 below, wherein the local end and the opposite end belong to the link port, the local interface and the opposite interface belong to the interface type, and the line sequence standard is divided into A type or B type.
[0035] Table 1
[0036]
[0037]
[0038] For example, the initial wiring link table can also be as shown in Table 2 below: Table 2 records that the 201 machine room AA07 cabinet and the 205 machine room AI01 cabinet are interconnected by A, B, C and D 4 optical cables, each of which contains two wiring links. For example, A optical cable includes 01 and 02 wiring links.
[0039] Table 2
[0040]
[0041] S120, extracting target features of a plurality of fields in the wiring link information, and constructing a regular matching expression according to the target features.
[0042] In S120, the target features can include pictographic features and length features, wherein the pictographic features are mainly used to represent the character form of the wiring link information in the case of wiring link information visualization (for example, in the form of text, chart or graph). Such character form can include specific symbols, marks or arrangement, which can reflect the specific attributes or structure of the wiring link.
[0043] In extracting the pictographic features of the cabling link information, first, each component in the cabling link information can be identified and parsed, including link number, link port, interface type, cable type, fiber type, link type, and wire sequence standard, and other key information. For these information, image processing, text analysis, or machine learning technology can be used to extract the pictographic features.
[0044] In extracting the length features of the cabling link information, the length of each piece of cabling link information can be calculated, where the length can refer to the total number of characters in the information, or the length of a specific part (such as link number, port number, etc.). Further, the distribution of these lengths can be counted to find common length values or length ranges, and possible outliers. Based on the length features extracted by statistics, some patterns or rules can be determined, for example, link numbers are usually fixed-length numeric strings, port numbers may contain specific character and number combinations, etc.
[0045] In this way, by extracting the pictographic features and length features of the cabling link information, and constructing regular matching expressions based on these features, the initial cabling link table format can be accurately converted based on the regular matching expressions.
[0046] S130, regular matching of the initial cabling link table according to the regular matching expression.
[0047] In S130, the regular matching expression is a tool for matching specific patterns in a string, which can include characters, character classes, quantifiers, groups, etc. Therefore, the initial cabling link table can be first serialized into a string format, and then the regular matching expression is used to perform regular matching on the initial cabling link table serialized into a string format.
[0048] For example, in the case where the cabling link information includes link port information, if the link port information always has U-bit information, i.e., contains the letter U, the regular matching expression constructed according to the pictographic features can be ^[^U]{9,}U[^U]*|^[^U]*U[^U]{9,}.
[0049] This regular expression includes two patterns:
[0050] ^[^U]{9,}U[^U]*: This pattern matches a string starting from the beginning of the string, containing at least 9 non-U characters followed by a U, and then followed by any number (including zero) of non-U characters.
[0051] ^[^U]*U[^U]{9,}: This pattern (separated from the first pattern by |) matches a string starting from the beginning of the string, containing any number (including zero) of non-U characters followed by a U, and then followed by at least 9 non-U characters.
[0052] Note that because of the | operator, a string is considered to match this regular expression as soon as either of the two conditions above is met.
[0053] Thus, the entire regular expression matches strings that either start with at least 9 non-U characters, followed by a U, followed by any number of non-U characters, or that start with any number of non-U characters (including zero), followed by a U, followed by at least 9 non-U characters.
[0054] The caret ^ symbol indicates the start of the string. The pattern [^U] matches any single character that is not a U. Square brackets [] are used to define a set of characters, and the caret ^ as the first character of the set indicates a negation, i.e. match a character that is not in the set. The {9,} is a quantifier that indicates that the preceding pattern (in this case, [^U]) must occur at least 9 times in a row. The pattern U matches the character U itself. The pattern [^U]* matches any character that is not a U zero or more times. The asterisk * indicates that the preceding pattern (in this case, [^U]) can occur any number of times, including zero. The | symbol is used in regular expressions as a logical OR operator, and it separates two possible matching patterns. If the pattern on the left does not match, then the pattern on the right is tried.
[0055] In this way, by applying the regular matching expression containing characters, character classes, quantifiers, groups, etc. to the initial cabling link table, accurate identification and extraction of cabling link information is achieved.
[0056] S140, using a distributor to distribute the matching result of the regular matching to a standard table according to a distribution rule to obtain a target cabling link table, so as to realize format conversion of the initial cabling link table; wherein the distribution rule is set according to a target feature.
[0057] In S140, the management end can set different distribution rules for the distributor according to the pictographic feature and the length feature.
[0058] For example, the cabling link information contains link port information, and the port information has specific pictographic features (such as specific symbols or marks) and length features (such as the length of the port number). The management end can set the distribution rule according to these features.
[0059] Specifically, the link port information is: F: C****-E01-40U-**-**, T: C****-C01-38U-**-**, the pictographic feature of the link port information is "F:", representing the fiber port, "T:", representing the terminal device port; the length feature of the link port information is "not more than 30 characters in length".
[0060] In this way, the distribution rule set by the pictographic feature and the length feature of the management end can be "link port information starting with F: and not more than 30 characters in length is distributed to the fiber port information column, and link port information starting with T: and not more than 30 characters in length is distributed to the terminal device port information column."
[0061] For example, the management end can set the distribution rule based on the length of the port number, such as stipulating that when the length of the port number is a certain value, it is distributed to a certain standard table field.
[0062] The standard table format can be as shown in Table 3: by distributing the matching results of the regular matching to the standard table, the format conversion of the initial wiring link table can be realized.
[0063] It can be understood that if additional custom data processing is required, such as modifying the format of a certain information point, adding a new information point, or performing a specific calculation on a certain information point, it can be performed in the distributor. For example, suppose there is an information point that represents the length of the cable, and the format is "XX meters", but in the new uniform format table, the format of this information point needs to be modified to "XXm", then a custom data processing step can be added in the distributor to convert the format of this information point. For example, if a new information point is needed in the uniform format table to represent the color of the cable, but this information does not exist in the original wiring link table, then a custom data processing step can also be added in the distributor to infer the color of the cable according to other information points (such as cable type) and add it to this new information point. After completing these custom data processing, the distributor will distribute the processed information points to the uniform format table.
[0064] Table 3
[0065]
[0066]
[0067] In the embodiments of the present application, the features of the wiring link information in the initial wiring link table are extracted, then the initial wiring link table is regularly matched according to the regular matching expression constructed according to the features, and finally the matching results of the regular matching are distributed to the standard table by using the distributor to obtain the target wiring link table. By distributing the information of the initial wiring link table to the standard table, the format conversion of the initial wiring link information table is realized, and the technical problem that the wiring link table collected manually has large format difference and is difficult to form digital assets is solved.
[0068] In some embodiments, the target features of the plurality of fields in the wiring link information are extracted, and a regular matching expression is constructed according to the target features, including:
[0069] The pictographic features of the plurality of fields in the wiring link information are extracted;
[0070] The regular matching expression is constructed according to the pictographic features.
[0071] For example, in the wiring link information, the link port information can be represented by specific symbols or marks, such as “F:” representing a fiber port, “T:” representing a terminal device port, etc. These symbols or marks can be regarded as part of the pictographic features. In addition, the arrangement, font size, color, etc. of the wiring link information can also constitute the pictographic features.
[0072] After the pictographic features of the wiring link information are extracted, a regular matching expression can be constructed according to these features. When constructing the regular matching expression, we need to define the corresponding matching rules and patterns according to the pictographic features of the wiring link information.
[0073] For example, in the case where the wiring link information includes link port information, if the link port information always starts with “F:” or “T:” and is followed by a string of numbers or letters, a regular matching expression can be constructed to match the link port information in this format.
[0074] In this way, by extracting the pictographic features of the wiring link information and constructing a regular matching expression according to these features, wiring link information conforming to a specific pattern can be extracted. These information can then be distributed to the standard table to form the target wiring link table, which can effectively convert the wiring link information and improve the efficiency and accuracy of data processing.
[0075] In some embodiments, the target features of the plurality of fields in the wiring link information are extracted, and a regular matching expression is constructed according to the target features, including:
[0076] The length features of the plurality of fields in the wiring link information are extracted;
[0077] The regular matching expression is constructed according to the length features.
[0078] In this embodiment, to extract the length feature of the cabling link information, the length of each piece of cabling link information can be calculated, where the length can refer to the total number of characters in the information, or the length of a specific part (such as the link number, port number, etc.).
[0079] Further, the distribution of these lengths can be counted to find out the common length values or length ranges, and possible outliers.
[0080] Based on the length features extracted by statistics, some patterns or rules can be determined, for example, the link number is usually a fixed-length number string, the port number can contain a specific combination of characters and numbers, etc. Using the above patterns and rules, a regular matching expression can be constructed.
[0081] It can be understood that after the regular matching expression is constructed, some sample data is used to verify the accuracy and applicability of the constructed regular matching expression, and necessary adjustments and optimizations are made according to the verification results.
[0082] In this way, the length feature of the cabling link information can be used to construct a regular matching expression, so as to realize effective matching and extraction of the cabling link information.
[0083] In some embodiments, the regular matching of the initial cabling link table according to the regular matching expression includes:
[0084] serializing the cabling link table into a string format;
[0085] using the regular matching expression to perform regular matching on the cabling link table in the string format.
[0086] In this embodiment, before performing regular matching on the cabling link table, the information needs to be converted into a string format.
[0087] After the cabling link table is converted into a string format, the constructed regular matching expression can be applied to the cabling link table in the string format for matching. For example, each row (or each piece of cabling link information) of the cabling link table can be taken as an input string, and a regular matching function (such as re.match() or re.search() in Python) can be used to check whether the string conforms to the pattern of the regular expression.
[0088] The result of the regular matching can be a matching object if the matching is successful, or None if the matching fails. The information of interest can be extracted from the matching object and distributed to the standard table to form the target cabling link table.
[0089] In some embodiments, the cabling link table includes a plurality of cabling links, and the cabling link table is serialized into a string format, including:
[0090] For each cabling link in the cabling link table, different types of cabling link information in the cabling link are separated using a preset separator.
[0091] The separated cabling link is serialized into a string.
[0092] In this embodiment, for a cabling link table including a plurality of cabling links, the following steps can be taken to serialize it into a string format:
[0093] First, for each cabling link in the cabling link table, the cabling link information it contains can be separated using a preset separator. The cabling link information can include link number information, cable type information, interface type information, fiber type information, opposite link number information, opposite interface type information, link type information, and wire sequence standard information, etc.
[0094] For example, the cabling link information of a cabling link can be as shown in Table 4:
[0095] Table 4
[0096]
[0097] For example, when the preset separator is “,”, the cabling link information of this cabling link can be separated and serialized into a string as follows:
[0098] “F:C*****-E01-40U-06-01-(**-**), OM4, MPO, 24-core multimode, T:C*****-C01-38U-12-01-(**-**), MPO, HDA2-MDA2, A”
[0099] When the cabling link table includes a plurality of such cabling links, the above separation and serialization operations can be performed on each cabling link to obtain a series of cabling link information represented by comma-separated strings. These strings can be further used in subsequent regular matching, distribution, and other processing procedures to achieve format conversion and standardization of the cabling link table.
[0100] In this way, by separating each cabling link in the cabling link table using a preset separator and serializing it into a string format, the problem of large format differences in the cabling link table can be effectively solved, providing strong support for subsequent digital asset construction.
[0101] In some embodiments, in the case that a field in the cabling link information is link port information, the regular matching result is distributed to the standard table by the distributor to obtain a target cabling link table, so as to realize standardization of the initial cabling link table, including:
[0102] The distribution rule set for the distributor by the management terminal according to the feature, and the distribution rule is used to represent interception of the link port information to obtain local information and opposite end information of the link port information;
[0103] The regular matching result is input into the distributor with the set distribution rule, so that the distributor distributes the regular matching result to the standard table according to the distribution rule to obtain the target cabling link table.
[0104] In the embodiment, Figure 2 is a flowchart of a data distribution method according to an embodiment of the application, as Figure 2 shown, the regular matching result is distributed to the standard table by the distributor, which can include the following steps:
[0105] S201, feature extraction.
[0106] In the case that the cabling link information includes link port information, the link port information can be extracted from the cabling link table according to the feature that the link port information includes local information and opposite end information, and the local information and the opposite end information are always arranged adjacently.
[0107] S202, setting a distribution rule.
[0108] Based on this feature, the management terminal can set a distribution rule to intercept the link port information in the distributor to obtain the local information and the opposite end information of the link port information. It can be understood that the link port information can also be intercepted based on other information in the link port information, such as port number, location identifier or other marks that can distinguish the local end and the opposite end.
[0109] Further, the matching result obtained by the regular matching is input into the distributor with the set distribution rule. The distributor will analyze and distribute the input matching result according to the preset distribution rule. Specifically, it will identify the link port information, and according to the rule, it will be divided into local information and opposite end information, and then these information will be accurately distributed to the corresponding position in the standard table.
[0110] In this way, through the processing of the distributor, a target cabling link table with unified format and standardization can be obtained. The target cabling link table can not only contain all necessary cabling link information, but also the cabling link information has been accurately classified and arranged, which can provide great convenience for subsequent data analysis and utilization.
[0111] In some embodiments, after the matched results of the regular matching are distributed into the standard table according to the distribution rule by using the distributor, a target wiring link table is obtained to realize the format conversion of the initial wiring link table; wherein, after the target feature is set according to the distribution rule, the method further comprises:
[0112] checking the target wiring link table based on a preset checking rule to obtain a checking result;
[0113] in the case that the checking result shows that the target wiring link table has format errors and / or data missing, generating an error report and sending the error report to the management end;
[0114] receiving a correction instruction sent by the management end according to the error report;
[0115] correcting the target wiring link table according to the correction instruction.
[0116] In the present embodiment, the preset checking rule can be format checking on each wiring link of the target wiring link table, and judging whether the data is missing, and the data and logic of the target wiring link table can also be checked.
[0117] For example, the format checking can include checking the overall structure, field order, etc. of the table, and the data consistency checking, connection logic, loop detection, etc. can also be performed on the target wiring link table according to the initial wiring link table.
[0118] According to the preset checking rule, the target wiring link table can be checked to obtain a checking result, and in the case that at least one of the following problems exists in the checking result, i.e. data missing, format disorder, data inconsistency with the initial wiring link table, connection logic disorder, etc., an error report is generated based on the above checking result, and the error report is sent to the management end.
[0119] In the present embodiment, in the case that the management end receives the error report, the management personnel can correct the above problems of the target wiring link table according to the initial wiring link table according to the information recorded in the error report, so as to ensure the accuracy and consistency of the data.
[0120] Figure 3 is a whole flowchart of a data format conversion method according to an embodiment of the present application, as shown in Figure 3 , comprising the following steps:
[0121] S301, wiring link table one and wiring link table two are serialized into string format.
[0122] S302, features are extracted from the wiring link table one and the wiring link table two, and a regular matching expression is constructed according to the features.
[0123] S303, performing regular matching on the string using a regular matching expression.
[0124] S304, inputting the matching result of the regular matching into a distributor.
[0125] S305, distributing the matching result of the regular matching into a standard table using the distributor to obtain a target wiring link table.
[0126] Figure 4 A structural schematic diagram of a data format conversion apparatus provided by another embodiment of the present application is shown, and only parts related to the embodiments of the present application are shown for ease of illustration.
[0127] With reference to Figure 4 The data format conversion apparatus 400 can include:
[0128] An obtaining module 401, configured to obtain an initial wiring link table, the initial wiring link table including wiring link information, the wiring link information including a plurality of fields;
[0129] An extracting module 402, configured to extract target features of the plurality of fields in the wiring link information, and construct a regular matching expression according to the target features;
[0130] A matching module 403, configured to perform regular matching on the initial wiring link table according to the regular matching expression;
[0131] A distributing module 404, configured to distribute the matching result of the regular matching into a standard table according to a distribution rule using a distributor to obtain a target wiring link table, so as to implement format conversion of the initial wiring link table; wherein the distribution rule is set according to the target features.
[0132] In some embodiments, the extracting module 402 can include the following units:
[0133] An extracting unit, configured to extract pictographic features of the plurality of fields in the wiring link information;
[0134] A constructing unit, configured to construct the regular matching expression according to the pictographic features.
[0135] In some embodiments, the extracting module 402 can include the following units:
[0136] The extracting unit is further configured to extract length features of the plurality of fields in the wiring link information;
[0137] The constructing unit is further configured to construct the regular matching expression according to the length features.
[0138] In some embodiments, the matching module 403 can include the following units:
[0139] a converting unit, configured to serialize the wiring link table sequence into a string format;
[0140] a matching unit, configured to perform regular matching on the wiring link table in the string format using a regular matching expression.
[0141] In some embodiments, the converting unit can include the following sub-units:
[0142] a separating sub-unit, configured to separate different kinds of wiring link information in each wiring link of the wiring link table using a preset separator.
[0143] a converting sub-unit, configured to serialize the separated wiring link into a string.
[0144] In some embodiments, the distribution module 404 can include the following units:
[0145] an obtaining unit, configured to obtain a distribution rule set for the distributor by the management end according to the target feature, the distribution rule being used to represent the interception of the link port information to obtain the local information and the opposite end information of the link port information;
[0146] an input unit, configured to input the matching result of the regular matching into the distributor with the set distribution rule, so that the distributor distributes the matching result of the regular matching into the standard table according to the distribution rule to obtain the target wiring link table.
[0147] It should be noted that the information interaction and execution process between the above apparatuses / units are based on the same concept as the method embodiments, and are the apparatuses corresponding to the above data format conversion method. All the implementation manners in the above method embodiments are applicable to the embodiments of the apparatus, and the specific functions and technical effects thereof can be referred to the method embodiments part, and will not be described here.
[0148] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above functional units and modules is taken as an example for illustration, and in actual application, the above functions can be completed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to complete all or part of the above described functions. The functional units and modules in the embodiments can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or software. In addition, the specific names of the functional units and modules are only for the convenience of mutual distinction, and do not limit the protection scope of the application. The specific working process of the units and modules in the system can refer to the corresponding process in the above method embodiments, which will not be described here.
[0149] Figure 5 is a structural schematic diagram of an electronic device according to an embodiment of the present application, as shown in Figure 5
[0150] The device can include a processor 501 and a memory 502 storing programs or instructions.
[0151] The processor 501 implements the steps in any of the method embodiments described above when executing the programs.
[0152] By way of example, the programs can be segmented into one or more modules / units, one or more of which are stored in the memory 502 and executed by the processor 501 to complete the present application. One or more modules / units can be a series of program instruction segments capable of completing a specific function, which are used to describe the execution process of the program in the device.
[0153] Specifically, the processor 501 described above can include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or can be configured as one or more integrated circuits that implement the embodiments of the present application.
[0154] The memory 502 can include a mass storage for data or instructions. By way of example and not limitation, the memory 502 can include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. Where appropriate, the memory 502 can include removable or non-removable (or fixed) media. Where appropriate, the memory 502 can be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, the memory 502 is non-volatile solid-state memory.
[0155] The memory can include read-only memory (ROM), random access memory (RAM), a disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical, or other physical / tangible memory storage device. Thus, in general, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software that, when executed (e.g., by one or more processors), is operable to access the operations described with reference to the methods according to an aspect of the present disclosure.
[0156] The processor 501 implements any one of the methods in the above embodiments by reading and executing programs or instructions stored in the memory 502.
[0157] In one example, the electronic device further includes a communication interface 503 and a bus 504. The processor 501, the memory 502, and the communication interface 503 are connected through the bus 504 and complete communication with each other.
[0158] The communication interface 503 is mainly used to realize the communication between various modules, devices, units and / or equipment in the embodiments of the application.
[0159] The bus 504 includes hardware, software or both to couple components of the online data traffic billing device to each other. By way of example, and without limitation, the bus can include an accelerated graphics port (AGP) or other graphics bus, an enhanced industry standard architecture (EISA) bus, a front-side bus (FSB), a HyperTransport (HT) interconnect, an industry standard architecture (ISA) bus, an InfiniBand (IB) interconnect, a low pin count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a peripheral component interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a serial advanced technology attachment (SATA) bus, a video electronics standards association local (VLB) bus, or another suitable bus or interconnect, or a combination of two or more of these. Where suitable, the bus 504 can include one or more buses. Although specific buses are described and illustrated in the embodiments of the application, the application contemplates any suitable bus or interconnect.
[0160] In addition, in combination with the method in the above embodiments, the embodiments of the application can provide a computer-readable storage medium to implement. The computer-readable storage medium has programs or instructions stored thereon; the programs or instructions are executed by the processor to implement any one of the methods in the above embodiments. The computer-readable storage medium can be read by a machine such as a computer.
[0161] The embodiments of the application further provide a chip, which includes a processor and a communication interface, the communication interface and the processor are coupled, the processor is used to run programs or instructions, to implement various processes of the above method embodiments, and to achieve the same technical effects, and here will not be repeated.
[0162] It should be understood that the chip mentioned in the embodiments of the application can also be referred to as a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0163] The embodiments of the application provide a computer program product, which is stored in a computer-readable storage medium, and is executed by at least one processor to implement various processes of the above method embodiments and to achieve the same technical effects, and here will not be repeated.
[0164] It is to be understood that the application is not limited to the particular configurations and processes described hereinabove and shown in the figures. For the sake of brevity, detailed descriptions of known methods and apparatuses are omitted so as not to obscure the description of the present application. In the above-described embodiments, several specific steps are described and illustrated as examples. However, the methods process of the present application is not limited to the specific steps described and illustrated, as various modifications, permutations, and additions thereto will occur to one of ordinary skill in the art. The order of steps can also be changed.
[0165] The functional modules shown in the above structural block diagrams can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application specific integrated circuits (ASICs), appropriate firmware, plug-ins, functional cards, and the like. When implemented in software, the elements of the present application are program or code segments that are used to perform the required tasks. The program or code segments can be stored in a machine-readable medium or transmitted through a data signal carried in a carrier wave over a transmission medium or communication link. A "machine-readable medium" includes any medium that can store or transfer information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, and the like. The code segments can be downloaded via a computer network such as the Internet, an intranet, and the like.
[0166] It is also to be understood that the example embodiments described in this application are based on a series of steps or apparatuses to describe some methods or systems. However, the present application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiments, or in an order different from the embodiments, or several steps can be performed simultaneously.
[0167] The functions of the various elements shown in the figures can be provided through the use of dedicated hardware as well as hardware capable of executing software in association with appropriate software. When provided by a processor, the functions can be provided by a single dedicated processor, by a single shared processor, or by a plurality of individual processors, some of which can be shared. Moreover, explicit use of the term "processor" or "controller" should not be construed to refer exclusively to hardware capable of executing software, and can implicitly include, without limitation, digital signal processor (DSP) hardware, read-only memory (ROM) for storing software, random access memory (RAM), and nonvolatile storage. Moreover, all statements regarding a method, process, or procedure described herein using a term such as "comprising," "including," "carrying out," "method," "process," or "procedure" are intended to present an overview of the structure of the method, process, or procedure without using a limitation. It is possible that the method, process, or procedure includes additional steps, or that the method, process, or procedure does not include all of the steps disclosed.
[0168] The above is merely specific implementation of the present application, and those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system, module and unit described above can refer to the corresponding process in the foregoing method embodiments, which will not be described herein. It should be understood that the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of various equivalent modifications or replacements within the technical range disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application.
Claims
1. A method of format conversion of data, characterized by, The method comprises: obtaining an initial wiring link table, the initial wiring link table comprising wiring link information, the wiring link information comprising a plurality of fields; extracting target features of the plurality of fields in the wiring link information, and constructing a regular matching expression according to the target features; regularly matching the initial wiring link table according to the regular matching expression; using a distributor to distribute matching results of the regular matching to a standard table according to a distribution rule to obtain a target wiring link table, so as to realize format conversion of the initial wiring link table; wherein the distribution rule is set according to the target features.
2. The method of claim 1, wherein, The extracting target features of the plurality of fields in the wiring link information, and constructing a regular matching expression according to the target features, comprises: extracting pictographic features of the plurality of fields in the wiring link information; constructing the regular matching expression according to the pictographic features.
3. The method according to claim 1 or 2, characterized in that, The extracting target features of the plurality of fields in the wiring link information, and constructing a regular matching expression according to the target features, comprises: extracting length features of the plurality of fields in the wiring link information; constructing the regular matching expression according to the length features.
4. The method of claim 1, wherein, The regularly matching the initial wiring link table according to the regular matching expression, comprises: serializing the wiring link table into a string format; regularly matching the wiring link table in the string format using the regular matching expression.
5. The method of claim 4, wherein, The wiring link table comprises a plurality of wiring links, and the serializing the wiring link table into a string format comprises: for each wiring link of the wiring link table, using a preset separator to separate different types of wiring link information in the wiring link; serializing the separated wiring link into a string.
6. The method of claim 1, wherein, In the case that one field in the wiring link information is link port information, the using a distributor to distribute matching results of the regular matching to a standard table according to a distribution rule to obtain a target wiring link table, so as to realize standardization of the initial wiring link table, comprises: obtaining a distribution rule set for the distributor by a management end according to the target features, the distribution rule being used to represent that the link port information is intercepted to obtain local information and opposite end information of the link port information; inputting the matching results of the regular matching into the distributor with the set distribution rule, so that the distributor distributes the matching results of the regular matching to the standard table according to the distribution rule to obtain the target wiring link table.
7. A data format conversion apparatus characterized by comprising: The device comprises: an obtaining module, configured to obtain an initial wiring link table, the initial wiring link table comprising wiring link information, the wiring link information comprising a plurality of fields; an extracting module, configured to extract target features of the plurality of fields in the wiring link information, and construct a regular matching expression according to the target features; a matching module, configured to regularly match the initial wiring link table according to the regular matching expression; A distribution module is configured to distribute the matched result of the regular matching into a standard table according to a distribution rule by using a distributor to obtain a target wiring link table, so as to realize format conversion of the initial wiring link table; wherein the distribution rule is set according to the target feature.
8. An electronic device, comprising: The device comprises a processor and a memory storing computer program instructions; The processor executes the computer program instructions to implement the method in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer program instructions, and the computer program instructions are executed by the processor to implement the method in any one of claims 1-6.
10. A computer program product, characterised in that, The instructions in the computer program product are executed by the processor of the electronic device to enable the electronic device to perform the method in any one of claims 1-6.