Index model construction method and device, computer equipment and storage medium

By textual analysis of the indicator description information entered by the user and generating an indicator model, the cold start problem in the construction of the indicator system in the platform management software is solved, and a flexible and convenient indicator library construction is achieved.

CN119990843APending Publication Date: 2025-05-13CONTEMPORARY AMPEREX FUTURE ENERGY RES INST (SHANGHAI) LTD +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202311501554.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-10
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

When building an indicator system for platform management software, developers often face the problem of "cold start", lack of data accumulation and awareness of indicator-related data, making it difficult to establish an effective indicator model.

Method used

By analyzing the pending text entered by the user that contains the metric description information, text parsing results are generated, and an indicator model is established based on these results, without relying on historical data or business data.

Benefits of technology

It realizes the flexibly and convenient construction of indicator models without index-related data accumulation, helping enterprises to establish indicator databases from scratch, and avoids the problem of cold start.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119990843A_ABST
    Figure CN119990843A_ABST
Patent Text Reader

Abstract

The invention provides an index model construction method and device, computer equipment and a storage medium, and is suitable for the technical field of computers.The method comprises the steps that a to-be-processed text containing index description information is analyzed, and a text analysis result is obtained; and establishing an index model based on the text analysis result, wherein the index model is used for constructing indexes. According to the method and the device, the index library does not need to depend on any historical index data or business data when the index library is constructed, so that the cold start problem of an enterprise business platform when an index system is constructed can be avoided; the enterprise business platform can be helped to establish the index library from zero based on the text content only by relying on the index description information input by the user, which is more flexible, free and convenient.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of computer technology, and in particular, relates to a method, device, computer equipment and storage medium for constructing an indicator model. Background Art

[0002] An indicator is a standard or method used to define, evaluate and describe a specific thing. For example, the number of new users, the cumulative number of users, and the user activity rate are indicators for measuring user development. Therefore, for an enterprise's data analysis platform management software, it is extremely important to build an indicator model for analyzing a specific indicator in the platform management software.

[0003] However, creating an indicator library has high requirements for program developers. Program developers need to have a certain amount of data accumulation and a deep understanding of the knowledge related to the indicator in order to manually complete the creation of the indicator model. Therefore, program developers often face the problem of "cold start" when creating an indicator library for platform management software. The so-called "cold start" means that the developer does not have the data accumulation and knowledge related to the indicator, and there is no historical data related to the indicator to assist in establishing the indicator model, which in turn causes technical problems that make it difficult to complete the construction of the indicator system in the platform management software. Summary of the invention

[0004] The embodiments of the present application provide a method, apparatus, computer equipment and storage medium for constructing an indicator model, which can solve the current technical problem that it is difficult to establish an indicator system for platform management software without the accumulation of indicator-related data.

[0005] In a first aspect, an embodiment of the present application provides a method for constructing an indicator model, comprising:

[0006] Parse the text to be processed containing indicator description information to obtain the text parsing result;

[0007] An indicator model is established based on the text parsing result, and the indicator model is used to construct an indicator library.

[0008] In the embodiment of the present application, the cold start problem of the business platform can be avoided. When building the indicator library, there is no need to use any historical data or business data. The analysis can be started from the text content of the indicator description information itself. There is no need to rely on historical data accumulation. The indicator model can be built based on the indicator description information input by the user, thereby helping enterprises to build an indicator library from scratch based on text content, which is more flexible, free and convenient.

[0009] In some embodiments, the parsing of the to-be-processed text containing the indicator description information to obtain the text parsing result includes:

[0010] The text to be processed containing the indicator description information is parsed so as to convert the text to be processed into different indicator elements to obtain a text parsing result.

[0011] In an embodiment of the present application, the content input by the user is parsed so that the indicator description information is divided into different indicator elements, which helps the computer system to more correctly analyze the indicator meaning of the text to be processed.

[0012] In some embodiments, the text to be processed containing the indicator description information is parsed to convert the text to be processed into different indicator elements to obtain a text parsing result, and the text parsing result includes:

[0013] Performing word segmentation on the text to be processed containing the indicator description information to obtain a word segmentation result;

[0014] The word segmentation results are divided into different index elements according to semantic types to obtain text parsing results.

[0015] In an embodiment of the present application, the natural language input by the user to represent the indicator description is segmented and semantically analyzed, and the analysis results are divided into different indicator elements, which helps the computer system to more correctly analyze the indicator meaning of the text to be processed and can improve the accuracy of the subsequent establishment of the indicator model.

[0016] In some embodiments, the parsing of the to-be-processed text containing the indicator description information so as to convert the to-be-processed text into different indicator elements to obtain the text parsing result includes:

[0017] Convert the text to be processed containing the indicator description information into a target vector of a preset dimension;

[0018] Decoding the target vector to generate a word vector sequence;

[0019] The word vector sequence is matched with the indicator type in the preset module vocabulary to obtain the indicator elements of successful matching and obtain the text parsing result.

[0020] In the embodiment of the present application, machine translation of the content representing the indicator description input by the user can eliminate the barriers between human language and computer language and improve the accuracy of the subsequent establishment of the indicator model.

[0021] In some embodiments, establishing an indicator model based on the text parsing result includes:

[0022] An indicator model is established based on the indicator elements and the text parsing results.

[0023] In the embodiment of the present application, establishing an indicator model based on the indicator elements and the text analysis results is conducive to secondary expansion and utilization, and can then be better utilized by the enterprise platform to complete the construction of the indicator library.

[0024] In some embodiments, establishing an indicator model based on the text parsing result includes:

[0025] Establish a tree model of atomic indicators based on various indicator elements;

[0026] An indicator model is established based on the tree model of the atomic indicators and the text parsing result.

[0027] In an embodiment of the present application, when the text to be processed is a longer text containing multiple short sentences, a tree model of atomic indicators can be established for each short sentence based on various indicator elements. Then, for the purpose of merging the short sentences to restore the original long text, the tree models of the various atomic indicators are merged into an indicator model to represent the indicator model of the longer text, so that the present solution can better process and analyze application scenarios of more complex longer texts.

[0028] In some embodiments, the step of establishing a tree model of atomic indicators based on various indicator elements includes:

[0029] Determine the participle content corresponding to the index elements;

[0030] Acquire a first logical relationship between each indicator element based on the text analysis result;

[0031] Determine the relationship between the tree nodes of the tree model of the atomic indicator based on the first logical relationship, so that the tree model includes tree nodes of different types;

[0032] Assigning the word segmentation content to a tree node of a corresponding type;

[0033] The index model is established based on the tree model of the atomic index and the text parsing result, including:

[0034] Acquire a second logical relationship between different atomic indicators based on the text parsing result;

[0035] An indicator model is established based on the tree model of the atomic indicators according to the second logical relationship.

[0036] In the embodiment of the present application, an indicator model is constructed based on a tree model of atomic indicators and text parsing results. Different indicator elements correspond to different tree nodes, and each word segmentation content is assigned to a different tree node, so that the finally obtained indicator model has a complete set of logic, which helps to connect the data of the relational database, can be expanded and utilized for the second time, and can then be better utilized by the enterprise platform to complete the construction of the indicator library.

[0037] In some embodiments, the establishing of the indicator model based on the indicator elements and the text parsing results includes:

[0038] Generate a mesh model of atomic indicators based on each indicator element, establish a mapping relationship between the indicator element and the mesh nodes of the mesh model, and determine the relationship between the mesh nodes based on the mapping relationship, so that the mesh model includes a plurality of mesh nodes of different types;

[0039] Obtaining the word segmentation content contained in the text parsing result;

[0040] An indicator model is established based on the mesh model of the atomic indicators and the word segmentation content, so that the indicator model has mesh nodes containing word segmentation content.

[0041] In an embodiment of the present application, an indicator model is constructed based on a mesh model of atomic indicators and text parsing results. Different indicator elements correspond to different mesh nodes, and each word segmentation content is assigned to a different mesh node, so that the final indicator model has a complete set of logic, which helps to connect the data of the relational database and can be used by the enterprise platform to complete the construction of the indicator library.

[0042] In some embodiments, the method further comprises:

[0043] Determine each historical indicator model stored in a preset storage area;

[0044] Comparing the indicator model with each historical indicator model respectively;

[0045] If there is no historical indicator model identical to the indicator model, the indicator model is saved in the preset storage area.

[0046] The embodiments of the present application can prevent enterprises from generating indicator models with duplicate meanings when establishing their own indicator libraries.

[0047] In some embodiments, before parsing the text to be processed containing the indicator description information to obtain the text parsing result, the method further includes:

[0048] Get the text to be processed that contains the indicator description information entered by the user.

[0049] The embodiment of the present application can process any text input by the user containing indicator description information, meet the user's various indicator requirements, and improve the user experience.

[0050] In some embodiments, after establishing the indicator model based on the indicator elements and the text parsing results, the method further includes:

[0051] A structured query language tree model is generated based on the indicator model and the text parsing result, wherein the structured query language tree model is used to obtain data related to the indicator description from a database.

[0052] In the embodiment of the present application, after the indicator model is successfully established, the indicator model can be expanded secondary to a SQL (Structured Query Language) model, and can be connected to the enterprise's database through the SQL model.

[0053] In some embodiments, generating a structured query language tree model based on the index model and the word segmentation result includes:

[0054] Matching the type and word segmentation content of the tree node with each metadata field of the target database to obtain a successfully matched target metadata field;

[0055] Obtain target metadata corresponding to the target metadata field;

[0056] A structured query language tree model is generated based on the target metadata field, the target metadata and the indicator model, wherein the structured query language tree model includes field nodes having target metadata and business relationships between the field nodes of the target metadata.

[0057] In an embodiment of the present application, the tree nodes of the indicator model are traversed, and the metadata fields corresponding to the tree nodes and the metadata corresponding to the metadata fields are searched in the database of the business developer, so as to directly obtain the data related to the indicator description from the database, so that the created indicator can be associated with the enterprise's database.

[0058] In some embodiments, the method further comprises:

[0059] Based on the business relationship and the text parsing result, a database query statement is generated, and the database statement is used to generate a data table related to the indicator description.

[0060] In the embodiment of the present application, the created indicators are associated with the database model to form query conditions that can be directly used for report filtering data, thereby helping enterprises to build and generate reports.

[0061] In some embodiments, the method further comprises:

[0062] Determining each historical structured query language tree model stored in the preset storage area;

[0063] Comparing the structured query language tree model with each historical structured query language tree model respectively;

[0064] If there is no historical structured query language tree model identical to the structured query language tree model, the structured query language tree model is saved in the preset storage area.

[0065] In the embodiment of the present application, it is possible to avoid enterprises from generating SQL models with duplicate meanings when establishing their own indicator libraries.

[0066] In a second aspect, the present application also proposes a device for constructing an indicator model, comprising:

[0067] The parsing module is used to parse the text to be processed containing the indicator description information to obtain the text parsing result;

[0068] A construction module is used to establish an indicator model based on the text parsing result, and the indicator model is used to construct an indicator library.

[0069] In a third aspect, the present application further proposes a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in the first aspect above when executing the computer program.

[0070] In a fourth aspect, the present application further proposes a storage medium, which is a computer-readable storage medium, and the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect above is implemented.

[0071] It can be understood that the beneficial effects of the second to fourth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0072] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0073] Figure 1 This is a flow chart of the first embodiment of the method for constructing the indicator model of the present application;

[0074] Figure 2 A schematic diagram of a tree model structure of an atomic indicator provided in an embodiment of the present application;

[0075] Figure 3 A schematic diagram of the structure of an indicator model provided in an embodiment of the present application;

[0076] Figure 4This is a flow chart of the second embodiment of the method for constructing the indicator model of the present application;

[0077] Figure 5 A schematic diagram of the structure of a structured query language tree model provided in one embodiment of the present application;

[0078] Figure 6 A schematic diagram of the structure of an embodiment of a computer device provided in this application;

[0079] Figure 7 It is a structural block diagram of the device for constructing the indicator model provided in this application. DETAILED DESCRIPTION

[0080] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by technicians in the technical field to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" in the specification and claims of this application and the above-mentioned figure descriptions and any variations thereof are intended to cover non-exclusive inclusions.

[0081] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0082] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0083] In the description of the embodiments of the present application, the term "plurality" refers to more than two (including two), unless otherwise clearly and specifically defined.

[0084] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0085] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0086] The inventor of the present application has noticed that, for an enterprise's data analysis platform management software, it is extremely important to construct an indicator model for analyzing a specific indicator in the platform management software.

[0087] However, creating an indicator library has high requirements for program developers who develop enterprise data analysis platform management software. Program developers need to have a certain amount of data accumulation and a deep accumulation of knowledge related to the indicator in order to manually complete the creation of the indicator model well. Therefore, program developers often face the problem of "cold start" when creating an indicator library for platform management software. The so-called "cold start" means that the developer does not have the data accumulation and cognition related to the indicator, and there is no historical data related to the indicator that can assist in establishing the indicator model, which makes it difficult for the enterprise's indicator system to be successfully constructed.

[0088] In order to solve the above technical problems, a technical solution of the method for constructing the indicator model of the present application is proposed; in order to illustrate the technical solution proposed in the embodiment of the present application, it is described below through a specific embodiment.

[0089] Embodiment 1

[0090] See also Figure 1 , Figure 1 This is a flow chart of a first embodiment of a method for constructing an indicator model provided by the present application. The method for constructing an indicator model in the embodiment of the present application can be applied to a computer device loaded with platform management software. The method for constructing an indicator model includes:

[0091] S10, obtaining the text to be processed that contains indicator description information input by the user;

[0092] In a specific implementation, a user may input a text to be processed containing indicator description information to a computer device, wherein the user may input the text to be processed through a designated text input interface of the platform management software when using a computer device loaded with the platform management software. Of course, the user may also use other terminal devices that are wired or wirelessly connected to the computer device loaded with the platform management software, and input the text to be processed through a designated page of such terminal device (such as a front-end input interface of a browser), so that the text to be processed is transmitted to the above-mentioned platform management software;

[0093] It is understandable that the user can be a program developer or an ordinary person who uses the platform management software. Since most users do not have the accumulation and cognition of data related to indicators, in this embodiment, the user can input a natural language text into the input interface of the platform management software, and complete the construction of the indicator system of the enterprise platform management software through the natural language text input by the user; among them, natural language refers to the language used by humans to communicate with each other in daily life, such as Chinese, English, Japanese, etc. Compared with various programming languages ​​or command languages, it is a human language.

[0094] The natural language expressed by the text to be processed is a description of what an indicator does. For example, this natural language text may be "the number of faults is greater than 100 and the fault type is general". The embodiment of the present application can process any text containing indicator description information input by the user, meet the user's various indicator requirements, and improve the user experience.

[0095] S20, parsing the text to be processed containing the indicator description information to obtain a text parsing result.

[0096] Specifically, this embodiment parses the text to be processed containing indicator description information to convert the text to be processed into different indicator elements, and obtains a text parsing result, which helps the computer system to more correctly analyze the indicator meaning of the text to be processed.

[0097] In one example, the text to be processed containing the indicator description information may be segmented to obtain a segmentation result; and then the segmentation result may be divided into different indicator elements according to the semantic type;

[0098] In a specific implementation, the natural language processing technology (NLP) can be used to perform word segmentation on the text to be processed containing the indicator description information. The word segmentation can decompose long texts such as phrases and sentences into data structures with words as units, which is convenient for subsequent processing and analysis: for example, the text to be processed "the number of faults is greater than 100 and the fault type is general" is segmented into word fragments of nouns (including: "number of faults", "100", "fault type", "general") and auxiliary words ("greater than", "and", "is") and other parts of speech, and the word segmentation results include "number of faults", "greater than", "100", "and", "fault type", "is", "general";

[0099] Then, the words in these word segmentation results are semantically analyzed so that the computer device can recognize the meaning of each word segmentation itself, and classify each word segmentation result according to semantics and type: for example, "number of faults", "100", and "fault type" belong to the entity word type of noun class, while "greater than", "and" and "is" belong to the auxiliary word type that plays a connecting role, and "generally" belongs to the effect word type of adjective class;

[0100] Finally, the word segmentation results of the above-mentioned computer-recognized meanings are divided into different indicator elements according to the semantic type. It can be understood that the role of the indicator is to "measure" the business, and the ultimate goal is to measure whether the business meets expectations and provide relevant solutions for subsequent business optimization work. Based on this, this embodiment disassembles the indicator description information so that one indicator includes three indicator elements, which are: dimension, summary method and measurement. "Dimension" and "measurement" can be understood as concepts in the field of data analysis. Among them, dimension can be understood as the data used to divide the data that the enterprise needs to analyze, and from what perspective to look at the data, such as date, region, etc. Measurement requires measuring data in different aggregation methods, and most of the cases are numbers, such as sales. Summarization method: It can be understood as various calculation methods in mathematics, or statistical methods in statistics, such as summation, average, count, deduplication count, maximum value, minimum value, etc.

[0101] Specifically, the above-mentioned word segmentation results are divided into three different indicator elements. For example, in the short sentence "the number of faults is greater than 100", "number of faults" is divided into the indicator element corresponding to the dimension, "greater than" is divided into the indicator element corresponding to the aggregation method, and "100" is divided into the indicator element corresponding to the measurement.

[0102] This application example can perform word segmentation and semantic analysis on the natural language input by the user to represent the indicator description, and divide the analysis results into different indicator elements, which helps the computer system to more correctly analyze the indicator meaning of the text to be processed and can improve the accuracy of the subsequent establishment of the indicator model.

[0103] In one example, the text to be processed containing indicator description information can be converted into a target vector of a preset dimension, and then the target vector can be decoded to generate a word vector sequence; each word vector in the word vector sequence is matched with the indicator type in the preset module vocabulary to obtain the indicator elements of successful matching and obtain the text parsing result.

[0104] Specifically, for example, if the text to be processed is a sentence such as "The number of faults of this wireless router is more than 100, and the system determines that the status of the wireless router is general", machine translation is performed on it to make it easy for the computer system to parse it.

[0105] First, the encoder of the machine translation device is used to convert the above text sentence into a target vector of fixed dimension, for example, into "the number of faults is greater than 100 and the fault type is general"; then the target vector is used as input, and the decoder of the machine translation device decodes it in a set manner, and then multiple word vector sequences ["number of faults", "greater than", "100", "and", "fault type", "general"] are obtained; finally, each word vector in the word vector sequence is matched with the indicator type in the preset module vocabulary. Specifically, a large-scale corpus is prepared in the preset module vocabulary as training data, and different corpuses correspond to different indicator types; for example, the corpus included in the "dimension" indicator type includes: "quantity", "type", "size", "speed" and other related corpus, while the corpus included in the "measurement" indicator type is the corpus related to numbers, and the corpus included in the "aggregation method" indicator type includes corpus representing relative relationships, such as "equal to", "greater than", "less than", "and", "or" and other corpus;

[0106] The final output of successful matching, "and", "greater than", and "is", are indicator elements with the indicator type of "aggregation method"; the output of successful matching, "fault quantity" and "fault type" are indicator elements with the indicator type of "dimension"; the output of successful matching, "100" and "general", are indicator elements with the indicator type of "measurement";

[0107] In the embodiment of the present application, machine translation of the content representing the indicator description input by the user can eliminate the barriers between human language and computer language and improve the accuracy of the subsequent establishment of the indicator model.

[0108] S30, establishing an indicator model based on the text parsing result, wherein the indicator model is used to construct an indicator library.

[0109] Specifically, the present embodiment can construct an indicator model corresponding to the indicator description information in step S10 according to a preset construction method for the indicator elements and the text parsing results. The preset construction method can be to establish the indicator model according to the tree structure construction rules, so that the indicator model includes multiple tree nodes, and establish an association relationship between the tree nodes, and the value of each tree node can be one of the above-mentioned participles. Of course, the preset construction method of the present embodiment can also be to establish the indicator model according to the mesh structure construction rules, so that the indicator model includes multiple mesh nodes, and establish an association relationship between the mesh nodes, and the value of each mesh node can be one of the above-mentioned participles.

[0110] In order to enable the indicator model constructed in this application to be further expanded and utilized on the basis of having the function of connecting the relational database, this embodiment can preferably establish the indicator model according to the tree structure construction rules:

[0111] Specifically, in one example, for a text such as "the number of faults is greater than 100 and the fault type is general" in the above example, where there are at least two short sentences (the short sentence "the number of faults is greater than 100" and the short sentence "the fault type is general") in the text to be processed (the presence of at least two short sentences indicates that the limiting conditions of the indicator are slightly more), the indicator model can be constructed in the following way:

[0112] Sub-step A1: First, establish a tree model of atomic indicators based on various indicator elements;

[0113] It is understandable that atomic indicators are the measurement values ​​based on a certain business process and are indicators that cannot be further disassembled in business definitions. The aggregation logic of indicators is defined through atomic indicators. This embodiment uses dimension, aggregation method and measurement as the three indicator elements that need to be included in atomic indicators. Based on these three indicator elements, a tree model of atomic indicators is constructed. Figure 2 In this embodiment, the parent node of the tree can represent the summary method of the indicator, the left child node of the tree represents the dimension of the indicator, and the right child node of the tree represents the measurement of the indicator.

[0114] For example, judging whether a network device exceeds the fault number threshold is a typical atomic indicator, and the corresponding short sentence is "the number of faults is greater than 100", where the dimension is to count the current number of faults, the measurement is 100, and the aggregation method is greater than. The atomic indicator of this embodiment is used to assist in defining a concept of an indicator, and there is no corresponding actual statistical demand.

[0115] Sub-step A2: Then, based on the tree model of the atomic metrics and the text parsing result, an index model is established, where the index element characterizes the type of the tree node, and the tree model of the atomic metrics and the index model include tree nodes with tokenized content and the relationships between the tree nodes.

[0116] For the case where there are at least two short sentences in the text to be processed, this example can continue to construct the index tree for the text parsing result obtained in step S20 according to the tree structure construction rules used when constructing the tree model of the atomic metrics in sub-step A1. That is, two tree models of atomic metrics can be constructed respectively for each short sentence parsing result, as Figure 3 shown.

[0117] For the first short sentence "The number of faults is greater than 100", the content of "greater than" can be used as the content of the parent node of the tree model of the first atomic metric, the content of "the number of faults" can be used as the content of the left child node of the tree model of the first atomic metric, and the content of "100" can be used as the content of the right child node of the tree model of the first atomic metric.

[0118] For the second short sentence "The fault type is general", the content of "is" can be used as the content of the parent node of the tree model of the second atomic metric, the content of "the fault type" can be used as the content of the left child node of the tree model of the second atomic metric, and the content of "general" can be used as the content of the right child node of the tree model of the second atomic metric.

[0119] For the word "and" in the text parsing result, which is a particle that plays the role of connecting at least two short sentences in the text to be processed, it can be used as the first parent node of the index model to be finally obtained. Then, the parent nodes of the tree model of the first atomic metric and the tree model of the second atomic metric can be used as the child nodes under the first parent node. The complete tree structure of the index model to be finally obtained can be referred to Figure 3 .

[0120] Based on the tree model of the atomic metrics and the text parsing result to construct the final index model, different index elements correspond to different tree nodes, and each tokenized content is assigned to different tree nodes, so that the finally obtained index model has a complete set of logic and can be expanded secondarily, and can thus be more flexibly used by the enterprise platform to complete the construction of the index library.

[0121] The beneficial effect of the first embodiment of the present application is that it can avoid the cold start problem that occurs when the enterprise business platform constructs the indicator system. The technical solution of the first embodiment does not need to rely on any historical indicator data or business data (such as a business relationship map) when constructing the indicator library, and can avoid analyzing the indicators in the conventional way of historical solutions. This solution starts with the text content of the indicator description information itself for analysis. When constructing the indicator library, there is no need to use any historical data or business data. The analysis starts from the text content of the indicator description information itself. It does not need to rely on historical data accumulation, but only needs to rely on the human natural language of the calcium-containing indicator description information input by the user to construct the indicator model, thereby helping enterprises to build an indicator library from scratch based on text content, which is more flexible, free and convenient.

[0122] Embodiment 2

[0123] Furthermore, if Figure 4 As shown, based on the above-mentioned embodiment 1, embodiment 2 is proposed to further illustrate the method for constructing the indicator model of this application.

[0124] In this embodiment, after step S30, the method further includes:

[0125] Step S40: generating a structured query language tree model based on the indicator model and the text parsing result, wherein the structured query language tree model is used to obtain data related to the indicator description from a database.

[0126] After the indicator model is successfully established, the embodiment of the present application can expand the indicator model to an SQL model for a second time, and can be connected to the enterprise's database through the SQL model;

[0127] Specifically, in one embodiment, the structured query language tree model may be generated in the following manner:

[0128] Sub-step B1, traversing each tree node of the indicator model in sub-step A2, including traversing the type of each tree node and traversing the word segmentation content on each tree node.

[0129] Sub-step B2, matching the type and word segmentation content of the tree node with each metadata field of the target database to obtain the successfully matched target metadata field;

[0130] Sub-step B3, obtaining target metadata corresponding to the target metadata field;

[0131] Sub-step B4, generating a structured query language tree model based on the target metadata field, the target metadata and the indicator model, wherein the structured query language tree model includes field nodes with target metadata and business relationships between field nodes of the target metadata.

[0132] It is understandable that the metadata fields (i.e., data columns) in the target database may correspond to the indicator elements of the indicator model, and the metadata (i.e., the values ​​of the data columns) of the metadata fields in the database may correspond to the word segmentation contents on the tree nodes of the indicator model;

[0133] For the semantic entities involved in each tree node of the indicator model, such as: number of faults, fault type, general, find the corresponding mapping data column (i.e., target metadata field) and column value definition (target metadata) in the target database of the enterprise's business development party, and replace other non-semantic entities in the tree nodes of the indicator model with corresponding logical symbols in the database technology concept, so that each tree node of the indicator model is converted into a field node with target metadata, such as Figure 5 As shown, a structured query language tree model is generated;

[0134] refer to Figure 5 , to model the index Figure 3 Replace the "and" in the parent node with the database's logical symbol "and", and change the indicator model Figure 3 Replace the "greater than" in the (aggregation method type) child node with the database logical symbol ">" and change the indicator model Figure 3 Replace the "is" in the (aggregation method type) subnode with the database logic symbol "="; Figure 3 Replace the "Number of Faults" of the (Dimension Type) child node with the database column name "faultNum" and change the indicator model Figure 3 Replace the "fault type" of the (dimension type) subnode with another column name "faultType" in the database; replace the "100 items" of the (measurement type) subnode with the numeric field "100" in the database, and replace the indicator model Figure 3 The "general" of the (measurement type) subnode is replaced with another field "L1" in a digital format of the database, that is, each tree node of the indicator model is replaced with a field of the target metadata, so that each tree node of the indicator model is converted into a field node with the target metadata, thereby making Figure 3 The index model is directly converted into Figure 5 like Figure 5 The structured query language tree model shown.

[0135] The example of the present application traverses the tree nodes of the indicator model, searches for metadata fields corresponding to the tree nodes of the indicator model and metadata corresponding to the metadata fields in the target database, so as to form a structured query language tree model, and the structured query language tree model facilitates directly obtaining data related to the indicator description from the database.

[0136] In a specific implementation, the computer system of this embodiment can automatically perform semantic analysis on the name and word segmentation content of the indicator model tree node type, and find metadata fields with similar semantic meanings in the target database for matching, without the need for manual database metadata field matching.

[0137] Specifically, the required target database metadata fields and data table structures can be determined based on the text parsing results and the data table structure. The data table structure can be a database table structure pre-set by the business developer. The data table structure can define a table's fields, types, keys, indexes and other database structure information. Then, the traversal results of each tree node of the indicator model in sub-step B1 are matched with the metadata fields of the target database, and the successfully matched target metadata fields and their corresponding target metadata are stored in the data set. Finally, the segmentation content on the tree nodes of the successfully matched indicator model is replaced by the target metadata in the data set, thereby obtaining Figure 5 The structured query language tree model shown.

[0138] The beneficial effect of the second embodiment of the present application is that the present application example traverses the tree nodes of the indicator model, searches for the metadata fields corresponding to the tree nodes and the metadata corresponding to the metadata fields in the target database of the business developer, and forms a structured query language tree model through the above-mentioned conversion method, and the structured query language tree model can directly obtain data related to the indicator description from the database, so that the created indicator can be associated with the enterprise's database, so that the construction method of the indicator model of the present application can be widely used in scenarios such as business intelligence and the digital transformation of traditional enterprises, helping enterprises to build their own indicator systems, and then helping enterprises to build and generate reports. Therefore, in one embodiment, the construction method of the indicator model of the present application also includes:

[0139] Step B5, based on the business relationship (of sub-step B4) and the text parsing result (of step S20), a database query statement is generated, wherein the database statement is used to generate a data table related to the indicator description.

[0140] It is understandable that the structured query language tree model (obtained in sub-step B4) is mapped and matched with the SQL structured query language, and then converted into a database query statement "SELECT object faultNum>100AND faultType=L1" that can operate the target database, thereby helping the enterprise to build and generate reports. In this embodiment, the target database includes but is not limited to relational databases such as MySQL, MongoDB, Elasticsearch, and SqlSever.

[0141] The embodiment of the present application associates the created indicators with the database model, and can form an SQL query statement that can be directly used to operate the target database through the text to be processed related to the indicator input by the user, that is, the query conditions of the database technology can be converted from the indicator description in natural language, helping enterprises to build and generate reports.

[0142] Embodiment 3

[0143] Furthermore, based on the above-mentioned Embodiment 1 and Embodiment 2, Embodiment 3 is proposed to further illustrate the method for constructing the indicator model of the present application.

[0144] In this embodiment, the method further includes:

[0145] Determine each historical indicator model stored in a preset storage area;

[0146] The indicator model is compared with each historical indicator model respectively; if there is no historical indicator model identical to the indicator model, the indicator model is saved to the preset storage area; if there is a historical indicator model identical to the indicator model, it means that there are indicators with duplicate meanings when the user uses the enterprise's platform management software to construct the indicator model, then the platform management software does not perform any processing on the indicator model (i.e., does not save it), and thus the embodiment of the present application avoids the generation of indicator models with duplicate meanings when the enterprise is building its own indicator library.

[0147] Alternatively, when there is a historical indicator model identical to the indicator model in the preset storage area, the computer device only puts the indicator model into the cache, and clears the indicator model in the cache when the user closes the platform management software.

[0148] Accordingly, in this embodiment, the method further includes:

[0149] Determining each historical structured query language tree model stored in the preset storage area;

[0150] The structured query language tree model is compared with each historical structured query language tree model respectively; if there is a historical structured query language tree model that is the same as the structured query language tree model, it means that there is a SQL model with repeated meaning when the user uses the enterprise's platform management software to build the structured query language tree model, and the structured query language tree model is not processed in any way (i.e., not saved); or, when there is a historical structured query language tree model that is the same as the structured query language tree model in the preset storage area, the computer device only puts the structured query language tree model into the cache, and when the user closes the platform management software, the structured query language tree model in the cache is cleared.

[0151] If there is no historical structured query language tree model identical to the structured query language tree model, the structured query language tree model is saved to the preset storage area, thereby preventing enterprises from generating SQL models with duplicate meanings when establishing their own indicator libraries.

[0152] In a specific application of this embodiment, the index model obtained in the first embodiment and the structured query language tree model obtained in the second embodiment are both stored in a preset storage area, and the preset storage area may be a specific storage area in the target database.

[0153] When a user adds a new indicator in the system, the technical solution of step embodiment 1 is executed again to obtain the newly added indicator model, and the technical solution of step embodiment 2 is executed again to obtain the newly added structured query language tree model;

[0154] The newly added indicator model is searched and compared with the indicator models stored in the preset storage area to determine whether the newly added indicator already exists in the indicator library. If so, the user is prompted that the newly added indicator may already exist in the library. If not, the user's newly added indicator and its indicator model are saved.

[0155] or

[0156] The newly added structured query language tree model is searched and compared with the structured query language tree model stored in the preset storage area to determine whether the newly added indicator already exists in the indicator library. If so, the user is prompted that the newly added indicator may already exist in the library. If not, the user's newly added indicator and its indicator model are saved.

[0157] This embodiment can prevent users from adding redundant indicators unconsciously, and prevent enterprises from generating indicators with duplicate meanings when establishing their own indicator libraries.

[0158] Embodiment 4

[0159] See also Figure 6 , Figure 6 A schematic diagram of the structure of an embodiment of a computer device for constructing an indicator model provided in the present application, wherein the computer device is a desktop computer or mobile terminal device loaded with platform management software.

[0160] like Figure 6 As shown, the computer device of this embodiment includes: at least one processor 10 ( Figure 6 Only one is shown), a memory 11, and a computer program 12 stored in the memory 11 and executable on the at least one processor 10, wherein the processor 10 implements the steps in the embodiment of the method for constructing the indicator model of the present application when executing the computer program 12.

[0161] Figure 6 The computer device shown may include, but is not limited to, a processor 10 and a memory 11. Those skilled in the art will appreciate that Figure 6 It is only an example of a computer device and does not constitute a limitation of the computer device. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, etc.

[0162] The processor 10 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0163] In some embodiments, the memory 11 may be an internal storage unit of the computer device 1, such as a hard disk or memory of the computer device 1. In other embodiments, the memory 11 may also be an external storage device of the computer device 1, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device 1. Further, the memory 11 may also include both an internal storage unit and an external storage device of the computer device 1. The memory 11 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program. The memory 11 may also be used to temporarily store data that has been output or is to be output.

[0164] Further, in one embodiment, if Figure 7 As shown, the present invention also provides a device for constructing an indicator model, comprising:

[0165] The parsing module 10 is used to parse the text to be processed containing the indicator description information to obtain the text parsing result;

[0166] The construction module 20 is used to establish an indicator model based on the text parsing result, and the indicator model is used to construct an indicator library.

[0167] It should be noted that the construction device of the indicator model can be understood as a virtual device, which can be used as an application in the platform management software of the above-mentioned computer device; the computer device calls the construction device of the indicator model through the processor, and then runs the specific implementation scheme of the above indicator model construction method embodiment. The information interaction, execution process and other contents between the above-mentioned devices / units are based on the same concept as the method embodiment of this application. Their specific functions and technical effects can be specifically referred to the method embodiment part.

[0168] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0169] An embodiment of the present application further provides a storage medium, which is a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.

[0170] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to a computer device, a recording medium, a computer memory, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), an electric carrier signal, a telecommunication signal, and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.

[0171] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0172] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A method for constructing an indicator model, characterized in that: The method comprises: Parse the text to be processed containing indicator description information to obtain the text parsing result; An indicator model is established based on the text parsing result, and the indicator model is used to construct an indicator library.

2. The method according to claim 1, characterized in that: The text to be processed containing the indicator description information is parsed to obtain the text parsing result, including: The text to be processed containing the indicator description information is parsed, and the text to be processed is converted into different indicator elements to obtain a text parsing result.

3. The method according to claim 2, characterized in that: The text to be processed containing the indicator description information is parsed, and the text to be processed is converted into different indicator elements to obtain a text parsing result, including: Performing word segmentation on the text to be processed containing the indicator description information to obtain a word segmentation result; The word segmentation results are divided into different index elements according to semantic types to obtain text parsing results.

4. The method according to claim 2, characterized in that: The text to be processed containing the indicator description information is parsed, and the text to be processed is converted into different indicator elements to obtain a text parsing result, including: Convert the text to be processed containing the indicator description information into a target vector of a preset dimension; Decoding the target vector to generate a word vector sequence; The word vector sequence is matched with the indicator type in the preset module vocabulary to obtain the indicator elements of successful matching and obtain the text parsing result.

5. The method according to claim 2, characterized in that: The establishing of the indicator model based on the text parsing result includes: An indicator model is established based on the indicator elements and the text parsing results.

6. The method according to claim 5, characterized in that The establishing of the indicator model based on the indicator elements and the text parsing result includes: Establish a tree model of atomic indicators based on various indicator elements; An indicator model is established based on the tree model of the atomic indicators and the text parsing result.

7. The method according to claim 6, characterized in that The tree model of atomic indicators is established based on various indicator elements, including: Determine the segmentation content corresponding to the indicator element; Acquire a first logical relationship between each indicator element based on the text analysis result; Determine the relationship between the tree nodes of the tree model of the atomic indicator based on the first logical relationship, so that the tree model includes tree nodes of different types; Assigning the word segmentation content to a tree node of a corresponding type; The index model is established based on the tree model of the atomic index and the text parsing result, including: Acquire a second logical relationship between different atomic indicators based on the text parsing result; An indicator model is established based on the tree model of the atomic indicators according to the second logical relationship.

8. The method according to claim 5, characterized in that The establishing of the indicator model based on the indicator elements and the text parsing result includes: Generate a mesh model of atomic indicators based on each indicator element, establish a mapping relationship between the indicator element and the mesh nodes of the mesh model, and determine the relationship between the mesh nodes based on the mapping relationship, so that the mesh model includes a plurality of mesh nodes of different types; Obtaining the word segmentation content contained in the text parsing result; An indicator model is established based on the mesh model of the atomic indicators and the word segmentation content, so that the indicator model has mesh nodes containing word segmentation content.

9. The method according to any one of claims 1 to 8, characterized in that: The method further comprises: Determine each historical indicator model stored in a preset storage area; Comparing the indicator model with each historical indicator model respectively; If there is no historical indicator model identical to the indicator model, the indicator model is saved in the preset storage area.

10. The method according to any one of claims 1 to 8, characterized in that: Before parsing the text to be processed containing the indicator description information and obtaining the text parsing result, the method further includes: Get the text to be processed that contains the indicator description information entered by the user.

11. The method according to any one of claims 5 to 8, characterized in that: After establishing the indicator model based on the indicator elements and the text parsing results, the method further includes: A structured query language tree model is generated based on the indicator model and the text parsing result, wherein the structured query language tree model is used to obtain data related to the indicator description from a database.

12. The method according to claim 11, characterized in that: The generating of the structured query language tree model based on the index model and the word segmentation result includes: Matching the type of the tree node and the word segmentation content with each metadata field of the target database to obtain a successfully matched target metadata field; Obtain target metadata corresponding to the target metadata field; A structured query language tree model is generated based on the target metadata field, the target metadata and the indicator model, wherein the structured query language tree model includes field nodes having target metadata and business relationships between the field nodes of the target metadata.

13. The method according to claim 12, characterized in that: The method further comprises: Based on the business relationship and the text parsing result, a database query statement is generated, and the database statement is used to generate a data table related to the indicator description.

14. The method according to claim 11, characterized in that: The method further comprises: Determining each historical structured query language tree model stored in the preset storage area; Comparing the structured query language tree model with each historical structured query language tree model respectively; If there is no historical structured query language tree model identical to the structured query language tree model, the structured query language tree model is saved in the preset storage area.

15. A device for constructing an indicator model, characterized in that: include: The parsing module is used to parse the text to be processed containing the indicator description information to obtain the text parsing result; A construction module is used to establish an indicator model based on the text parsing result, and the indicator model is used to construct an indicator library.

16. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 14 is implemented.

17. A storage medium, wherein the storage medium is a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 14 is implemented.

Citation Information

Cited By

  • Business index statistical method and device based on multiple levels, equipment and medium

    CN120873045A