A method and device for generating path information

By automatically obtaining and matching the labels in the data file, the path information of data elements is generated, which solves the problems of low efficiency and poor accuracy of manual path information generation, and realizes efficient and accurate path information generation.

CN117539828BActive Publication Date: 2025-03-21BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311553246.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-20
Publication Date
2025-03-21
Estimated Expiration
2043-11-20

AI Technical Summary

Technical Problem

The existing big data governance platform requires manual generation of path information of data elements in data files, resulting in low generation efficiency and susceptible to human subjective factors.

Method used

By determining the target data element with path information to be generated in the data file, obtaining the first label before it and the second label after it, pairing and combining it, and generating the path information of the target data element.

Benefits of technology

No manual participation is required, which improves the efficiency of path information generation, eliminates interference from human subjective factors, and improves the accuracy of path information generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117539828B_ABST
    Figure CN117539828B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method and device for generating path information, which relates to the field of computer technology, and in particular to the field of data processing. The specific implementation scheme is: determine the target data element to generate the path information in the data file; obtain the first label located before the target data element and the second label located after the target data element from the data file; pair the obtained first label and the second label to obtain a label pair; combine the first label and the target data element contained in the label pair to obtain the path information of the target data element. The big data governance platform that uses path information to perform statistical analysis on data elements can be a platform designed based on a generative big model, wherein the above-mentioned big model can be a pre-trained model, and the above-mentioned big model can be a big language model. The template information display scheme provided by the embodiment of the present disclosure can improve the generation efficiency of path information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, in particular to the field of data processing technology, and more particularly to a method and device for generating path information. Background Art

[0002] The big data governance platform has been applied in various fields such as medical care and education. The big data governance platform can be used to perform statistical analysis on the element values ​​of data elements contained in data files. For example, in the medical field, the big data governance platform can be used to perform statistical analysis on the element value of the patient age element contained in the medical data file. The above-mentioned big data governance platform can be a platform based on generative big model design, wherein the above-mentioned big model can be a pre-trained model, and the above-mentioned big model can be a big language model.

[0003] In order to perform statistical analysis on the element values ​​of data elements contained in data files, the big data governance platform needs to extract the element values ​​of data elements from the data files based on the path information of the data elements in the data files, and the path information of the data elements in the data files needs to be generated manually. Summary of the invention

[0004] The present disclosure provides a method and device for generating path information.

[0005] According to a first aspect of the present disclosure, a path information generating method is provided, comprising:

[0006] Determine a target data element in a data file to generate path information, wherein the data elements in the data file are stored in layers, and a start tag is stored at the head of each layer of data and an end tag is stored at the tail;

[0007] Acquire, from the data file, a first tag located before the target data element and a second tag located after the target data element;

[0008] Pairing the obtained first tag and second tag to obtain a tag pair, wherein a tag pair includes a start tag in the first tag and an end tag in the second tag;

[0009] The first tag included in the tag pair and the target data element are combined to obtain path information of the target data element.

[0010] According to a second aspect of the present disclosure, a path information generating device is provided, comprising:

[0011] An element determination module, used to determine a target data element in a data file to generate path information, wherein the data elements in the data file are stored in layers, and a start tag is stored at the head of each layer of data and an end tag is stored at the tail;

[0012] A label acquisition module, used for acquiring a first label located before the target data element and a second label located after the target data element from the data file;

[0013] A tag pairing module, used to pair the acquired first tag and second tag to obtain a tag pair, wherein a tag pair includes a start tag in the first tag and an end tag in the second tag;

[0014] The path information generating module is used to combine the first tag included in the tag pair and the target data element to obtain the path information of the target data element.

[0015] According to a third aspect of the present disclosure, there is provided an electronic device, including:

[0016] at least one processor; and

[0017] a memory communicatively connected to the at least one processor; wherein,

[0018] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method described in the first aspect above.

[0019] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the method described in the first aspect above.

[0020] According to a fifth aspect of the present disclosure, a computer program product is provided, including a computer program, wherein the computer program implements the method described in the first aspect when executed by a processor.

[0021] From the above, it can be seen that when the solution provided by the embodiment of the present disclosure is used to generate path information, after determining the target data element, the first label located before the target data element and the second label located after the target data element are paired, and the first label and the target data element included in the label pair are combined to obtain the path information of the target data element. It can be seen that the path information generation solution provided by the embodiment of the present disclosure does not require human participation, which can improve the efficiency of path information generation, and can eliminate the interference of human subjective factors in the generation of path information, thereby improving the accuracy of the generated path information.

[0022] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0024] Figure 1a A schematic diagram of the internal structure of a first data file provided in an embodiment of the present disclosure;

[0025] Figure 1b A schematic diagram of the internal structure of a second data file provided in an embodiment of the present disclosure;

[0026] Figure 2 A schematic diagram of a flow chart of a first path information generating method provided in an embodiment of the present disclosure;

[0027] Figure 3a A file schematic diagram of a data file provided by an embodiment of the present disclosure;

[0028] Figure 3b A schematic diagram showing path information provided by an embodiment of the present disclosure;

[0029] Figure 4 A schematic diagram of a flow chart of a second path information generating method provided in an embodiment of the present disclosure;

[0030] Figure 5 A schematic diagram of the structure of a first path information generating device provided in an embodiment of the present disclosure;

[0031] Figure 6 A schematic diagram of the structure of a second path information generating device provided in an embodiment of the present disclosure;

[0032] Figure 7 It is a block diagram of an electronic device used to implement the path information generating method according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0033] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0034] First, the execution subject of the path information generation solution provided by the embodiment of the present disclosure is described.

[0035] In one case, the path information generation solution provided by the embodiment of the present disclosure is applied to a big data governance platform.

[0036] The big data governance platform can manage large-scale data files, for example, storing data files, performing statistical analysis on the element values ​​of data elements contained in data files, and so on.

[0037] After the big data governance platform obtains the data file, it can store the data file, and in order to extract the element values ​​of the data elements contained in the data file when there is a subsequent statistical demand for the element values ​​of the data elements contained in the data file, the big data governance platform can generate path information of the data elements in the data file after obtaining the data file, so that in the subsequent statistical process, the element values ​​of the data elements can be extracted from the data file according to the generated path information of the data elements.

[0038] In another case, the path information generation solution provided by the embodiment of the present disclosure is applied to other data platforms with path information generation function.

[0039] The above-mentioned other data platforms obtain the data file, generate the path information of the data elements in the data file, and then send the data file and the path information of the data elements in the data file to the big data governance platform. In this way, after the big data governance platform obtains the data file and the path information of the data elements in the data file, it can extract the element value of the data element from the data file according to the path information of the data element, and thus perform statistical analysis based on the extracted element value.

[0040] Next, various concepts involved in the embodiments of the present disclosure are explained.

[0041] 1. Data Elements

[0042] Data elements can be understood as the basic units used to record data. For example, for the data "Mr. Wang's age is 20 years old", data element 1 can be the name, and the element value of data element 1 is Mr. Wang; data element 2 can be the age, and the element value of data element 2 is 20.

[0043] 2. Data files

[0044] Data elements are stored in the data file by layer, and each layer is divided according to predetermined rules. For example, for medical data files, they can be divided into four layers according to the hospital where the patient is located, the building where the patient is located, the room where the patient is located, and the patient. If 20-year-old Wang is located in x1 hospital, y1 building, and z1 room, then for the above data element 2, data element 2 is stored in the data of the layers corresponding to x1 hospital, y1 building, z1 room, and Wang in the data file.

[0045] 3. Hierarchical data

[0046] Each level in the data file divides the data range according to a pre-defined rule. The data belonging to a data range constitutes a level of data. Data of different levels are arranged one after another in the data file. For example, in the above example, the data in the medical data file can be divided according to the hospital where the patient is located. If it is divided into x1 hospital, x2 hospital, and x3 hospital, then the data belonging to x1 hospital in the data file constitutes a level of data, the data belonging to x2 hospital constitutes a level of data, and the data belonging to x3 hospital constitutes a level of data.

[0047] Each level of data has a header and a tail. In the data file, the data from the header of the level of data to the tail of the level of data belongs to the level of data.

[0048] See also Figure 1a , provides a schematic diagram of the internal structure of the first data file, wherein the data segment from the first layer header data T11 to the first layer tail data W11 belongs to one level of data, and the level of data is called level data 1.

[0049] The data segment from the second layer header data T21 to the second layer tail data W21 belongs to one level of data, which is called level data 2.

[0050] The data segment from the third-layer header data T31 to the third-layer tail data W31 belongs to one level of data, which is called level data 3.

[0051] The data segment from the fourth-layer header data T41 to the fourth-layer tail data W41 belongs to a level of data, which is called level data 4, and level data 4 includes data element 3.

[0052] In addition, from Figure 1a It can also be seen that level data 1 contains level data 2, level data 2 contains level data 3, and level data 3 contains level data 4.

[0053] 4. Brother level data

[0054] If two hierarchical data belong to the same upper-level hierarchical data, the two hierarchical data are sibling hierarchical data.

[0055] For example, see Figure 1b , provides a schematic diagram of the internal structure of the second type of data file. Figure 1b In the data file shown, the data segment from the first layer header data T12 to the first layer tail data W12 is called level data 5, the data segment from the second layer header data T22 to the second layer tail data W22 is called level data 6, and the data segment from the second layer header data T23 to the second layer tail data W23 is called level data 7. Level data 5 includes level data 6 and level data 7, and level data 6 and level data 7 are brother level data to each other.

[0056] in addition, Figure 1b The data file shown also includes a data segment from the first layer header data T13 to the first layer tail data W13, called level data 8, and a data segment from the second layer header data T24 to the second layer tail data W24, and level data 8 includes level data 9.

[0057] Although the level data 5 and the level data 8 correspond to the same level number, they are not the same level data. Therefore, the level data 9 and the level data 6 and the level data 7 are not brother level data.

[0058] The path information generation method is described in detail below through a specific embodiment.

[0059] In one embodiment of the present disclosure, see Figure 2 , a flow chart of a first path information generating method is provided. In this embodiment, the method includes the following steps S201-S204.

[0060] Step S201: Determine the target data element in the data file for which path information is to be generated.

[0061] Among them, data elements in the data file are stored in layers.

[0062] The head of each level of data stores a start tag, and the tail stores an end tag.

[0063] For each level of data, the level of data has a header and a tail. A start tag is stored in the header of the level of data to mark the header data as the header of the level of data; an end tag is stored in the tail of the level of data to mark the tail data as the tail of the level of data.

[0064] Specifically, after obtaining the data file, the target data element may be determined by any one of the following two implementation methods.

[0065] In a first implementation, a data file may be displayed, and in response to a user selecting a data element in the data file, the data element selected by the user is determined to be a target data element.

[0066] For example, when displaying a data file to a user, the display area of ​​each data element in the data file in the interface can be determined. When it is detected that the user clicks in the interface, the click area clicked by the user can be determined, and the data element corresponding to the click area can be determined. This data element is the data element selected by the user, that is, the target data element.

[0067] For another example, a data element selected by a user in a displayed data file through an external device such as a keyboard or a mouse may be detected as a target data element.

[0068] In this implementation, the data elements selected by the user can be regarded as data elements that need to be counted. Therefore, using the data elements selected by the user as target data elements can improve the accuracy of determining the target data elements, thereby improving the accuracy of generating path information.

[0069] In the second implementation method, the target type of data elements to be counted by the big data governance platform can be determined in advance. In this way, after obtaining the data file, the data file can be traversed to determine the data elements of the target type from the data elements contained in the data file as the target data elements.

[0070] In addition, the format of the above data file can be called the target format, that is, the data elements in the file under the target format are stored by layer, the head of each layer of data stores a start tag, and the tail of each layer of data stores an end tag. If the initial data file obtained is not a file in the target format, after obtaining the data file, the data file can be converted to obtain a data file in the target format, and then the target data element in the data file in the target format is determined.

[0071] For example, the target format is XML (EXtensible Markup Language) format. If a data file in another format is obtained when the data file is obtained, the data file in another format can be converted into a data file in the target format by conversion methods such as string extraction or string replacement.

[0072] Step S202: Obtain a first tag located before a target data element and a second tag located after the target data element from a data file.

[0073] Specifically, after determining the target data element, the first file content before the target data element in the data file can be determined, so that the tag contained in the first file content can be detected, and the detected tag is the first tag before the target data element.

[0074] Similarly, the second file content after the target data element in the data file can be determined, and the tag contained in the second file content is detected, and the detected tag is the second tag after the target data element.

[0075] Before detecting the tags contained in the file content, a start tag regular table and an end tag regular table can be obtained, wherein the start tag regular table records the positions of each start tag in the data file, and the end tag regular table records the end tag regular table of each end tag position in the data file.

[0076] In this way, when detecting tags contained in the file content, the data at the position of the start tag can be determined as the start tag in the file content according to the position of the start tag recorded in the start tag regular table, and the data at the position of the end tag can be determined as the end tag according to the position of the end tag recorded in the end tag regular table.

[0077] In addition, when obtaining the first tag contained in the above-mentioned first file content, you can obtain the start tag and the end tag contained in the first file content, or you can only obtain the start tag contained in the first file content; when obtaining the second tag contained in the above-mentioned second file content, you can obtain the start tag and the end tag contained in the second file content, or you can only obtain the end tag contained in the second file content. For details, please refer to the subsequent embodiments, which are not described in detail here.

[0078] Step S203: Pair the acquired first tag and second tag to obtain a tag pair.

[0079] A tag pair includes a start tag in a first tag and an end tag in a second tag.

[0080] When performing tag pairing, since the start tag stored in the header of each level of data is used to mark the header data where it is located as the header of the level of data, and the end tag stored in the tail of each level of data is used to mark the tail data where it is located as the tail of the level of data, it is possible to determine which level of data each tag to be paired belongs to, and then determine different tags belonging to the same level of data as matching tags.

[0081] The implementation method of pairing the first tag and the second tag can be found in the subsequent embodiments and will not be described in detail here.

[0082] Step S204: Combine the first tag included in the tag pair and the target data element to obtain path information of the target data element.

[0083] Specifically, after obtaining each label pair, the first label in each label pair can be obtained, and each first label, target data element and path connector are combined according to the inclusion relationship between the hierarchical data corresponding to each first label to obtain the combined path information.

[0084] For example, the path connector may be “ / ”.

[0085] If the hierarchical data corresponding to the first label 1 contains the hierarchical data corresponding to the first label 2, the hierarchical data corresponding to the first label 2 contains the hierarchical data corresponding to the first label 3, and the hierarchical data corresponding to the first label 3 contains the target data element, then the path information of the target data element can be expressed as: first label 1 / first label 2 / first label 3 / target data element.

[0086] In addition, if the above data file is a file in XML format, the path information of the target data element obtained by combination can be called Xpath path information of the target data element.

[0087] See also Figure 3a , Figure 3b , Figure 3a shows a data file in XML format, Figure 3b Path information of a data element is shown.

[0088] exist Figure 3a The data file shown stores the file title of the data file, that is, the document title in the figure: Template for admission and discharge records within 24 hours of medication administration, and also stores the file status of the data file, that is, the document status versionNumber in the figure.

[0089] Figure 3a In the data file shown, ClinicalDocument in the first row of data is a start tag, and recordTarget, patientRole, and id under the document status versionNumber in the data file are also start tags. The data element extension is stored in the hierarchical data where the start tag id is located.

[0090] Figure 3b The path information shown is the path information of the data element of patient number in the data file, wherein ClinicalDocument, recordTarget, patientRole, and id are all the first tags included in the path information, and extention is the data element.

[0091] From the above, it can be seen that when the solution provided by the embodiment of the present disclosure is used to generate path information, after determining the target data element, the first label located before the target data element and the second label located after the target data element are paired, and the first label and the target data element included in the label pair are combined to obtain the path information of the target data element. It can be seen that the path information generation solution provided by the embodiment of the present disclosure does not require human participation, which can improve the efficiency of path information generation, and can eliminate the interference of human subjective factors in the generation of path information, thereby improving the accuracy of the generated path information.

[0092] In addition, the first label and the second label are paired to obtain a label pair, and the start label and the end label in the label pair are labels of the same hierarchical data. Since the first label is the label before the target data element and the second label is the label after the target data element, the label pair is obtained, and the hierarchical data to which the target data element belongs is determined. In this way, the first label and the target data element contained in the label pair are combined to obtain path information. Subsequently, the hierarchical data to which the target data element belongs can be accurately determined based on the first label contained in the path information, and finally the target data element can be accurately determined based on the information of the target data element contained in the path information. Therefore, the solution provided by the embodiment of the present disclosure can improve the accuracy of generating path information.

[0093] The specific implementation method of obtaining tags and tag pairing is described below.

[0094] In one embodiment of the present disclosure, when acquiring the above-mentioned first tag and second tag, the first start tag and the first end tag located before the target data element can be acquired, and the second start tag and the second end tag located after the target data element can be acquired.

[0095] Specifically, after determining the target data element, the first file content before the target data element in the data file can be determined. According to the position of the start tag recorded in the start tag regular table obtained in advance, the data at the position of the start tag is determined in the first file content, and the determined data is the first start tag. According to the position of the end tag recorded in the end tag regular table obtained in advance, the data at the position of the end tag is determined in the first file content, and the determined data is the first end tag.

[0096] Similarly, the second file content located after the target data element in the data file can also be determined. The second start tag contained in the second file content is determined according to the various positions recorded in the start tag regular table, and the second end tag contained in the second file content is determined according to the various positions recorded in the end tag regular table.

[0097] In this scheme, by obtaining the first start tag and the first end tag, all the tags before the target data element are obtained, and by obtaining the second start tag and the second end tag, all the tags after the target data element are obtained. In this way, based on all the tags before and after the target data element, each label pair can be accurately obtained, thereby generating the path information of the target data element based on the first label included in each label pair, which can improve the accuracy of the generated path information.

[0098] After obtaining the first start tag, the first end tag, the second start tag, and the second end tag, tag pairing may be performed in any one of the following implementations.

[0099] In the first implementation, the first start tag and the first end tag are paired to obtain the first remaining tag that is not paired with the first start tag and the first end tag; the second start tag and the second end tag are paired to obtain the second remaining tag that is not paired with the second start tag and the second end tag; the first remaining tag and the second remaining tag are paired to obtain a tag pair.

[0100] Specifically, by pairing the first start tag and the first end tag, paired tags and unpaired tags can be obtained.

[0101] For the first paired start tag and the first end tag, it means that the entire hierarchical data where these two tags are located is located before the target data element; for the first unpaired remaining tag, it means that the other paired tag is not before the target data element, but after the target data element.

[0102] Similarly, for the paired second start tag and the second end tag, it means that the entire hierarchical data where these two tags are located is located after the target data element; for the unpaired second remaining tag, it means that the other tag paired with it is not after the target data element, but before the target data element.

[0103] Therefore, after obtaining the first remaining tag and the second remaining tag, the first remaining tag and the second remaining tag are paired to obtain a tag pair, in which the hierarchical data to which the start tag and the end tag belong is also the hierarchical data to which the target data element belongs.

[0104] The specific implementation of tag pairing can be found in the above Figure 2 The description of step S203 in the illustrated embodiment will not be repeated here.

[0105] In this implementation, by pairing the first start tag with the first end tag, pairing the second start tag with the second end tag, and pairing the first remaining tag with the second remaining tag, the label pairs consisting of the start tag and the end tag of the hierarchical data to which the target data element belongs can be accurately obtained, thereby generating the path information of the target data element based on the first label included in each label pair, which can improve the accuracy of the generated path information.

[0106] In the second implementation, since the first tag included in the tag pair is the start tag, when performing tag pairing, the second start tag and the second end tag can be paired to obtain the second remaining tag, and then the second remaining tag can be directly paired with the first start tag to obtain a tag pair.

[0107] In the third implementation, since the second tag included in the tag pair is an end tag, when performing tag pairing, the first start tag and the first end tag can be paired to obtain the first remaining tag, and then the first remaining tag can be directly paired with the second end tag to obtain a tag pair.

[0108] In another embodiment of the present disclosure, when obtaining the above-mentioned first tag and second tag, only the first start tag located before the target data element and the second end tag located after the target data element may be obtained. When performing tag pairing, the first start tag and the second end tag are paired to obtain a tag pair.

[0109] The specific implementation manner of obtaining the first start tag and the second end tag, and the specific implementation manner of pairing the first start tag and the second end tag can be referred to the above embodiment, which will not be described in detail here.

[0110] From the above, it can be seen that when applying the solution provided by the embodiment of the present disclosure to generate path information, it is only necessary to obtain the first start tag and the second end tag, and when pairing the tags, it is only necessary to pair the first start tag and the second end tag. The amount of data obtained is small and the amount of calculation for tag pairing is also small. Therefore, applying the path information generation solution provided by the embodiment of the present disclosure can reduce the amount of calculation for generating path information and improve the efficiency of generating path information.

[0111] In the process of generating path information, after obtaining the label pair, the processing methods mentioned in the following two embodiments may be executed to obtain the path information of the target data element.

[0112] In one embodiment of the present disclosure, in the process of combining the first tag included in the tag pair and the target data element to obtain the path information of the target data element, the first tag included in the tag pair and the target data element can be combined to obtain initial path information; the initial path information can be displayed; adjustment information input by the user for the initial path information can be obtained; and the initial path information can be adjusted according to the adjustment information to obtain the path information of the target data element.

[0113] The specific implementation method of combining the first tag included in the tag pair and the target data element can be found in the above Figure 2 Step S204 in the illustrated embodiment will not be described in detail here.

[0114] After obtaining the initial path information, the initial path information is displayed to the user. Since the initial path information contains information about the target data element, after consulting the displayed initial path information, the user can know which data element in the data file the initial path information is the path information of. Alternatively, when displaying the initial path information, the target data element is also displayed so that the user can know the target data element.

[0115] After knowing the target data element, the user can determine the path information of the target data element in the same way as manually determining the path information of the data element, so that the user can compare whether the displayed path information is the same as the path information determined by the user. If they are not the same, the user can input adjustment information for the initial path information.

[0116] After obtaining the adjustment information input by the user, the platform executing this solution adjusts the initial path information according to the adjustment information to obtain the adjusted path information.

[0117] After adjusting the path information, the above platform can also display the adjusted path information.

[0118] As can be seen from the above, when the solution provided by the embodiment of the present disclosure is applied to generate path information, after obtaining the initial path information that is a combination of the first label in the label pair and the target number element, the initial path information is displayed for the user to verify whether the initial path information is correct, and when the adjustment information input by the user is obtained, the initial path information is adjusted, which can improve the accuracy of the generated path information.

[0119] In another embodiment of the present disclosure, in the process of combining the first tag included in the tag pair and the target data element to obtain the path information of the target data element, after combining the first tag included in the tag pair and the target data element to obtain the initial path information, the data file can be parsed according to the initial path information; it is detected whether the data element included in the parsing result is the target data element; if so, it is determined that the initial path information is the path information of the target data element.

[0120] Specifically, after obtaining the initial path information, the data file can be parsed according to the initial path information through file parsing algorithms, models, etc. to obtain a parsing result, which includes data elements determined in the data file according to the initial path information. The parsed data elements are then compared with the target data elements to see if they are the same. If they are the same, it means that the target data elements can be parsed from the data file according to the initial path information, and the initial path information is the path information of the target data elements.

[0121] If the parsed data element is different from the target data element, it means that the target data element cannot be parsed from the data file according to the initial path information, and the initial path information is not the path information of the target data element. At this time, the user can be notified that the path information generation failed, and an error log can be generated.

[0122] It can be seen from the above that when the solution provided by the embodiment of the present disclosure is used to generate path information, the data file is parsed according to the initial path information. By detecting whether the data elements contained in the parsing results are the target data elements, it is possible to accurately test whether the initial path information is the path information of the target data elements. Therefore, the path information generation solution provided by the embodiment of the present disclosure can improve the accuracy of the generated path information.

[0123] When applying the solution provided by the embodiment of the present disclosure to generate path information, in addition to generating the path information of the target data element, additional information related to the path information can also be generated, so that the big data governance platform can more accurately determine the target data element in the data file based on the path information and additional information of the target data element.

[0124] In one embodiment of the present disclosure, see Figure 4 , a flow chart of a second path information generating method is provided. In this embodiment, the method includes the following steps S401-S408.

[0125] Step S401: Determine the target data element for which path information is to be generated in the data file.

[0126] Step S402: Obtain a first tag located before the target data element and a second tag located after the target data element from the data file.

[0127] Step S403: Pair the acquired first tag and second tag to obtain a tag pair.

[0128] Step S404: Combine the first tag included in the tag pair and the target data element to obtain path information of the target data element.

[0129] The above steps S401-S404 are respectively Figure 2 Steps S201-S204 in the illustrated embodiment are the same and will not be described in detail here.

[0130] After obtaining the path information of the target data element, the path information of the target data element may include one or more first tags. For each first tag included in the path information of the target data element, the following steps S405-S408 can be executed to obtain the path additional information corresponding to each first tag.

[0131] Step S405: Locate the first tag included in the path information in the data file.

[0132] Specifically, the first tag in the data file may be located by any one of the following two implementations.

[0133] In the first implementation method, each label in the data file can be traversed to detect whether the label in the data file is the same as the above-mentioned first label. If it is detected that a label in the data file is the same as the first label, it can be determined that the label is the first label, and the position of the label is the position of the first label.

[0134] In the second implementation, the first label in the path information is a start label. Therefore, the position of the first label can be detected in the start label regular table, so that the label at the detected position can be located in the data file, and the located label is the first label.

[0135] Step S406: Based on the positioning result, determine the target level name of the target level data to which the target data element belongs.

[0136] Specifically, the target level name may be determined by any of the following two implementation methods.

[0137] In the first implementation method, the positioning result may include the location information of the first tag. Based on the location information of the first tag, the header of the target level data storing the first tag can be determined. Based on the data in the header of the target level data, the target level data can be determined in the data file, and thus the target level name can be determined in the target level data.

[0138] For example, before determining the header of the target level data based on the position information of the first tag, the position information of the header data of each level data in the data file can be obtained in advance. Therefore, when determining the header of the target level data, it can be determined from the position information of each header data obtained in advance that the data range indicated by the position information includes the header data at the location of the first tag, and the determined number of headers is the header of the target level data.

[0139] When determining the target level data based on the data in the header of the target level data, since the header and tail of each level data often have a corresponding relationship, the tail corresponding to the header of the target level data can be determined in the data file. After determining the header and tail of the target level data, the data segment from the header to the tail is also determined to be the target level data.

[0140] After determining the target hierarchical data, the target hierarchical data can be traversed to obtain the hierarchical name stored in the target hierarchical data as the target hierarchical name; or the storage location of the hierarchical name in each hierarchical data can be obtained in advance, so that after determining the target hierarchical data, the target hierarchical name can be directly located according to the storage location of the hierarchical name in the target hierarchical data.

[0141] In the second implementation method, in a hierarchical data, the position of data such as the start tag and the hierarchical name in the hierarchical data can be fixed. Therefore, the relative position between the start tag and the hierarchical name in the hierarchical data can be obtained in advance. In this case, when determining the target hierarchical name based on the positioning result, the target hierarchical name can be determined directly according to the relative position between the start tag and the hierarchical name in the target hierarchical data and the positioning result.

[0142] Step S407: Based on the target level name, determine the sibling level data of the target level data.

[0143] In a data file, different levels of data that are sibling levels have the same level name.

[0144] For example, in the above Figure 1b In the data file shown, level data 2 and level data 3 are brother level data, and the level name of level data 2 is the same as the level name of level data 3.

[0145] Therefore, based on the target hierarchical name, hierarchical data with the target hierarchical name can be determined in the data file, and the determined hierarchical data except the target hierarchical data are the sibling hierarchical data of the target hierarchical data.

[0146] The specific implementation method for determining the sibling level data can be found in the subsequent embodiments and will not be described in detail here.

[0147] Step S408: Determine the sequence number of the target level data according to the sibling level data as the path additional information corresponding to the first label.

[0148] The path additional information corresponding to the first label represents the arrangement position of the hierarchical data to which the target data element belongs and to which the first label corresponds in each hierarchical data of the same level.

[0149] If the data file is a file in XML format, the path additional information corresponding to the first tag can be called Xpath sequence number information of the target data element.

[0150] Specifically, after the sibling data is determined, the location information of the sibling data in the data file can be obtained, so that the sequence number of the target data can be determined according to the location information of the sibling data as the path additional information corresponding to the first label.

[0151] For example, according to the location information of the sibling-level data, the sequence number of the target-level data may be determined by any one of the following two implementations.

[0152] In the first implementation method, in addition to obtaining the location information of the sibling level data, the location information of the target level data is also obtained. In this way, the sibling level data located before the target level data is determined based on the location information of the sibling level data and the location information of the target level data. In this way, the number of sibling level data located before the target level data is increased by 1, and the obtained sequence number is also the sequence number of the target level data.

[0153] In the second implementation method, the positions of two adjacent level data that are brother level data are usually closely spaced. In view of this, the distance between other brother level data except the first brother level data and its previous brother level data can be calculated based on the position information of each brother level data. If the distance between two brother level data is large, it means that the target level data is located between the two brother level data, so the brother level data before the target level data can be determined. In this way, the number of brother level data before the target level data is increased by 1, and the resulting sequence number is also the sequence number of the target level data.

[0154] From the above, it can be seen that when the solution provided by the embodiment of the present disclosure is applied to generate path information, not only the path information of the target data element can be generated, but also the path additional information corresponding to the first label contained in the path information can be generated. This enables the big data governance platform to accurately parse the target data element from the data file based on richer information. Therefore, the application of the path information generation solution provided by the embodiment of the present disclosure can improve the accuracy of the big data governance platform in parsing data files, thereby improving the accuracy of the big data platform's statistical analysis of the element values ​​of the target data elements.

[0155] The following is the above Figure 4 The specific implementation method of determining the sibling level data mentioned in step S407 of the illustrated embodiment is described.

[0156] In the first implementation method of determining sibling level data provided by the present disclosure, second-level data that is at the same level as the first-level data and is located before and adjacent to the first-level data is searched; it is determined whether the data level name of the second-level data is the target level name; if so, the second-level data is determined to be the sibling level data of the first-level data, and the first-level data is updated to the second-level data, and the step of returning to the step of searching for second-level data that is at the same level as the first-level data and is located before and adjacent to the first-level data is returned.

[0157] Among them, the initial value of the first-level data is the target-level data.

[0158] Specifically, based on the positioning result of the first tag, the target level data to which the first tag belongs can be determined as the initial value of the first level data, and then the level data to be detected that is adjacent to the first level data can be determined.

[0159] Check whether the hierarchical data to be detected and the first hierarchical data are data of the same hierarchical level. If not, it means that the target hierarchical data is the hierarchical data that is arranged at the front of each hierarchical data that is a brother hierarchical data. In this way, the sequence number of the target hierarchical data can be directly determined to be 1; if yes, it can be determined that the hierarchical data to be detected is the second hierarchical data.

[0160] After determining the second-level data, the data level name of the second-level data can be obtained through the level name acquisition method mentioned in the above embodiment, and it can be determined whether the data level name of the second-level data is the target level name. If so, it means that the second-level data is the brother level data of the target level data; if not, it means that the second-level data is not the brother level data of the target level data.

[0161] After determining that the second-level data is the sibling level data of the target level data, the first-level data needs to be updated to the second-level data, and the step of searching for the second-level data is returned again until it is detected that a level name of the second-level data is not the target level name.

[0162] After detecting that the level name of a second-level data is not the target level name, all level data that have been used as the second-level data are all sibling level data located before the target level data. In this way, when determining the sequence number of the target level data, the number of the sibling level data can be obtained, and the sequence number of the target level data is determined based on the obtained number.

[0163] For example, the sequence number of the target level data may be determined to be the obtained number plus 1.

[0164] In this case, the sequence number of the target level data can be regarded as the arrangement order of the target level data in the sibling level data, and the obtained number is the number of sibling level data before the target level number, which is the number plus 1, that is, the arrangement order of the target level data. Therefore, the above number plus 1 can accurately represent the sequence number of the target level data, so that the sequence number is used as the path additional information corresponding to the first label, which can improve the accuracy of the path additional information.

[0165] For another example, based on the above quantity, the sequence number of the target level data under a preset arrangement rule may be determined.

[0166] The above arrangement rules may be rules set based on Roman numerals, English letters, etc.

[0167] It can be seen that based on the number of sibling-level data, the sequence number of the target-level data can be accurately determined, so that the sequence number is used as the path additional information corresponding to the first label, which can improve the accuracy of the path additional information.

[0168] In addition, the above-mentioned layer data to be detected can be determined by the following two implementation methods.

[0169] In the first implementation, before determining the level data to be detected that is adjacent to the first level data, the location information of each level data in the data file can be obtained in advance, so that when determining the level data to be detected, the level data to be detected can be determined based on the location information of each level data.

[0170] In the second implementation, the tail of a level of data that is located before the first level of data and closest to the first level of data can be determined, so that the level of data to which it belongs can be further determined based on the determined tail as the level of data to be detected.

[0171] It can be seen from the above that when the solution provided by the embodiment of the present disclosure is applied to generate path information, the brother level data located before the target level data can be determined one by one through the above-mentioned loop search process, so that the sequence number of the target level data can be determined according to the brother level data, which can improve the accuracy of determining the target level sequence number, thereby improving the accuracy of the path additional information corresponding to the first label.

[0172] In the second implementation method of determining sibling hierarchical data provided by the present disclosure, after obtaining the target hierarchical name, the data file can be traversed to determine the sibling hierarchical data other than the target hierarchical data whose hierarchical name is the target hierarchical name.

[0173] Specifically, when traversing the data file, the level names other than the level name of the target level data stored in the data file can be searched one by one. In this way, each time a level name is traversed, it can be determined whether the level name is the target level name. If so, it means that the level data to which the level name belongs is the brother level data of the target level data.

[0174] In the present implementation, since the hierarchical names of different hierarchical data that are sibling hierarchical data are the same, the hierarchical data other than the target hierarchical data and whose hierarchical names are the target hierarchical data are the sibling hierarchical data of the target hierarchical data. It can be seen that by applying the present implementation, the sibling hierarchical data of the target hierarchical data can be accurately determined, thereby improving the accuracy of determining the sequence number of the target hierarchical data, or the accuracy of the path additional information corresponding to the first label.

[0175] In one embodiment of the present disclosure, after applying the second implementation method of determining sibling level data to determine the sibling level data, the position of the target level data and the position of the sibling level data can be obtained, and the sequence number of the target level data can be determined according to the arrangement order of the obtained positions.

[0176] The implementation method of obtaining the location of the target level data can be found in the above-mentioned embodiment, which will not be described in detail here.

[0177] After obtaining the position of the target hierarchical data and the positions of the sibling hierarchical data, the arrangement order of the obtained positions can be determined, so that the sequence number of the position of the target hierarchical data in the sequence can be determined as the sequence number of the target hierarchical data.

[0178] From the above, it can be seen that when the scheme provided by the embodiment of the present disclosure is applied to generate path information, the sequence number of the target level data can be accurately determined according to the arrangement order of the position of the target level data and the position of the sibling level data. Therefore, the path information generation scheme provided by the embodiment of the present disclosure can improve the sequence number of the target level data, or the accuracy of the path additional information corresponding to the first label.

[0179] In one embodiment of the present disclosure, after generating the path information of the target data element, the big data governance platform can obtain the generated path information. In this way, when there is a need to perform statistical analysis on the element value of the target data element, the big data governance platform can parse the data file according to the path information of the target data element, thereby obtaining the element value of the target data element stored in the data file.

[0180] In addition, the big data governance platform can also obtain the path additional information corresponding to the first label in the path information of the target data element. In this way, when the big data governance platform extracts the target data element from the data file, it can not only extract the element based on the path information, but also verify whether the extracted element is correct based on the path additional information corresponding to the first label in the path information.

[0181] Specifically, since in the path information of the target data element, each first label corresponds to a level number in the data file, and the path additional information corresponding to the first label is essentially used to characterize which level data the target data element belongs to at the level number, therefore, for each first label, after extracting the element based on the path information, it is possible to determine the first verification level data to which the extracted element belongs at the level number corresponding to the first label, and based on the path additional information corresponding to the first label, determine the second verification level data indicated by the path additional information in each level data at the level number corresponding to the first label; if the first verification level number and the second verification level data are the same level data, it can be determined that the extracted element is the target data element.

[0182] Therefore, by utilizing the path information of the target data element and the additional path information corresponding to the first label in the path information, the big data governance platform can accurately extract the target data element from the data file, thereby performing statistical analysis on the element value of the target data element, thereby improving the accuracy of the statistical analysis.

[0183] Corresponding to the above-mentioned path information generating method, the embodiment of the present disclosure further provides a path information generating device.

[0184] In one embodiment of the present disclosure, see Figure 5 , a schematic diagram of the structure of a first path information generating device is provided. In this embodiment, the device includes:

[0185] An element determination module 501 is used to determine a target data element in a data file to generate path information, wherein the data elements in the data file are stored in layers, and a start tag is stored at the head of each layer of data and an end tag is stored at the tail;

[0186] A label acquisition module 502, configured to acquire, from the data file, a first label located before the target data element and a second label located after the target data element;

[0187] A tag pairing module 503 is used to pair the acquired first tag and second tag to obtain a tag pair, wherein a tag pair includes a start tag in the first tag and an end tag in the second tag;

[0188] The path information generating module 504 is used to combine the first tag included in the tag pair and the target data element to obtain the path information of the target data element.

[0189] From the above, it can be seen that when the solution provided by the embodiment of the present disclosure is used to generate path information, after determining the target data element, the first label located before the target data element and the second label located after the target data element are paired, and the first label and the target data element included in the label pair are combined to obtain the path information of the target data element. It can be seen that the path information generation solution provided by the embodiment of the present disclosure does not require human participation, which can improve the efficiency of path information generation, and can eliminate the interference of human subjective factors in the generation of path information, thereby improving the accuracy of the generated path information.

[0190] In addition, the first label and the second label are paired to obtain a label pair, and the start label and the end label in the label pair are labels of the same hierarchical data. Since the first label is the label before the target data element and the second label is the label after the target data element, the label pair is obtained, and the hierarchical data to which the target data element belongs is determined. In this way, the first label and the target data element contained in the label pair are combined to obtain path information. Subsequently, the hierarchical data to which the target data element belongs can be accurately determined based on the first label contained in the path information, and finally the target data element can be accurately determined based on the information of the target data element contained in the path information. Therefore, the solution provided by the embodiment of the present disclosure can improve the accuracy of generating path information.

[0191] In one embodiment of the present disclosure, the tag acquisition module 502 is specifically configured to:

[0192] From the data file, a first start tag and a first end tag located before the target data element are obtained, and a second start tag and a second end tag located after the target data element are obtained.

[0193] In this scheme, by obtaining the first start tag and the first end tag, all the tags before the target data element are obtained, and by obtaining the second start tag and the second end tag, all the tags after the target data element are obtained. In this way, based on all the tags before and after the target data element, each label pair can be accurately obtained, thereby generating the path information of the target data element based on the first label included in each label pair, which can improve the accuracy of the generated path information.

[0194] In one embodiment of the present disclosure, the tag pairing module 503 is specifically used to:

[0195] Pairing the first start tag with the first end tag to obtain a first remaining tag that is not paired between the first start tag and the first end tag;

[0196] Pairing the second start tag with the second end tag to obtain a second remaining tag that is not paired between the second start tag and the second end tag;

[0197] The first remaining label and the second remaining label are paired to obtain a label pair.

[0198] In this scheme, by pairing the first start tag with the first end tag, pairing the second start tag with the second end tag, and pairing the first remaining tag with the second remaining tag, the label pairs consisting of the start tag and the end tag of the hierarchical data to which the target data element belongs can be accurately obtained, thereby generating the path information of the target data element based on the first label included in each label pair, which can improve the accuracy of the generated path information.

[0199] In one embodiment of the present disclosure, the tag acquisition module 502 is specifically configured to:

[0200] From the data file, obtain a first start tag located before the target data element, and obtain a second end tag located after the target data element;

[0201] The tag pairing module 503 is specifically used for:

[0202] The first start tag and the second end tag are paired to obtain a tag pair.

[0203] From the above, it can be seen that when applying the solution provided by the embodiment of the present disclosure to generate path information, it is only necessary to obtain the first start tag and the second end tag, and when pairing the tags, it is only necessary to pair the first start tag and the second end tag. The amount of data obtained is small and the amount of calculation for tag pairing is also small. Therefore, applying the path information generation solution provided by the embodiment of the present disclosure can reduce the amount of calculation for generating path information and improve the efficiency of generating path information.

[0204] In one embodiment of the present disclosure, see Figure 6 , a schematic diagram of the structure of a second path information generating device is provided. In this embodiment, the device includes:

[0205] An element determination module 601 is used to determine a target data element in a data file to generate path information, wherein the data elements in the data file are stored in layers, and a start tag is stored at the head of each layer of data and an end tag is stored at the tail;

[0206] A label acquisition module 602 is used to acquire a first label located before the target data element and a second label located after the target data element from the data file;

[0207] A tag pairing module 603 is used to pair the acquired first tag and second tag to obtain a tag pair, wherein a tag pair includes a start tag in the first tag and an end tag in the second tag;

[0208] A path information generating module 604, configured to combine the first tag included in the tag pair and the target data element to obtain path information of the target data element;

[0209] A label positioning module 605, configured to locate the first label included in the path information in the data file;

[0210] A name determination module 606, configured to determine, based on the positioning result, a target level name of the target level data to which the target data element belongs;

[0211] A sibling determination module 607, configured to determine sibling hierarchical data of the target hierarchical data based on the target hierarchical name;

[0212] The additional information generating module 608 is used to determine the sequence number of the target level data according to the sibling level data as the path additional information corresponding to the first label.

[0213] From the above, it can be seen that when the solution provided by the embodiment of the present disclosure is applied to generate path information, not only the path information of the target data element can be generated, but also the path additional information corresponding to the first label contained in the path information can be generated. This enables the big data governance platform to accurately parse the target data element from the data file based on richer information. Therefore, the application of the path information generation solution provided by the embodiment of the present disclosure can improve the accuracy of the big data governance platform in parsing data files, thereby improving the accuracy of the big data platform's statistical analysis of the element values ​​of the target data elements.

[0214] In one embodiment of the present disclosure, the brother determination module 607 includes:

[0215] A data search submodule, used to search for second-level data that is at the same level as the first-level data and is located before and adjacent to the first-level data, wherein the initial value of the first-level data is the target-level data;

[0216] A name determination submodule, used to determine whether the data level name of the second level data is the target level name, and if so, trigger a data determination submodule;

[0217] The data determination submodule is used to determine that the second-level data is the sibling-level data of the first-level data, and update the first-level data to the second-level data, thereby triggering the data search submodule.

[0218] It can be seen from the above that when the solution provided by the embodiment of the present disclosure is applied to generate path information, the brother level data located before the target level data can be determined one by one through the above-mentioned loop search process, so that the sequence number of the target level data can be determined according to the brother level data, which can improve the accuracy of determining the target level sequence number, thereby improving the accuracy of the path additional information corresponding to the first label.

[0219] In one embodiment of the present disclosure, the additional information generating module 608 includes:

[0220] A quantity obtaining submodule is used to obtain the quantity of the brother level data;

[0221] The sequence number determination submodule is used to determine the sequence number of the target level data based on the obtained quantity.

[0222] In this solution, based on the number of sibling-level data, the sequence number of the target-level data can be accurately determined, so that the sequence number is used as the path additional information corresponding to the first label, which can improve the accuracy of the path additional information.

[0223] In one embodiment of the present disclosure, the sequence number determination submodule is specifically used to:

[0224] The sequence number of the target level data is determined to be the obtained number plus 1.

[0225] In this solution, the above number plus 1 can accurately represent the sequence number of the target level data, so that the sequence number is used as the path additional information corresponding to the first label, which can improve the accuracy of the path additional information.

[0226] In one embodiment of the present disclosure, the brother determination module 607 is specifically configured to:

[0227] The data file is traversed to determine brother level data whose level name is the target level name except the target level data.

[0228] In this scheme, since the hierarchical names of different hierarchical data that are sibling hierarchical data are the same, the hierarchical data other than the target hierarchical data and whose hierarchical names are the target hierarchical data are the sibling hierarchical data of the target hierarchical data. It can be seen that the application of this implementation method can accurately determine the sibling hierarchical data of the target hierarchical data, thereby improving the accuracy of determining the sequence number of the target hierarchical data, or the path additional information corresponding to the first label.

[0229] In one embodiment of the present disclosure, the additional information generating module 608 is specifically used to:

[0230] Obtaining the location of the target level data and the location of the sibling level data;

[0231] According to the arrangement order of the obtained positions, the sequence number of the target level data is determined.

[0232] From the above, it can be seen that when the scheme provided by the embodiment of the present disclosure is applied to generate path information, the sequence number of the target level data can be accurately determined according to the arrangement order of the position of the target level data and the position of the sibling level data. Therefore, the path information generation scheme provided by the embodiment of the present disclosure can improve the sequence number of the target level data, or the accuracy of the path additional information corresponding to the first label.

[0233] In one embodiment of the present disclosure, the element determination module 501 is specifically configured to:

[0234] Display data files;

[0235] In response to a selection operation of a user selecting a data element in the data file, the data element selected by the user is determined to be a target data element.

[0236] In this solution, the data elements selected by the user can be regarded as data elements that need to be counted. Therefore, using the data elements selected by the user as target data elements can improve the accuracy of determining the target data elements, thereby improving the accuracy of generating path information.

[0237] In one embodiment of the present disclosure, the path information generating module 504 is specifically used to:

[0238] Combining the first tag included in the tag pair and the target data element to obtain initial path information;

[0239] Displaying the initial path information;

[0240] Obtaining adjustment information input by a user for the initial path information;

[0241] The initial path information is adjusted according to the adjustment information to obtain the path information of the target data element.

[0242] As can be seen from the above, when the solution provided by the embodiment of the present disclosure is applied to generate path information, after obtaining the initial path information that is a combination of the first label in the label pair and the target number element, the initial path information is displayed for the user to verify whether the initial path information is correct, and when the adjustment information input by the user is obtained, the initial path information is adjusted, which can improve the accuracy of the generated path information.

[0243] In one embodiment of the present disclosure, the path information generating module 504 is specifically used to:

[0244] Combining the first tag included in the tag pair and the target data element to obtain initial path information;

[0245] Parsing the data file according to the initial path information;

[0246] Detecting whether the data element included in the parsing result is the target data element;

[0247] If yes, it is determined that the initial path information is the path information of the target data element.

[0248] It can be seen from the above that when the solution provided by the embodiment of the present disclosure is used to generate path information, the data file is parsed according to the initial path information. By detecting whether the data elements contained in the parsing results are the target data elements, it is possible to accurately test whether the initial path information is the path information of the target data elements. Therefore, the path information generation solution provided by the embodiment of the present disclosure can improve the accuracy of the generated path information.

[0249] In the technical solution of the present disclosure, the user information recorded in the data files is all authorized information, and the collection, storage, use, processing, transmission, provision and disclosure of user information are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0250] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0251] In one embodiment of the present disclosure, an electronic device is provided, including:

[0252] at least one processor; and

[0253] a memory communicatively connected to the at least one processor; wherein,

[0254] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute any path information generating method in the aforementioned method embodiment.

[0255] In one embodiment of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute any path information generating method in the aforementioned method embodiments.

[0256] In one embodiment of the present disclosure, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the computer program implements any path information generating method in the aforementioned method embodiments.

[0257] Figure 7 A schematic block diagram of an example electronic device 700 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0258] like Figure 7 As shown, the device 700 includes a computing unit 701, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 702 or a computer program loaded from a storage unit 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the device 700 can also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0259] A number of components in the device 700 are connected to the I / O interface 705, including: an input unit 706, such as a keyboard, a mouse, etc.; an output unit 707, such as various types of displays, speakers, etc.; a storage unit 708, such as a disk, an optical disk, etc.; and a communication unit 709, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 709 allows the device 700 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0260] The computing unit 701 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 701 performs the various methods and processes described above, such as the path information generation method. For example, in some embodiments, the path information generation method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 700 via the ROM 702 and / or the communication unit 709. When the computer program is loaded into the RAM 703 and executed by the computing unit 701, one or more steps of the path information generation method described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to perform the path information generation method in any other appropriate manner (e.g., by means of firmware).

[0261] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0262] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0263] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0264] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0265] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0266] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0267] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0268] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A method for generating path information, comprising: Determine a target data element to generate path information in a data file, wherein the data elements in the data file are stored in layers, a start tag is stored at the head of each layer of data, and an end tag is stored at the tail, and a data element is a basic unit for recording data. Each layer in the data file is divided into a data range according to a predefined rule, and data belonging to a data range constitutes a layer of data; Acquire, from the data file, a first tag located before the target data element and a second tag located after the target data element; Pairing the obtained first tag and second tag to obtain a tag pair, wherein a tag pair includes a start tag in the first tag and an end tag in the second tag, the start tag and the end tag in the tag pair are tags of data at the same level, the first tag includes a first start tag and a first end tag, and the second tag includes a second start tag and a second end tag; The first tag included in the tag pair and the target data element are combined to obtain path information of the target data element.

2. The method according to claim 1, wherein: The acquiring, from the data file, a first tag located before the target data element and a second tag located after the target data element comprises: From the data file, a first start tag and a first end tag located before the target data element are obtained, and a second start tag and a second end tag located after the target data element are obtained.

3. The method according to claim 2, wherein: The step of pairing the first tag and the second tag to obtain a matching tag pair includes: Pairing the first start tag with the first end tag to obtain a first remaining tag that is not paired between the first start tag and the first end tag; Pairing the second start tag with the second end tag to obtain a second remaining tag that is not paired between the second start tag and the second end tag; The first remaining label and the second remaining label are paired to obtain a label pair.

4. The method according to claim 1, wherein: The acquiring, from the data file, a first tag located before the target data element and a second tag located after the target data element comprises: From the data file, obtain a first start tag located before the target data element, and obtain a second end tag located after the target data element; The step of pairing the first tag and the second tag obtained to obtain a tag pair includes: The first start tag and the second end tag are paired to obtain a tag pair.

5. The method according to any one of claims 1 to 4, further comprising: Locating a first tag included in the path information in the data file; Based on the positioning result, determining the target level name of the target level data to which the target data element belongs; Based on the target level name, determine the sibling level data of the target level data; According to the sibling-level data, the sequence number of the target-level data is determined as the path additional information corresponding to the first label.

6. The method according to claim 5, wherein: The step of determining the sibling hierarchical data of the target hierarchical data based on the target hierarchical name includes: Searching for second-level data that is at the same level as the first-level data and is located before and adjacent to the first-level data, wherein the initial value of the first-level data is the target-level data; Determining whether the data level name of the second level data is the target level name; If yes, determine that the second-level data is the sibling level data of the first-level data, and update the first-level data to the second-level data, and return to the step of searching for the second-level data that is at the same level as the first-level data and is located before and adjacent to the first-level data.

7. The method according to claim 6, wherein: The determining the sequence number of the target level data according to the sibling level data includes: Obtain the number of sibling level data; Based on the obtained quantity, a sequence number of the target level data is determined.

8. The method according to claim 7, wherein: The step of determining the sequence number of the target level data based on the obtained quantity includes: The sequence number of the target level data is determined to be the obtained number plus 1.

9. The method according to claim 5, wherein: The step of determining the sibling hierarchical data of the target hierarchical data based on the target hierarchical name includes: The data file is traversed to determine brother level data whose level name is the target level name except the target level data.

10. The method according to claim 9, wherein: The determining the sequence number of the target level data according to the sibling level data includes: Obtaining the location of the target level data and the location of the sibling level data; According to the arrangement order of the obtained positions, the sequence number of the target level data is determined.

11. The method according to any one of claims 1 to 4, wherein: The target data element of the path information to be generated in the determined data file includes: Display data files; In response to a selection operation of a user selecting a data element in the data file, the data element selected by the user is determined to be a target data element.

12. The method according to any one of claims 1 to 4, wherein: The combining the first tag included in the tag pair and the target data element to obtain the path information of the target data element includes: Combine the first tag included in the tag pair and the target data element to obtain initial path information; Displaying the initial path information; Obtaining adjustment information input by a user for the initial path information; The initial path information is adjusted according to the adjustment information to obtain the path information of the target data element.

13. The method according to any one of claims 1 to 4, wherein: The combining the first tag included in the tag pair and the target data element to obtain the path information of the target data element includes: Combining the first tag included in the tag pair and the target data element to obtain initial path information; Parsing the data file according to the initial path information; Detecting whether the data element included in the parsing result is the target data element; If yes, it is determined that the initial path information is the path information of the target data element.

14. A path information generating device, comprising: An element determination module is used to determine a target data element in a data file to generate path information, wherein the data elements in the data file are stored in layers, a start tag is stored at the head of each layer of data, and an end tag is stored at the tail, and a data element is a basic unit for recording data. Each layer in the data file is divided into a data range according to a predetermined rule, and data belonging to a data range constitutes a layer of data; A label acquisition module, used for acquiring a first label located before the target data element and a second label located after the target data element from the data file; a tag pairing module, used to pair the acquired first tag and second tag to obtain a tag pair, wherein a tag pair includes a start tag in the first tag and an end tag in the second tag, the start tag and the end tag in the tag pair are tags of data at the same level, the first tag includes a first start tag and a first end tag, and the second tag includes a second start tag and a second end tag; The path information generating module is used to combine the first tag included in the tag pair and the target data element to obtain the path information of the target data element.

15. The device according to claim 14, wherein: The label acquisition module is specifically used for: From the data file, a first start tag and a first end tag located before the target data element are obtained, and a second start tag and a second end tag located after the target data element are obtained.

16. The device according to claim 15, wherein: The tag pairing module is specifically used for: Pairing the first start tag with the first end tag to obtain a first remaining tag that is not paired between the first start tag and the first end tag; Pairing the second start tag with the second end tag to obtain a second remaining tag that is not paired between the second start tag and the second end tag; The first remaining label and the second remaining label are paired to obtain a label pair.

17. The device according to claim 14, wherein: The label acquisition module is specifically used for: From the data file, obtain a first start tag located before the target data element, and obtain a second end tag located after the target data element; The tag pairing module is specifically used for: The first start tag and the second end tag are paired to obtain a tag pair.

18. The apparatus according to any one of claims 14 to 17, further comprising: A label positioning module, used for locating a first label included in the path information in the data file; A name determination module, used to determine the target level name of the target level data to which the target data element belongs based on the positioning result; A sibling determination module, used for determining the sibling hierarchical data of the target hierarchical data based on the target hierarchical name; The additional information generating module is used to determine the sequence number of the target level data according to the brother level data as the path additional information corresponding to the first label.

19. The device according to claim 18, wherein: The brother determination module includes: A data search submodule, used to search for second-level data that is at the same level as the first-level data and is located before and adjacent to the first-level data, wherein the initial value of the first-level data is the target-level data; A name determination submodule, used to determine whether the data level name of the second level data is the target level name, and if so, trigger a data determination submodule; The data determination submodule is used to determine that the second-level data is the sibling-level data of the first-level data, and update the first-level data to the second-level data, thereby triggering the data search submodule.

20. The device according to claim 19, wherein The additional information generating module comprises: A quantity obtaining submodule is used to obtain the quantity of the brother level data; The sequence number determination submodule is used to determine the sequence number of the target level data based on the obtained quantity.

21. The device according to claim 20, wherein: The sequence number determination submodule is specifically used for: The sequence number of the target level data is determined to be the obtained number plus 1.

22. The device according to claim 18, wherein The brother determination module is specifically used for: The data file is traversed to determine brother level data whose level name is the target level name except the target level data.

23. The device according to claim 22, wherein: The additional information generating module is specifically used for: Obtaining the location of the target level data and the location of the sibling level data; According to the arrangement order of the obtained positions, the sequence number of the target level data is determined.

24. The device according to any one of claims 14 to 17, wherein: The element determination module is specifically used for: Display data files; In response to a selection operation of a user selecting a data element in the data file, the data element selected by the user is determined to be a target data element.

25. The device according to any one of claims 14 to 17, wherein: The path information generation module is specifically used for: Combining the first tag included in the tag pair and the target data element to obtain initial path information; Displaying the initial path information; Obtaining adjustment information input by a user for the initial path information; The initial path information is adjusted according to the adjustment information to obtain the path information of the target data element.

26. The device according to any one of claims 14 to 17, wherein: The path information generation module is specifically used for: Combining the first tag included in the tag pair and the target data element to obtain initial path information; Parsing the data file according to the initial path information; Detecting whether the data element included in the parsing result is the target data element; If yes, it is determined that the initial path information is the path information of the target data element.

27. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 13.

28. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-13.

29. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 13.

Citation Information

Patent Citations

  • Method and device for compressing, decompressing and inquiring documents

    CN103186611A

  • Data processing method and device, electronic equipment and readable storage medium

    CN113900650A