CN118153620A - Counter data storage method, device and apparatus - Google Patents
Counter data storage method, device and apparatus Download PDFInfo
- Publication number
- CN118153620A CN118153620A CN202211550206.2A CN202211550206A CN118153620A CN 118153620 A CN118153620 A CN 118153620A CN 202211550206 A CN202211550206 A CN 202211550206A CN 118153620 A CN118153620 A CN 118153620A
- Authority
- CN
- China
- Prior art keywords
- counter
- information
- data
- index
- original
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 134
- 238000013500 data storage Methods 0.000 title claims description 65
- 238000004364 calculation method Methods 0.000 claims abstract description 257
- 238000004891 communication Methods 0.000 claims abstract description 126
- 238000012545 processing Methods 0.000 claims abstract description 87
- 230000008569 process Effects 0.000 claims description 56
- 238000012423 maintenance Methods 0.000 claims description 32
- 238000004590 computer program Methods 0.000 claims description 14
- 238000012544 monitoring process Methods 0.000 abstract description 11
- 238000011161 development Methods 0.000 abstract description 7
- 238000005192 partition Methods 0.000 description 11
- 238000010586 diagram Methods 0.000 description 6
- 238000012935 Averaging Methods 0.000 description 3
- 230000009471 action Effects 0.000 description 3
- 230000002776 aggregation Effects 0.000 description 3
- 238000004220 aggregation Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 2
- 239000007787 solid Substances 0.000 description 2
- 230000004931 aggregating effect Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000012937 correction Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012806 monitoring device Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06M—COUNTING MECHANISMS; COUNTING OF OBJECTS NOT OTHERWISE PROVIDED FOR
- G06M1/00—Design features of general application
- G06M1/08—Design features of general application for actuating the drive
- G06M1/10—Design features of general application for actuating the drive by electric or magnetic means
- G06M1/108—Design features of general application for actuating the drive by electric or magnetic means by electronic means
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2282—Tablespace storage structures; Management thereof
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Debugging And Monitoring (AREA)
Abstract
The embodiment of the invention provides a method, equipment and a device for storing counter data, which relate to the technical field of data processing and comprise the following steps: acquiring object information, counter information and relation information representing a corresponding relation between a counter table and a counter contained in the counter table of a communication object to be monitored; running a counter maintenance program to maintain a counter table based on the object information, the counter information, and the relationship information; under the condition that any index calculation formula is updated, an index calculation program is operated to obtain original data, and new index data is calculated based on the updated index calculation formula; the index data stored in the maintained counter table is updated based on the new index data. By applying the scheme provided by the embodiment of the invention, automatic batch operation can be realized through a program, the code development and manual operation are reduced, the working efficiency is improved, the development cost is reduced, and the influence on the monitoring of the running state of the wireless network is reduced.
Description
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method, an apparatus, and a device for storing counter data.
Background
In order to monitor the operation state of the wireless network, the monitoring device in the prior art may collect and calculate counter data of each counter of the communication objects representing the performance of the wireless network, and store the counter data into a counter table in a database, so that a network operator can determine the operation state of each communication object in the wireless network by querying the counter data, and further perform operation, maintenance and optimization work of the network. For example, the communication object may include a base station, a cell, and the like, and the counter data may include traffic data, bandwidth data, and the like. However, with version upgrade, daily operation and maintenance requirement change, operation formula error correction or update and the like of the wireless network equipment, the counter to be monitored is changed, so that network operation and maintenance personnel are required to manually develop, test, version upgrade and the like of the counter table, the time required for the process is often long, in the process, the monitoring equipment cannot automatically store the counter data into the counter table, the manual operation efficiency is low, the development cost is high, the real-time effectiveness cannot be realized, and the monitoring of the wireless network operation state is further influenced.
Disclosure of Invention
The embodiment of the invention aims to provide a counter data storage method, equipment and device, which are used for realizing automatic batch operation through a program, realizing real-time effectiveness, reducing code development and manual operation, improving working efficiency, reducing development cost and reducing influence on monitoring of the running state of a wireless network. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a method for storing counter data, where the method includes:
Obtaining object information of a communication object to be monitored, wherein the object information comprises: an object identification of the communication object and a table name of a counter table, the counter table comprising: an original counter table for recording counter data of an original counter of the communication object, and an index counter table for recording counter data of an index counter of the communication object, the original counter being for recording: the directly collected original data of the communication object is used for recording: index data obtained by calculation based on the value of the original counter;
obtaining counter information, wherein the counter information comprises: a counter identifier of the counter, an object identifier of a communication object to which the counter belongs, and an index calculation formula for calculating and obtaining index data;
Acquiring relationship information representing a correspondence relationship between a counter table and a counter contained in the counter table;
running a counter maintenance program to maintain a counter table based on the object information, counter information and relationship information;
under the condition that any index calculation formula is updated, an index calculation program is operated to obtain original data, and new index data is calculated based on the updated index calculation formula;
the index data stored in the maintained counter table is updated based on the new index data.
In a second aspect, an embodiment of the present invention provides a counter data storage device, including a memory, a transceiver, and a processor:
A memory for storing a computer program; a transceiver for transceiving data under control of the processor; a processor for reading the computer program in the memory and performing the following operations:
Obtaining object information of a communication object to be monitored, wherein the object information comprises: an object identification of the communication object and a table name of a counter table, the counter table comprising: an original counter table for recording counter data of an original counter of the communication object, and an index counter table for recording counter data of an index counter of the communication object, the original counter being for recording: the directly collected original data of the communication object is used for recording: index data obtained by calculation based on the value of the original counter;
obtaining counter information, wherein the counter information comprises: a counter identifier of the counter, an object identifier of a communication object to which the counter belongs, and an index calculation formula for calculating and obtaining index data;
Acquiring relationship information representing a correspondence relationship between a counter table and a counter contained in the counter table;
running a counter maintenance program to maintain a counter table based on the object information, counter information and relationship information;
under the condition that any index calculation formula is updated, an index calculation program is operated to obtain original data, and new index data is calculated based on the updated index calculation formula;
the index data stored in the maintained counter table is updated based on the new index data.
In a third aspect, an embodiment of the present invention provides a counter data storage device, applied to a counter data storage device, including:
The first acquisition module is used for acquiring object information of a communication object to be monitored, wherein the object information comprises: an object identification of the communication object and a table name of a counter table, the counter table comprising: an original counter table for recording counter data of an original counter of the communication object, and an index counter table for recording counter data of an index counter of the communication object, the original counter being for recording: the directly collected original data of the communication object is used for recording: index data obtained by calculation based on the value of the original counter;
the second acquisition module is used for acquiring counter information, wherein the counter information comprises: a counter identifier of the counter, an object identifier of a communication object to which the counter belongs, and an index calculation formula for calculating and obtaining index data;
the third acquisition module is used for acquiring relation information representing the corresponding relation between the counter table and the counter contained in the counter table;
the first maintenance module is used for running a counter maintenance program and maintaining a counter table based on the object information, the counter information and the relation information;
The calculation module is used for running an index calculation program under the condition that any index calculation formula is updated, acquiring original data, and calculating new index data based on the updated index calculation formula;
And a first updating module for updating the index data stored in the maintained counter table based on the new index data.
In a fourth aspect, embodiments of the present invention provide a computer-readable storage medium having a computer program stored therein, which when executed by a processor, implements the method steps of any of the first aspects described above.
In a fifth aspect, embodiments of the present invention also provide a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method steps of any of the first aspects described above.
The embodiment of the invention has the beneficial effects that:
By applying the counter data storage method provided by the embodiment of the invention, the counter table is maintained by acquiring the object information of the communication object to be monitored, the counter information and the relation information representing the corresponding relation between the counter table and the counter contained in the counter table. And under the condition that any index calculation formula is changed, acquiring original data, calculating new index data based on the updated index calculation formula, updating index data stored in a maintained counter table based on the new index data, and completing data storage of the counter. The equipment recorded with the counter table can automatically complete the maintenance of the counter table, so that the maintenance is not needed to be manually performed, and the maintenance speed of the counter table is improved. Meanwhile, under the condition of updating an index calculation formula, the process of acquiring the original data, obtaining the new index data and updating the index data in the counter table can be completed by the equipment, so that the labor cost and the time for completing the data storage of the counter are further reduced, and the influence on the monitoring of the running state of the wireless network is reduced.
In addition, under the condition that a plurality of index calculation formulas are updated, new index data can be calculated at the same time and updated in a counter table, so that batch data processing and data storage are realized.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the invention, and other embodiments may be obtained according to these drawings to those skilled in the art.
Fig. 1 is a flowchart of a first counter data storage method according to an embodiment of the present invention;
FIG. 2 is a flowchart of a second method for storing counter data according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating a third method for storing counter data according to an embodiment of the present invention;
FIG. 4 is a flowchart of a fourth method for storing counter data according to an embodiment of the present invention;
FIG. 5 is a flow chart of a method for automatically calculating a storage process and timing tasks for dynamically creating metrics according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of a counter data storage device according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of a first counter data storage device according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a second counter data storage device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by the person skilled in the art based on the present invention are included in the scope of protection of the present invention.
In order to realize automatic batch operation through a program, take effect in real time, reduce code development and manual operation, improve working efficiency, reduce development cost and reduce the influence on monitoring of the running state of a wireless network, the embodiment of the invention provides a counter data storage method, equipment and a device.
Fig. 1 is a flowchart of a first counter data storage method according to an embodiment of the present invention. The method comprises the following steps S101-S106.
Step S101, object information of a communication object to be monitored is acquired.
Wherein the object information includes: the object identifier of the communication object and a table name of a counter table, the counter table including: an original counter table for recording counter data of an original counter of the communication object, and an index counter table for recording counter data of an index counter of the communication object, the original counter being for recording: directly collected raw data of the communication object, wherein the index counter is used for recording: and calculating the obtained index data based on the value of the original counter. The raw counter and the index counter are collectively referred to as a counter.
Specifically, the communication objects may be base stations or cells, but the levels of the base stations and the cells are different, and the communication objects of different levels can be distinguished by object identifiers. For example, the object identifier of the communication object may be CID (Communication Identifier, communication object identifier), and the base station may be defined as the communication object of the upper level of the cell: 3000000, while the CID of a cell can be defined as: 3000600.
In addition, the object information includes a table name of a counter table, the counter table includes an original counter table and an index counter table, the table name of the original counter table corresponding to the object identifier in the object information indicates counter data of an original counter of a communication object corresponding to the object identifier, the counter data is recorded in the original counter table, and the table name of the index counter table corresponding to the object identifier indicates: the counter data of the index counter of the communication object corresponding to the object identification is recorded in the index counter table. The communication object may record counter data of its original counter and index counter through a plurality of original counter tables and index counter tables, respectively.
In addition, the index data may include an RRC (Radio Resource Control ) connection establishment success rate, a MAC (MEDIA ACCESS Control, medium access Control layer) layer uplink block error rate, a QoS Flow (Quality of Service Flow ) establishment success rate, and a base station handover success rate between gnbs (generation nodebs, 5G base stations).
In one embodiment of the present invention, the object information of the cell further includes an object identifier of a previous communication object. For example, if the cell a is a cell within the coverage area of the base station a, the communication object of the upper level of the cell a is the base station a, and the object information of the cell a includes the object identifier of the base station a.
The object information may further include: a domain name identifier corresponding to the object identifier of the communication object, and a column name, which is a name of a column in which the domain name identifier is recorded in a counter table corresponding to the communication object. For example, the domain name identifier may be DN (Domain Name), and the DN of the base station a is defined as: "gnb= 10889254", the DN of cell a is defined as: "gnb=10889254, nrcellcfg (New Radio Cell Configuration, new air interface cell configuration) =1". In addition, the domain name identifier may be divided into a plurality of levels, and communication objects of different levels may be represented by domain name identifiers of different levels. For example, the value of the gNB in the above example is used as the first-level domain name identifier of the communication object, and the first-level column name of the column in which the first-level domain name identifier is recorded in the corresponding counter table is denoted as dn1; the value NRCELLCFG is used as the second-level domain name identifier of the communication object, the second-level column name of the column recording the second-level domain name identifier in the corresponding counter table is recorded as dn2, and so on, the domain name identifier of the next-level communication object of the cell can be recorded in the corresponding counter table, and the communication objects can be further distinguished.
The object information also includes the index column name and partition type. The index column name is composed of a start time of a counter of a communication object recorded in a counter table and a multi-stage column name. The counter data can be further summarized according to the preset period to obtain a statistical value in the preset period, which is convenient to view, and the data is recorded in the period counter table. Therefore, in the case where the table name is the table name of the cycle counter table, the object information further includes the partition type recording the identification of the preset cycle. For example, the partition types include M (minute partition), H (hour partition), D (day partition), W (Zhou Fenou), M (month partition), N (year partition), which respectively represent 15 minutes, one hour, one day, one week, one month, one year in a preset period.
In one embodiment of the present invention, the object information may be recorded in an object information table by using a database technology, and if the object information of the communication object to be monitored is updated, that is, the correspondence between the object identifier of the communication object and the table name of the counter table is updated, the device recording the counter table may automatically update the object information table by acquiring the object information. See tables 1 and 2 for details, which are not described in detail herein.
Step S102, obtaining counter information.
Wherein the counter information includes: the method comprises the steps of a counter identification of a counter, an object identification of a communication object to which the counter belongs, and an index calculation formula for calculating and obtaining index data.
Specifically, the counter has a counter identification so that the counter can be found by the counter identification. For the original counter, the counter identification in the counter information corresponds to the object identification of the communication object to indicate that the original data recorded by the original counter is directly acquired and the original data of the communication object, and the counter identification does not correspond to the index calculation formula. For the index counter, the counter identification in the counter information and the object identification of the communication object correspond to indicate that the index data recorded by the index counter are index data of the communication object, which are calculated based on the value of the original counter, and the specific calculation mode is represented by an index calculation formula formed by the counter identifications of one or more original counters. For example, according to an index calculation formula corresponding to the counter identifier of the index counter in the counter information, the specific value of the original counter represented by the counter identifier in the index calculation formula is calculated by means of addition, subtraction, multiplication, division and the like, so as to obtain index data recorded by the index counter.
In an embodiment of the present invention, the counter information further includes: processing rule information corresponding to each original counter, wherein the processing rule information represents: and under the condition that the value of the corresponding original counter is null, marking the original data corresponding to the original counter as null or 0.
Specifically, the value of the original counter may be empty, that is, the communication object to which the original counter belongs does not collect the corresponding original data. When calculating the index data according to the index calculation formula, if the value of the original counter contained in the index calculation formula is null, the original data corresponding to different original counters need to be marked as null or 0 due to different index counters so as to obtain correct index data. Therefore, in order to avoid errors in calculating the index data, it is necessary to specifically determine that the original data corresponding to the original counter is marked as a null value or 0 according to the processing rule information corresponding to each original counter. And, the processing rule corresponding to each original counter is set in advance, and different values can be configured for each original counter by direct calling.
In another embodiment of the present invention, the counter information further includes at least one of the following information: the method comprises the steps of a counter English name, a counter group identifier of a counter group to which a counter belongs, a counter type, a counter Chinese description, a counter data unit, a counter network type, a counter network element type, a counter data type, a counter time summarizing mode, a counter object summarizing mode, a counter creation time and remarks.
Wherein, the English name of the counter and the Chinese description of the counter represent specific information and application of the counter data recorded by the counter. In the case where a plurality of counters are used for recording the same kind of information, the plurality of counters may be divided into one counter group, and the counter identification corresponds to the counter group identification of the counter group to which the counter belongs through the counter information. The counter type indicates whether the counter identifies the corresponding counter as an original counter or an index counter. For example, if the counter is the original counter, the counter type is set to 0, and if the counter is the index counter, the counter type is set to 1. The counter data unit represents a data unit of counter data recorded by a counter. The counter network type indicates the network type to which the counter belongs. The counter network element type indicates the network element type to which the counter data recorded by the counter belongs. The counter data type indicates a data type of counter data recorded by the counter, for example, the counter data is numerical value type NUMBER, the counter data is character string type counter data is VARCHAR2 (character string). The above-mentioned counter time summary manner indicates a manner of performing time summary statistics according to a preset period, for example, counter data may be averaged or added in the preset period to obtain corresponding statistics values, which are respectively denoted as AVG (average) and SUM (SUM). The counter object aggregation method is a method of aggregating counter data of a plurality of communication objects to obtain counter data of a communication object of a previous stage. For example, if the counter data is averaged to obtain the counter data of the corresponding upper stage, the counter object aggregation system is referred to as AVG, and if the counter data is added to obtain the counter data of the corresponding upper stage, the counter object aggregation system is referred to as SUM. When the counter data needs to be collected in time and object at the same time, the object is collected first, that is, the counter data of the communication object of the previous stage is obtained, and then the counter data of the communication object of the previous stage is collected in time. The counter creation time described above represents a specific creation time of the counter. The remarks described above represent additional information in the counter information table.
In one embodiment of the present invention, the counter identifier, the object identifier of the communication object to which the counter belongs, and the index calculation formula may form a counter information table. Details can be found in tables 3 and 4, which are not described in detail herein.
In one embodiment of the present invention, the step S102 further includes steps A1-A4, which are not described in detail herein.
By applying the scheme provided by the embodiment of the invention, after the counter information is acquired, the counter information and the object identification in the object information are required to be checked, so that the counter information and the object information can correspond to each other, and errors in the process of maintaining the counter table are avoided.
In an embodiment of the present invention, the step S102 further includes steps B1-B2, which are not described in detail herein.
By applying the scheme provided by the embodiment of the invention, after the counter information is acquired, the counter identification in the index calculation formula and the counter identification in the counter information are required to be checked, so that the counter identification in the counter information can correspond to each other, and errors in calculating index data are avoided.
Step S103, relationship information indicating the correspondence between the counter table and the counter included in the counter table is acquired.
Specifically, the relationship information includes: the method comprises the following steps of table names of a counter table, a counter identifier and an object identifier of a communication object corresponding to the counter table. By acquiring the relationship information, the corresponding relationship between the table name of the counter table and the counter identifier of the counter can be obtained, and further the corresponding relationship between the counter table and the counter contained in the counter table is obtained, namely, the counter data of the corresponding counter is recorded in the counter table. In addition, the correspondence relationship of the object identification and the table name of the counter table indicates that the counter table is used to record counter data of the corresponding communication object.
In one embodiment of the present invention, the step S103 further includes steps C1-C2, which are not described in detail herein.
By applying the scheme provided by the embodiment of the invention, after the counter information and the relation information are acquired, whether the counter identification of the counter contained in the relation information corresponds to the counter identification in the counter information or not needs to be judged, so that errors in the process of maintaining the counter table are avoided.
In one embodiment of the present invention, the step S103 further includes steps D1-D2, which are not described in detail herein.
By applying the scheme provided by the embodiment of the invention, after the relation information is acquired, the table names of the counter tables contained in the object information and the table names contained in the relation information are required to be checked, so that the object information and the relation information can be corresponding, and errors in the process of maintaining the counter tables are avoided.
In one embodiment of the present invention, the step S103 further includes steps E1-E2, which are not described in detail herein.
By applying the scheme provided by the embodiment of the invention, after the relation information is acquired, whether the number of the counters represented by the relation information is larger than the preset number is also required to be judged, so that the configuration of the counters contained in the relation information is correct, and errors in the process of maintaining the counter table are avoided.
In one embodiment of the present invention, the relationship information further includes a counter group identifier of a counter group to which the counter belongs, a start counter identifier, a stop counter identifier, and a counter number. Wherein the number of counters represents the number of counters involved between the start counter identification and the end counter identification.
In one embodiment of the present invention, the table name, the counter group identifier, the object identifier, the start counter identifier, the end counter identifier, and the number of counters in the counter table may form a relational information table, and the counters included in different counter tables are recorded. Details can be found in tables 5 and 6, which are not described in detail herein.
In another embodiment of the present invention, column relation information may also be acquired, representing a correspondence between a table name of the counter table and a column name of a column included in the counter table. The above-mentioned column relation information includes: serial number, table name of the counter table, column name of the columns in the counter table. Specifically, according to the above-mentioned column relation information, a column relation information table may also be formed. Details may be found in table 7 and are not described in detail herein.
Step S104, running a counter maintenance program to maintain a counter table based on the object information, the counter information and the relation information.
Specifically, the object information, the counter information and the relationship information may be recorded in a configuration file, and the device for maintaining the counter table automatically generates the counter maintenance program by the configuration file including the table name, the domain name identifier, the counter identifier and the start time and the end time of the counter data of the counter corresponding to the counter table record. The counter maintenance program is composed of database sentences, so that the corresponding relation of table names, domain name identifiers and counter identifiers in the counter table is the same as the corresponding relation in the object information, the counter information and the relation information through the operation of the counter maintenance program, and the automatic maintenance of the counter table through the acquisition of the information is realized.
In addition, the counter data of the counter of the communication object with the same object identification is recorded in the same counter table, and the counter data of the counter corresponding to all the base stations is recorded in the same counter table, and the counter data of the counter corresponding to all the cells is recorded in the same counter table, because the object identification of the communication object with the same level is the same.
According to the object information, the counter information and the relation information, the corresponding object information table, counter information table and relation information table can be automatically maintained by the device through the object information maintenance program, the counter information maintenance program and the relation information maintenance program, so that the counter table is maintained. Details may be found in table 8 and are not described in detail herein.
In one embodiment of the present invention, the step 104 may be implemented by steps F1-F3, which are not described in detail herein.
By applying the scheme provided by the embodiment of the invention, the counter maintenance program is operated under the conditions of adding, modifying and deleting the counter, and the counter table is maintained in different modes. And the counter can be added, modified and deleted at the same time, and a corresponding counter maintenance mode is adopted.
Step S105, in the case of updating any index calculation formula, running the index calculation program to obtain the original data, and calculating new index data based on the updated index calculation formula.
Specifically, the index calculation formula of any index counter in the counter information is updated, and the calculation mode of the index data recorded by the index counter corresponding to the updated index calculation formula is changed, so that the index data recorded by the index counter needs to be recalculated by running an index calculation program. The device for calculating the index data inquires the object identification corresponding to the counter identification of the index counter corresponding to the updated index calculation formula in the relation information by running an index calculation generation program, assembles a storage process for calculating the index data according to the object identification, and generates a timing task to obtain the index calculation program. The corresponding storage process can be obtained through the object identifier according to the database statement set stored in advance, for example, the procedure name, the procedure start statement, the insert statement for assembling calculation index data, the call statement for assembling the update counter identifier, the procedure exception handling and ending statement, and the like are obtained through the object identifier. And (3) through running an index calculation program, acquiring the corresponding original data recorded by the original counter according to the updated index calculation formula and the original counter marks forming the index calculation formula, and calculating to obtain new index data. In addition, the case of updating any one of the above index calculation formulas includes a case of adding a new index calculation formula, which indicates that index data of a corresponding index counter needs to be calculated according to the new index calculation formula.
In an embodiment of the present invention, in the case where the counter information further includes processing rule information corresponding to each original counter, the step S105 may be implemented by the step G, which is not described in detail herein.
By applying the scheme provided by the embodiment of the invention, the corresponding processing rule information is configured for each original counter in advance, so that the original data corresponding to different original counters can be marked as null values or 0 under the condition that the original counter is null, and the accuracy of the index data calculated by an index calculation formula is ensured. In addition, as the processing rule information is configured in advance, each original counter does not need to be processed independently in the index data calculation process, and the processing efficiency is improved.
In one embodiment of the present invention, the step S105 may be implemented by the step H, which is not described in detail herein.
By applying the scheme provided by the embodiment of the invention, under the condition that the original counter serving as the divisor in the index calculation formula takes 0, the division in the index calculation formula is converted into multiplication, so that calculation errors can not occur in the calculation process of corresponding index data.
Step S106, updating the index data stored in the maintained counter table based on the new index data.
Specifically, the index data stored in the counter table is automatically updated through the obtained new index data, so that a user can timely obtain the numerical value of the new index data by inquiring the counter table. The method further comprises the step of filling new index data into a column of a counter identifier of the corresponding index counter with a column name in the counter table.
In one embodiment of the present invention, after the step S105, the calculation completion information table is further updated to record the time period for completion of calculation of each counter data. By searching the calculation completion time length in the calculation completion information table, whether the time length used for calculating the counter data is longer than the preset time length can be judged, and if the time length is longer than the preset time length, an error is determined to occur in the calculation process. See table 9 for details and are not described in detail herein.
In one embodiment of the present invention, the method further includes creating and updating a log information table for recording errors occurring in the process of maintaining the counter table and calculating the index data. See table 10 for details and are not described in detail herein.
Step A1, detecting whether the object identifier contained in the object information is the same as the object identifier contained in the counter information.
Specifically, it is required to detect whether the object identifier included in the object information is identical to the object identifier included in the counter information, so as to avoid that the object identifier of the communication object to which the counter in the counter table belongs is not in the object identifier included in the object information, so that the counter information cannot correspond to the object information. If the counter information and the object identifier in the object information are configured correctly, the subsequent steps can be continuously executed. If the object identification information is different, the object identification information indicates that the counter information or the object information is in error configuration, and the step A2 is executed.
And step A2, judging whether the object identification in the counter information is missing.
Specifically, when the object identifier included in the object information is different from the object identifier included in the counter information, it is also necessary to determine whether the object identifier in the counter information is missing, that is, whether the object identifier in the object information is configured in error or whether the object identifier in the counter information is configured in error, so as to modify the information. If the counter information is missing, the counter information configuration error is judged, and the step A3 is executed. If not, judging that the object information is wrongly configured, and executing the step A4.
And step A3, determining the configuration error of the counter information, and returning information representing the configuration error of the counter information to instruct a user to modify the counter information.
Specifically, after determining the configuration error of the counter information, information indicating the configuration error of the counter information is returned to instruct a user who provides the counter information to modify the counter information. In addition, after the user modifies the counter information, the modified counter information may be acquired, and it is detected again whether the object identifier in the counter information corresponds to the object identifier in the object information.
And step A4, determining the configuration error of the object information, and returning information representing the configuration error of the object information to instruct a user to modify the object information.
Specifically, after determining the object information configuration error, information indicating the object information configuration error is returned to instruct a user who provides the object information to modify the object information. In addition, after the user modifies the object information, the modified object information may be acquired, and it is detected again whether the object identifier in the object information corresponds to the object identifier in the counter information.
And step B1, detecting whether the counter identification of the original counter in the index calculation formula contained in the counter information is the same as the counter identification of the original counter contained in the counter information.
Specifically, it is required to detect whether the counter identifier of the original counter in the index calculation formula contained in the counter information is the same as the counter identifier of the original counter contained in the counter information, so as to avoid that the counter identifier of the original counter required in the index calculation formula is not in the counter identifier contained in the counter information, so that the index data cannot be calculated. If the counter identification is the same, the counter identification in the counter information corresponds to the counter identification in the index calculation formula, the counter information is correctly configured, and the subsequent steps can be executed. If the counter information is different, the counter identification in the counter information does not correspond to the counter identification in the index calculation formula, the counter information is wrongly configured, and the step B2 is executed.
And step B2, determining the configuration error of the counter information, and returning information representing the configuration error of the counter information to instruct a user to modify the counter information.
Specifically, after determining the configuration error of the counter information, information indicating the configuration error of the counter information is returned to instruct a user who provides the counter information to modify the counter information. In addition, after the user modifies the counter information, the modified counter information may be acquired, and it is detected again whether the counter identifier in the index calculation formula is the same as the counter identifier in the counter information.
Step C1, detecting whether the counter indicated by the relation information corresponds to the counter mark contained in the counter information.
Specifically, it is necessary to determine whether all the counter identifiers corresponding to the counters indicated in the relationship information are included in the counter information, so as to avoid that the counter identifiers included in the relationship information are not included in the counter information, and the counter information cannot correspond to the relationship information. If the counter identification configuration is correct, the counter information and the counter identification configuration in the relation information are indicated, and the subsequent steps can be continuously executed. If the counter identification information is different, the counter identification configuration error in the counter information or the relation information is indicated, and the step C2 is executed.
And step C2, if the relationship information or the counter information is not corresponding to the relationship information or the counter information, determining that the relationship information or the counter information is configured in error, and returning information representing the relationship information or the counter information is configured in error so as to instruct a user to modify the relationship information or the counter information.
Specifically, after the configuration error of the relationship information or the counter information is determined, information indicating the configuration error of the relationship information or the counter information is returned to instruct a user who provides the relationship information or the counter information to modify the relationship information or the counter information. In addition, after the user modifies the relationship information or the counter information, the modified relationship information or the counter information may be acquired, and whether the counter indicated in the relationship information corresponds to the counter identifier in the counter information may be detected again.
Step D1, detecting whether a counter table indicated by the relation information corresponds to a table name included in the object information.
Specifically, it is necessary to determine whether the counter table indicated in the relationship information corresponds to the table name included in the object information, so as to avoid that the table name included in the relationship information is not included in the object information, and the relationship information cannot correspond to the object information. If the table names in the object information and the relation information are correctly configured, the subsequent steps can be continuously executed. If not, the table name configuration error in the object information or the relationship information is indicated, and step D2 is executed.
And D2, if the relationship information or the object information is not corresponding to the relationship information or the object information, determining that the relationship information or the object information is configured in error, and returning information representing the relationship information or the object information is configured in error so as to instruct a user to modify the relationship information or the object information.
Specifically, after determining that the relationship information or object information is configured in error, information indicating that the relationship information or object information is configured in error is returned to instruct a user who provides the relationship information or object information to modify the relationship information or object information. In addition, after the user modifies the relationship information or the object information, the modified relationship information or the object information may be acquired, and whether the counter table indicated in the relationship information corresponds to the table name included in the object information may be detected again.
And E1, judging whether the number of the counters represented by the relation information is larger than a preset number.
Specifically, it is necessary to determine whether the number of counters included in each counter table included in the relationship information is greater than a preset number, so as to avoid that the number of counters included in the counter table in the relationship information exceeds the number of counters that can be included in the counter table. If not, the corresponding relation configuration of the counter table and the counter in the relation information is correct, and the subsequent steps can be continuously executed. If yes, the corresponding relation configuration error between the counter table and the counter in the relation information is indicated, and step E2 is executed. The preset number may be 450, and the specific number of the preset number is not limited herein.
Under the condition that the relation information also comprises a counter group identifier, a start counter identifier, a stop counter identifier and the number of counters, the counter group to which the counter contained in the counter table belongs and the number of the counter in the counter group identifier, the start counter identifier, the stop counter identifier and the number of the counter can be directly obtained according to the counter group identifier, the start counter identifier, the stop counter identifier and the number of the counters. By judging whether the number of the counters exceeds the preset number, it can be judged whether the number of the counters belonging to the same counter group contained in the counter table exceeds the preset number, so that the number of the counters of the same counter group does not exceed the preset number and can be contained in one counter table.
And E2, if yes, determining the configuration error of the relationship information, and returning information representing the configuration error of the relationship information to instruct a user to modify the relationship information.
Specifically, after determining the configuration error of the relationship information, information indicating the configuration error of the relationship information is returned to indicate that the relationship information is provided to the relationship information user to modify the relationship information. In addition, after the user modifies the relationship information, the modified relationship information may be obtained, and whether the number of counters represented by the relationship information is greater than a preset number may be detected again.
Step F1, when the counter in the counter information is increased, running a counter maintenance program, and based on the object information, the counter information and the relation information, increasing a column corresponding to the counter in a counter table.
Specifically, when the counter in the counter information is increased, it means that the counter table needs to record counter data of more counters, and a counter maintenance program needs to be run, and according to the object information, the counter information and the relationship information, a corresponding column is added to the corresponding counter table, and a counter identifier of the newly increased counter is used as a column name.
And F2, when the counter in the counter information is modified, running a counter maintenance program, and modifying a column corresponding to the counter in a counter table based on the object information, the counter information and the relation information.
Specifically, in the case of modifying the counter in the counter information, it means that the corresponding counter table needs to modify the information corresponding to the counter, and then the counter maintenance program needs to be run, and the column corresponding to the counter is modified in the corresponding counter table according to the object information, the counter information and the relationship information.
And F3, when the counter in the counter information is deleted, running a counter maintenance program, and deleting a column corresponding to the counter in a counter table based on the object information, the counter information and the relation information.
Specifically, when the counter in the counter information is deleted, it means that the counter table does not need to record the counter data of the counter, and a counter maintenance program needs to be run, and the column identified by the counter of the counter as the column name is deleted from the corresponding counter table based on the object information, the counter information, and the relationship information.
And G, under the condition that any index calculation formula is updated, running an index calculation program to obtain original data, and calculating to obtain new index data based on the updated index calculation formula and the corresponding processing rule information of the original counter.
Specifically, according to the updated index calculation formula, the original data recorded by the original counter corresponding to the original counter identifier forming the index calculation formula is required to be calculated, and because according to the processing rule information of the original counter, under the condition that the original counter is null, the original data corresponding to the original counter may be marked as a null value or may be marked as 0. Therefore, the processing rule information of the corresponding original counter needs to be considered in the process of calculating the index data, and new index data is calculated according to the updated index calculation formula and the processing rule information of the corresponding original counter. In addition, the use of different processing rule information for different raw counters can be achieved by means of a decode (instruction decode) function.
And step H, running an index calculation program under the condition that any index calculation formula is updated, obtaining original data, and calculating to obtain new index data based on the updated index calculation formula and the division calculation processing rule under the condition that the updated index calculation formula contains division.
Wherein, the dividing calculation processing rule is as follows: the division calculation contained in the index calculation formula is converted into multiplication calculation.
Specifically, the original data corresponding to the original counter may take a value of 0, and if the updated index calculation formula includes division, and the original data corresponding to the original counter as the divisor takes a value of 0, an error occurs in the process of calculating new index data according to the updated index calculation formula, so that calculation failure is caused. Therefore, by dividing the calculation processing rule, when the original data corresponding to the original counter as the divisor has a value of 0, the division calculation in the index calculation formula can be converted into the multiplication calculation, so that the calculation result is 0. In addition, the above-described process can be implemented by a decode function.
Referring to table 1, a structure table of an object information table is provided in an embodiment of the present invention.
TABLE 1
In table 1, the field names are column names of columns in the object information table, the field descriptions are specific meanings of the columns of data recorded in the object information table, the type and length represent the data type of the columns of data recorded in the object information table, the maximum length of recordable data, whether the blank is allowed to represent whether the columns of data recorded in the object information table can be null, and the default value is a default value of the columns of data recorded in the object information table.
Referring to table 2, a specific example table of an object information table is provided for an embodiment of the present invention.
TABLE 2
Columns with both rows empty in the table are omitted from table 2 above. As can be seen from table 2, the table name of the counter table of the communication object with object identification 3000000 is gnb_1, the column with column name dn1 in the counter table records the value of the first-level domain name identification GNB, and the index column name is: the begin_time@dn1 consists of the moment of starting recording and the first-stage column name, the partition type is D, the counter table is a period counter table taking one day as a preset period, and the object identifier corresponds to the communication object and is a base station, so that the second-stage domain name identifier, the second-stage column name and the object identifier of the last-stage communication object are absent. The counter table of the communication object whose object identifier is 3000600 has a table name GNBCELL _1, in which a column with a column name of dn1 records the value of the first-level domain name identifier gNB, a column with a column name of dn2 records the value of the second-level domain name identifier NRCELLCFG, and an index column name is: the begin_time@dn1@dn2 consists of the moment of starting recording, a first-level column name and a second-level column name, the partition type is D, the counter table is a period counter table taking one day as a preset period, the object identifier of the communication object of the upper level is 3000000, and the communication object corresponding to the object identifier is a cell. In addition, the table name of the original counter table of the communication object whose object identification is 3000000 may start with "gnb_1", and the table name of the index counter table may start with "gl_gnb_". Also, there may be a plurality of original counters and index counters of one communication object, for example, if the table name of the first original counter table is gnb_1, the table name of the second original counter table is gnb_2, and so on.
Referring to table 3, a structure table of a counter information table is provided in an embodiment of the present invention. The specific column names in table 3 have the same meanings as those in table 1.
TABLE 3 Table 3
Specifically, each row in the counter information table includes a counter identifier of a counter and an object identifier of the communication object to which the counter belongs. In the case that the counter is an index counter, the method further comprises a corresponding index calculation formula.
Referring to table 4, a specific example table of a counter information table is provided for an embodiment of the present invention.
TABLE 4 Table 4
As can be seen from table 4, the counter is denoted as r100—001, the counter group of the counter is used to count the RRC establishment request number of the communication object with object designation 3000000, since the counter type of the counter is set to 0, it can be known that the counter is the original counter, there is no index calculation formula, the data type of the recorded original data is u32, the data unit is the number of times, the time summarizing method and the object summarizing method are to directly add the counter data, and setting 0 to the processing rule information indicates that the counter data is recorded as 0 when the counter data is null. Similarly, the available counter is identified as the basic information of R100_002. The counter with the counter mark of R700_001 is used for counting the total times of RRC establishment, the counter is set to be 1, the counter is taken as an index counter, the data type of recorded index data is u33, the data unit is the times, the index calculation formula shows that the original data of the original counters with the counter marks of R100_001 and R100_002 are added to obtain index data, and the obtained index data is the index data of a communication object with the object mark of 3000000.
Referring to table 5, a structure table of a relationship information table is provided in an embodiment of the present invention. The specific column names in table 5 have the same meanings as those in table 1.
TABLE 5
Referring to table 6, a specific example table of a relationship information table is provided for an embodiment of the present invention.
TABLE 6
As can be seen from table 6, the counter table named gnb_1 contains a counter of which counter group is identified as R100, start counter is identified as 1, end counter is identified as 2, the number of counters involved therein is 2, and is used to record counter data of a communication object of which object identification is 3000000. Similarly, the counter table named gl_gnb_1 contains a counter of counter group designation R700, a start counter designation 1, a stop counter designation 3, and a counter of counter number 2 involved therein for recording counter data of a communication object of object designation 3000000.
Referring to table 7, a structure table of a list relationship information table is provided in an embodiment of the present invention. The specific column names in table 7 have the same meanings as those in table 1.
TABLE 7
Referring to table 8, a structure table of a counter table is provided in an embodiment of the present invention. The specific column names in table 8 have the same meanings as those in table 1.
TABLE 8
Specifically, when the communication object recorded in the counter table has multiple levels of domain name identifiers, the counter table further includes a first level of domain name identifier, a second level of domain name identifier, and the like. In the counter table, the counter identifications r100_01 and r100_02 of the fourth and fifth columns are exemplified, and the column names of the columns of the counter data of the counter corresponding to the counter recorded in the counter table are indicated as the counter identifications. The total number of columns in the counter table described above does not exceed one thousand. Therefore, in the case where the column of the counter data recorded in the counter table exceeds the total number, it is necessary to record the counter data of the counter with a new counter table.
Referring to table 9, a structure table of a calculation completion information table is provided for an embodiment of the present invention. The specific column names in table 9 have the same meanings as those in table 1.
TABLE 9
Referring to table 10, a structure table of a log information table is provided in an embodiment of the present invention. The specific column names in table 10 have the same meanings as those in table 1.
Table 10
By applying the scheme provided by the embodiment of the invention, the counter maintenance program is operated and the counter table is maintained by acquiring the object information, the counter information and the relation information which represent the corresponding relation between the counter table and the counter contained in the counter table of the communication object to be monitored. And under the condition that any index calculation formula is updated, running an index calculation program, acquiring original data, calculating new index data based on the updated index calculation formula, updating index data stored in a maintained counter table based on the new index data, and completing data storage of the counter. The equipment recorded with the counter table can automatically operate the counter maintenance program to complete the maintenance of the counter table, so that the maintenance is not needed to be performed manually, and the maintenance speed of the counter table is improved. Meanwhile, under the condition of updating an index calculation formula, the process of acquiring the original data, obtaining new index data and updating the index data in the counter table is completed by the equipment automatically running the index calculation program, so that the labor cost and the time for completing the data storage of the counter are further reduced, and the influence on the monitoring of the running state of the wireless network is reduced.
In addition, under the condition that a plurality of index calculation formulas are updated, new index data can be calculated at the same time and updated in a counter table, so that batch data processing and data storage are realized.
In addition, before running the counter maintenance program, problems possibly occurring in the process of the automatic equipment maintenance program are detected through various verification modes, and the object information, the counter information and the relation information are modified, so that maintenance failure caused by errors in the process of maintaining the counter table is avoided. Before the index calculation program is operated, the calculation mode is optimized by adopting the processing rule information and dividing calculation processing rules, so that calculation errors can be avoided in the index data calculation process. Because various possible problems are eliminated, the counter maintenance program and the index calculation program are adopted to realize the maintenance of the counter table and the calculation and update of the index data, so that the fault-tolerant processing is not required to be carried out through a processor in the process, the memory occupation is reduced, and the processing efficiency is improved.
Fig. 2 is a flowchart of a second counter data storage method according to an embodiment of the present invention. On the basis of fig. 1, step S102 is followed by step S107, and step S105 is implemented by step S105A.
Step S107, generating a database processing statement for realizing the above index calculation formula.
Specifically, the index data recorded by the index counter is calculated according to the index calculation formula through the original data recorded by the original counter, and a database processing statement corresponding to the index calculation formula can be automatically generated, so that the numerical value of the original data recorded by the original counter in the counter table can be obtained by calling the corresponding database processing statement, and the index data of the corresponding index counter can be calculated according to the obtained numerical value.
In one embodiment of the present invention, the index calculation formula and the database processing statement corresponding to the index calculation formula may be stored in an index formula table. Details may be found in table 11 and are not described in detail herein.
In one embodiment of the present invention, the database processing statement may be obtained through an index table to be processed and an index splitting table. Details can be found in tables 12 and 13, which are not described in detail herein.
Step S105A, when any index calculation formula is updated, running an index calculation program, extracting original data from the counter table based on a database processing statement corresponding to the updated index calculation formula included in the index calculation program, and calculating the extracted original data to obtain new index data.
Specifically, the index calculation program is generated by running the index generation program. The index calculation program further comprises a database processing statement for realizing an index calculation formula, the index calculation program and the database processing statement corresponding to the updated index calculation formula are operated, the original data of the original counter contained in the updated index calculation formula are extracted from a counter table for recording the counter data of the original counter, and the extracted original data are calculated based on the updated index calculation formula, so that new index data are obtained.
Referring to table 11, a structural table of an index formula table is provided in an embodiment of the present invention. The specific column names in table 11 have the same meaning as in table 1.
TABLE 11
Specifically, by running the counter maintenance program, when the counter information table is maintained, and every time a preset period of time passes, the counter information table and the index formula table are connected through the left outer connection by adopting the database technology to judge whether the counter identification and the index calculation formula in the index formula table completely correspond to the counter identification and the index calculation formula in the counter information table, so as to judge whether the index calculation formula is updated, and if so, the index calculation formula in the index formula table is updated. The preset time period may be 5 minutes, and the specific time is not limited. In addition, after updating the index calculation formula, the corresponding database processing statement needs to be updated, and when new index data is calculated, the corresponding index calculation formula and the database processing statement are searched for to calculate the index data by searching the counter identification of the index counter in the index formula table.
Referring to table 12, a structure table of an index table to be processed is provided in an embodiment of the present invention. The specific column names in table 12 have the same meanings as those in table 1.
Table 12
Referring to table 13, a structural table of an index resolution table is provided in an embodiment of the present invention. The specific column names in table 13 have the same meanings as those in table 1.
TABLE 13
Specifically, each time the index formula table passes a preset time period, whether each index counter identifier in the counter information table corresponds to a corresponding index calculation formula in the index formula table is detected. If the index table is not corresponding to the index table, updating the index table to be processed according to the counter identification and the updated index calculation formula, splitting the updated index calculation formula into an original counter identification, updating the index splitting table, generating a database processing statement corresponding to the index calculation formula according to the split original counter identification, and recording the database processing statement in the index formula table. The above process is self-complete by the running counter maintenance program for the device maintaining the counter table.
By applying the scheme provided by the embodiment of the invention, the database processing statement can be automatically assembled through the index calculation formula equipment, the original data is obtained through the database processing statement, and the new index data is calculated and updated, so that the whole counter data storage process can be completed by the equipment by itself without manual operation, and the possible error of manual operation is avoided.
Fig. 3 is a flowchart of a third method for storing counter data according to an embodiment of the present invention. On the basis of fig. 1, step S104 is followed by step S108, and step S106 is followed by step S109.
Step S108, running a counter maintenance program to maintain the communication object period counter table based on the object information, counter information and relation information.
Wherein, the preset periods corresponding to the different period counters are different, each period counter table records the statistic value of the counter of the communication object in the preset period, and the preset period comprises at least one of the following periods: 15 minutes, one hour, one day, one week, one month, one year.
Specifically, the table name of the period counter table and the preset period partition type representing the period counter table are recorded in the object information, and the statistic value of the counter of the communication object in the next preset period is obtained according to the statistic value of the counter of the communication object in the last preset period recorded in the previous period counter table. For example, the last preset period is 15 minutes, the counter data of the corresponding counter is obtained according to the counter table for recording the counter data, and the statistics value of the counter in 15 minutes is recorded in the period counter table of 15 minutes; the next preset period is one hour, and according to the counter data of the counter in the period counter table of 15 minutes, the statistical value of the counter in one hour is obtained and recorded in the period counter table of one hour.
In one embodiment of the present invention, the period counter table further records a valid count value corresponding to each statistic value, and each valid count value represents: the number of counter data counted in the process of calculating the corresponding statistic value. Details can be found in tables 14, 15, 16, 17, which are not described in detail herein.
By applying the scheme provided by the embodiment of the invention, the effective count value corresponding to each counter data is added into the period counter table, so that correct data can be obtained in the time summarizing calculation process, and the calculation efficiency is improved under the condition of ensuring the correct calculation.
Step S109, based on the updated index data, updates the statistical value recorded in the cycle counter table.
Specifically, after the updated index data is obtained, a statistical value of the corresponding index data is obtained through calculation, and the statistical value is calculated according to the period counter table. In addition, according to the statistics value of the counter in the last preset period recorded in the counter table of the last period, the statistics value of the counter in the next preset period is obtained until the updating of the counter table of all periods is completed.
Referring to table 14, a structure table of a cycle counter table is provided in an embodiment of the present invention. The specific column names in the table have the same meanings as in table 1.
TABLE 14
Specifically, the statistics value of the counter in the next preset period is calculated directly through the statistics value of the counter in the last preset period recorded in the counter table of the last period, and the calculation of the statistics value is wrong. For example, table 15 is an exemplary table of a cycle counter table with a preset cycle of 15 minutes provided in the embodiment of the present invention, and a counter value is recorded every 15 minutes, and after time is summarized, the counter value of each hour is obtained. As shown in table 16, the first example table of the cycle counter table for which the preset cycle is one hour is provided for the embodiment of the present invention. The summary in table 16 is average, and in the first hour, the counter takes the value: 2. 3, 1, the number of valid counter data is 3, so the counter value obtained by averaging for the first hour is: (2+3+1)/3=2. The counter value obtained by averaging in the second hour is similarly obtained. Similarly, if the time summary is performed on the period counter table with the preset period of 15 minutes for the two hours, the obtained result is that: (2+3+1+2+8)/5=3.2. If the time summary is performed on the two-hour time period by using a period counter table with a preset period of one hour, the obtained result is that: (2+5)/2=3.5. Although the calculation process of time summarizing is simpler and more convenient by adopting the period counter table with the preset period of one hour, the calculation result is wrong. Therefore, it is necessary to record a valid calculated value of each counter data in the cycle counter table so that no error occurs in the subsequent calculation. For example, table 17 is a second exemplary table of a cycle counter table with a preset cycle of one hour, and the summary manner is summation. When the period counter table shown in table 17 was used for averaging the two-hour period, the calculation results were: (6+10)/(2+3) =3.2, the correct calculation result can be obtained.
TABLE 15
Start time | End time | Counter value |
2022-08-01 00:00:00 | 2022-08-01 00:15:00 | 2 |
2022-08-01 00:15:00 | 2022-08-01 00:30:00 | 3 |
2022-08-01 00:30:00 | 2022-08-01 00:45:00 | |
2022-08-01 00:45:00 | 2022-08-01 01:00:00 | 1 |
2022-08-01 01:00:00 | 2022-08-01 01:15:00 | 2 |
2022-08-01 01:15:00 | 2022-08-01 01:30:00 | |
2022-08-01 01:30:00 | 2022-08-01 01:45:00 | |
2022-08-01 01:45:00 | 2022-08-01 02:00:00 | 8 |
Table 16
Start time | End time | Counter value |
2022-08-01 00:00:00 | 2022-08-01 01:00:00 | 2 |
2022-08-01 01:00:00 | 2022-08-01 02:00:00 | 5 |
TABLE 17
By applying the scheme provided by the embodiment of the invention, after the counter table is maintained, the period counter table is maintained so as to obtain the statistical value of the counter after time summarization, so that a user can obtain corresponding data more intuitively by inquiring the statistical value in the period counter table.
Fig. 4 is a flowchart of a fourth method for storing counter data according to an embodiment of the present invention. The above method includes the following steps S401 to S419.
In step S401, object information is acquired.
In step S402, counter information is acquired.
Step S403, determining whether the object identifier included in the object information is the same as the object identifier included in the counter information, if so, executing step S404, and if so, executing step S407.
Step S404, determining whether the object identifier included in the object information is missing, if yes, executing step 405, and if not, executing step 406.
In step S405, an object information configuration error is determined, and information indicating the object information configuration error is returned to instruct the user to modify the object information.
In step S406, a counter information configuration error is determined, and information indicating the counter information configuration error is returned to instruct the user to modify the counter information.
Step S407, detecting whether the original counter identifier in the index calculation formula included in the counter information is the same as the original counter identifier included in the counter information, if not, executing step S408, and if so, executing step S409.
In step S408, a counter information configuration error is determined, and information indicating the counter information configuration error is returned to instruct the user to modify the counter information.
In step S409, relationship information indicating the correspondence between the counter table and the counter included in the counter table is acquired.
Step S410, judging whether the number of the counters represented by the relation information is larger than the preset number, if yes, executing step S411, otherwise, executing step S412.
In step S411, a relationship information configuration error is determined, and information indicating the relationship information configuration error is returned to instruct the user to modify the relationship information.
Step S412, it is determined whether the counter table already exists, if yes, step S413 is executed, and if no, step S415 is executed.
In step S413, the counter table is modified.
Step S414, the corresponding cycle counter table is modified, and step S417 is performed.
In step S415, a counter table is created.
In step S416, a corresponding period counter table is created.
In step S417, the dynamic creation index automatically calculates a storage process and a timing task.
In step S418, new index data is obtained by timing calculation, and the new index data is filled into the counter table and the cycle counter table.
In step S419, the history data of the index counter updated in the counter table and the cycle counter table is updated.
Specifically, the steps S401 to S419 are similar to the embodiments of the counter data storage method described above, and are not described herein.
Fig. 5 is a flowchart of a method for automatically calculating a storage procedure and timing tasks by dynamically creating an index according to an embodiment of the present invention. The method includes the following steps S501-S508.
In step S501, the counter identifier of the index counter in the counter information table is associated with the counter identifier of the index counter in the index formula table.
Step S502, judging whether the index counter is newly added in the counter information table or the index calculation formula of the existing index counter is modified, if yes, executing step S503.
Step S503, filling the updated index calculation formula into the index table to be processed, and splitting the index calculation formula in the table to fill in the index splitting table.
Step S504, according to the processing rule information of the original counter in the index calculation formula, and in the case that the index calculation formula contains division, adopting the division calculation processing rule to generate a database processing statement and updating the index formula table.
Step S505, the object identifier corresponding to the index counter in the relation information table is obtained.
Step S506, a storage process for calculating index data is assembled according to the object identification.
Step S507, a call storage procedure for call index data calculation is created.
Step S508, creating a timing task for index calculation call.
Specifically, the steps S501 to S508 are similar to the embodiments of the method for generating database processing statements described above, and are not described herein.
Based on the same inventive concept, corresponding to the above-mentioned method for storing counter data, the embodiment of the invention further provides a counter data storage device, as shown in fig. 6, which is a schematic structural diagram of the counter data storage device according to the embodiment of the invention, including a memory 601, a transceiver 602, and a processor 603:
A memory 601 for storing a computer program; a transceiver 602 for transceiving data under control of the processor; a processor 603 for reading the computer program in the memory and performing the following operations:
Obtaining object information of a communication object to be monitored, wherein the object information comprises: an object identification of the communication object and a table name of a counter table, the counter table comprising: an original counter table for recording counter data of an original counter of the communication object, and an index counter table for recording counter data of an index counter of the communication object, the original counter being for recording: the directly collected original data of the communication object is used for recording: index data obtained by calculation based on the value of the original counter;
obtaining counter information, wherein the counter information comprises: a counter identifier of the counter, an object identifier of a communication object to which the counter belongs, and an index calculation formula for calculating and obtaining index data;
Acquiring relationship information representing a correspondence relationship between a counter table and a counter contained in the counter table;
running a counter maintenance program to maintain a counter table based on the object information, counter information and relationship information;
under the condition that any index calculation formula is updated, an index calculation program is operated to obtain original data, and new index data is calculated based on the updated index calculation formula;
the index data stored in the maintained counter table is updated based on the new index data.
Wherein in fig. 6, a bus architecture may comprise any number of interconnected buses and bridges, and in particular one or more processors represented by the processor 603 and various circuits of the memory represented by the memory 601, linked together. The bus architecture may also link together various other circuits such as peripheral devices, voltage regulators, power management circuits, etc., which are well known in the art and, therefore, will not be described further herein. The bus interface provides an interface. The transceiver 602 may be a number of elements, including a transmitter and a receiver, providing a means for communicating with various other apparatus over a transmission medium, including wireless channels, wired channels, optical cables, etc. The processor 603 is responsible for managing the bus architecture and general processing, and the memory 601 may store data used by the processor 603 in performing operations.
The processor 603 may be a Central Processing Unit (CPU), application SPECIFIC INTEGRATED Circuit (ASIC), field-Programmable gate array (Field-Programmable GATE ARRAY, FPGA), or complex Programmable logic device (Complex Programmable Logic Device, CPLD), and the processor may also employ a multi-core architecture.
By applying the counter data storage method provided by the embodiment of the invention, the counter table is maintained by acquiring the object information of the communication object to be monitored, the counter information and the relation information representing the corresponding relation between the counter table and the counter contained in the counter table. And under the condition that any index calculation formula is changed, acquiring original data, calculating new index data based on the updated index calculation formula, updating index data stored in a maintained counter table based on the new index data, and completing data storage of the counter. The equipment recorded with the counter table can automatically complete the maintenance of the counter table, so that the maintenance is not needed to be manually performed, and the maintenance speed of the counter table is improved. Meanwhile, under the condition of updating an index calculation formula, the process of acquiring the original data, obtaining the new index data and updating the index data in the counter table can be completed by the equipment, so that the labor cost and the time for completing the data storage of the counter are further reduced, and the influence on the monitoring of the running state of the wireless network is reduced.
In addition, under the condition that a plurality of index calculation formulas are updated, new index data can be calculated at the same time and updated in a counter table, so that batch data processing and data storage are realized.
In one embodiment of the present invention, after the obtaining the counter information, the method further includes:
generating a database processing statement for realizing the index calculation formula;
under the condition that any index calculation formula is updated, an index calculation program is operated to obtain original data, and new index data is calculated based on the updated index calculation formula, and the method specifically comprises the following steps:
And under the condition that any index calculation formula is updated, running an index calculation program, extracting original data from the counter table based on a database processing statement corresponding to the updated index calculation formula contained in the index calculation program, and calculating the extracted original data to obtain new index data.
By applying the scheme provided by the embodiment of the invention, the database processing statement can be automatically assembled through the index calculation formula equipment, the original data is obtained through the database processing statement, and the new index data is calculated and updated, so that the whole counter data storage process can be completed by the equipment by itself without manual operation, and the possible error of manual operation is avoided.
In one embodiment of the present invention, the counter information further includes: processing rule information corresponding to each original counter, the processing rule information representing: when the value of the corresponding original counter is null, the original data corresponding to the original counter is marked as null or 0, and the new index data is calculated based on the updated index calculation formula, which specifically comprises the following steps:
And calculating new index data based on the updated index calculation formula and the corresponding processing rule information of the original counter.
By applying the scheme provided by the embodiment of the invention, the corresponding processing rule information is configured for each original counter in advance, so that the original data corresponding to different original counters can be marked as null values or 0 under the condition that the original counter is null, and the accuracy of the index data calculated by an index calculation formula is ensured. In addition, as the processing rule information is configured in advance, each original counter does not need to be processed independently in the index data calculation process, and the processing efficiency is improved.
In one embodiment of the present invention, the calculating based on the updated index calculation formula to obtain new index data specifically includes:
under the condition that the updated index calculation formula comprises division, new index data is calculated based on the updated index calculation formula and a division calculation processing rule, wherein the division calculation processing rule is as follows: the division calculation contained in the index calculation formula is converted into multiplication calculation.
By applying the scheme provided by the embodiment of the invention, under the condition that the original counter serving as the divisor in the index calculation formula takes 0, the division in the index calculation formula is converted into multiplication, so that calculation errors can not occur in the calculation process of corresponding index data.
In one embodiment of the present invention, after the running counter maintenance program maintains the counter table based on the object information, the counter information and the relationship information, the running counter maintenance program further includes:
Running a counter maintenance program, and maintaining a period counter table of the communication object based on the object information, the counter information and the relation information, wherein preset periods corresponding to different period counters are different, the statistic value of the counter of the communication object in the preset period is recorded in each period counter table, and the preset period comprises at least one of the following periods: 15 minutes, one hour, one day, one week, one month, one year;
after updating the index data stored in the maintained counter table based on the new index data, further comprising:
the statistical value recorded in the cycle counter table is updated based on the updated index data.
By applying the scheme provided by the embodiment of the invention, after the counter table is maintained, the period counter table is maintained so as to obtain the statistical value of the counter after time summarization, so that a user can obtain corresponding data more intuitively by inquiring the statistical value in the period counter table.
In one embodiment of the present invention, the period counter table further records a valid count value corresponding to each statistic value, and each valid count value represents: the number of counter data counted in the process of calculating the corresponding statistic value.
By applying the scheme provided by the embodiment of the invention, the effective count value corresponding to each counter data is added into the period counter table, so that correct data can be obtained in the time summarizing calculation process, and the calculation efficiency is improved under the condition of ensuring the correct calculation.
In one embodiment of the present invention, the running counter maintenance program maintains a counter table based on the object information, counter information and relationship information, and specifically includes:
Running a counter maintenance program when the counter in the counter information is increased, and increasing a column corresponding to the counter in a counter table based on the object information, the counter information and the relation information;
running a counter maintenance program under the condition that a counter in the counter information is modified, and modifying a column corresponding to the counter in a counter table based on the object information, the counter information and the relation information;
when the counter in the counter information is deleted, a counter maintenance program is run, and a column corresponding to the counter is deleted in a counter table based on the object information, the counter information, and the relationship information.
By applying the scheme provided by the embodiment of the invention, the counter maintenance program is operated under the conditions of adding, modifying and deleting the counter, and the counter table is maintained in different modes. And the counter can be added, modified and deleted at the same time, and a corresponding counter maintenance mode is adopted.
In one embodiment of the present invention, after the obtaining the counter information, the method further includes:
Detecting whether an object identifier contained in the object information is the same as an object identifier contained in the counter information;
if the object identifiers are different, judging whether the object identifiers in the counter information are missing or not;
If the counter information is not configured in the preset time, determining that the counter information is configured in the preset time, and returning information representing the counter information configuration error to instruct a user to modify the counter information;
if the object information is not missing, determining that the object information is configured in error, and returning information representing the object information configuration error to instruct a user to modify the object information.
By applying the scheme provided by the embodiment of the invention, after the counter information is acquired, the counter information and the object identification in the object information are required to be checked, so that the counter information and the object information can correspond to each other, and errors in the process of maintaining the counter table are avoided.
In one embodiment of the present invention, after the obtaining the counter information, the method further includes:
Detecting whether a counter identifier of an original counter in an index calculation formula contained in the counter information is the same as a counter identifier of the original counter contained in the counter information;
If the counter information is different, determining that the counter information is configured in error, and returning information representing the counter information is configured in error to instruct a user to modify the counter information.
By applying the scheme provided by the embodiment of the invention, after the counter information is acquired, the counter identification in the index calculation formula and the counter identification in the counter information are required to be checked, so that the counter identification in the counter information can correspond to each other, and errors in calculating index data are avoided.
In one embodiment of the present invention, after the obtaining of the relationship information indicating the correspondence between the counter table and the counter included in the counter table, the method further includes:
detecting whether a counter represented by the relation information corresponds to a counter identifier contained in the counter information;
If the relation information or the counter information is not corresponding to the relation information or the counter information, determining that the relation information or the counter information is configured in error, and returning information representing the relation information or the counter information is configured in error so as to instruct a user to modify the relation information or the counter information.
By applying the scheme provided by the embodiment of the invention, after the counter information and the relation information are acquired, whether the counter identification of the counter contained in the relation information corresponds to the counter identification in the counter information or not needs to be judged, so that errors in the process of maintaining the counter table are avoided.
In one embodiment of the present invention, after the obtaining of the relationship information indicating the correspondence between the counter table and the counter included in the counter table, the method further includes:
detecting whether a counter table represented by the relation information corresponds to a table name contained in the object information;
If the relation information or the object information is not corresponding to the relation information or the object information, determining that the relation information or the object information is configured in error, and returning information representing the relation information or the object information is configured in error so as to instruct a user to modify the relation information or the object information.
By applying the scheme provided by the embodiment of the invention, after the relation information is acquired, the table names of the counter tables contained in the object information and the table names contained in the relation information are required to be checked, so that the object information and the relation information can be corresponding, and errors in the process of maintaining the counter tables are avoided.
In one embodiment of the present invention, after the obtaining of the relationship information indicating the correspondence between the counter table and the counter included in the counter table, the method further includes:
judging whether the number of the counters represented by the relation information is larger than a preset number or not;
if yes, determining the relation information configuration error, and returning information representing the relation information configuration error to instruct a user to modify the relation information.
By applying the scheme provided by the embodiment of the invention, after the relation information is acquired, whether the number of the counters represented by the relation information is larger than the preset number is also required to be judged, so that the configuration of the counters contained in the relation information is correct, and errors in the process of maintaining the counter table are avoided.
Based on the same inventive concept, corresponding to the above-mentioned method for storing counter data, an embodiment of the present invention further provides a counter data storage device, as shown in fig. 7, which is a schematic structural diagram of a first counter data storage device provided in the embodiment of the present invention, including:
A first obtaining module 701, configured to obtain object information of a communication object to be monitored, where the object information includes: an object identification of the communication object and a table name of a counter table, the counter table comprising: an original counter table for recording counter data of an original counter of the communication object, and an index counter table for recording counter data of an index counter of the communication object, the original counter being for recording: the directly collected original data of the communication object is used for recording: index data obtained by calculation based on the value of the original counter;
a second obtaining module 702, configured to obtain counter information, where the counter information includes: a counter identifier of the counter, an object identifier of a communication object to which the counter belongs, and an index calculation formula for calculating and obtaining index data;
a third obtaining module 703, configured to obtain relationship information that represents a correspondence between the counter table and a counter included in the counter table;
A first maintenance module 704, configured to run a counter maintenance program, and maintain a counter table based on the object information, counter information, and relationship information;
The calculation module 705 is configured to run an index calculation program under the condition that any index calculation formula is updated, obtain original data, and calculate new index data based on the updated index calculation formula;
A first updating module 706, configured to update the index data stored in the maintained counter table based on the new index data.
By applying the counter data storage method provided by the embodiment of the invention, the counter table is maintained by acquiring the object information of the communication object to be monitored, the counter information and the relation information representing the corresponding relation between the counter table and the counter contained in the counter table. And under the condition that any index calculation formula is changed, acquiring original data, calculating new index data based on the updated index calculation formula, updating index data stored in a maintained counter table based on the new index data, and completing data storage of the counter. The equipment recorded with the counter table can automatically complete the maintenance of the counter table, so that the maintenance is not needed to be manually performed, and the maintenance speed of the counter table is improved. Meanwhile, under the condition of updating an index calculation formula, the process of acquiring the original data, obtaining the new index data and updating the index data in the counter table can be completed by the equipment, so that the labor cost and the time for completing the data storage of the counter are further reduced, and the influence on the monitoring of the running state of the wireless network is reduced.
In addition, under the condition that a plurality of index calculation formulas are updated, new index data can be calculated at the same time and updated in a counter table, so that batch data processing and data storage are realized.
In one embodiment of the present invention, the second obtaining module 702 is further configured to:
generating a database processing statement for realizing the index calculation formula;
the computing module 705 is specifically configured to:
And under the condition that any index calculation formula is updated, running an index calculation program, extracting original data from the counter table based on a database processing statement corresponding to the updated index calculation formula contained in the index calculation program, and calculating the extracted original data to obtain new index data.
By applying the scheme provided by the embodiment of the invention, the database processing statement can be automatically assembled through the index calculation formula equipment, the original data is obtained through the database processing statement, and the new index data is calculated and updated, so that the whole counter data storage process can be completed by the equipment by itself without manual operation, and the possible error of manual operation is avoided.
In one embodiment of the present invention, the counter information further includes: processing rule information corresponding to each original counter, the processing rule information representing: in the case that the value of the corresponding original counter is null, the original data corresponding to the original counter is marked as null or 0, and the calculating module 705 is specifically configured to:
And under the condition that any index calculation formula is updated, running an index calculation program, and calculating new index data based on the updated index calculation formula and the corresponding processing rule information of the original counter.
By applying the scheme provided by the embodiment of the invention, the corresponding processing rule information is configured for each original counter in advance, so that the original data corresponding to different original counters can be marked as null values or 0 under the condition that the original counter is null, and the accuracy of the index data calculated by an index calculation formula is ensured. In addition, as the processing rule information is configured in advance, each original counter does not need to be processed independently in the index data calculation process, and the processing efficiency is improved.
In one embodiment of the present invention, the computing module 705 is specifically configured to:
Under the condition that any index calculation formula is updated, an index calculation program is operated, and new index data is calculated based on the updated index calculation formula and a division calculation processing rule under the condition that the updated index calculation formula contains division, wherein the division calculation processing rule is as follows: the division calculation contained in the index calculation formula is converted into multiplication calculation.
By applying the scheme provided by the embodiment of the invention, under the condition that the original counter serving as the divisor in the index calculation formula takes 0, the division in the index calculation formula is converted into multiplication, so that calculation errors can not occur in the calculation process of corresponding index data.
In an embodiment of the present invention, as shown in fig. 8, a schematic structural diagram of a second counter data storage device according to an embodiment of the present invention is provided, and compared with the embodiment shown in fig. 7, the counter data storage device further includes:
A second maintenance module 707, configured to execute a counter maintenance program, and maintain a period counter table of the communication object based on the object information, the counter information, and the relationship information, where preset periods corresponding to different period counters are different, and each period counter table records a statistic value of the counter of the communication object in the preset period, where the preset period includes at least one of the following periods: 15 minutes, one hour, one day, one week, one month, one year; ;
A second updating module 708, configured to update the statistics recorded in the period counter table based on the updated index data.
By applying the scheme provided by the embodiment of the invention, after the counter table is maintained, the period counter table is maintained so as to obtain the statistical value of the counter after time summarization, so that a user can obtain corresponding data more intuitively by inquiring the statistical value in the period counter table.
In one embodiment of the present invention, the period counter table further records a valid count value corresponding to each statistic value, and each valid count value represents: the number of counter data counted in the process of calculating the corresponding statistic value.
By applying the scheme provided by the embodiment of the invention, the effective count value corresponding to each counter data is added into the period counter table, so that correct data can be obtained in the time summarizing calculation process, and the calculation efficiency is improved under the condition of ensuring the correct calculation.
In one embodiment of the present invention, the first maintenance module 704 is specifically configured to:
Running a counter maintenance program when the counter in the counter information is increased, and increasing a column corresponding to the counter in a counter table based on the object information, the counter information and the relation information;
running a counter maintenance program under the condition that a counter in the counter information is modified, and modifying a column corresponding to the counter in a counter table based on the object information, the counter information and the relation information;
when the counter in the counter information is deleted, a counter maintenance program is run, and a column corresponding to the counter is deleted in a counter table based on the object information, the counter information, and the relationship information.
By applying the scheme provided by the embodiment of the invention, the counter maintenance program is operated under the conditions of adding, modifying and deleting the counter, and the counter table is maintained in different modes. And the counter can be added, modified and deleted at the same time, and a corresponding counter maintenance mode is adopted.
In one embodiment of the present invention, the second obtaining module 702 is further configured to:
Detecting whether an object identifier contained in the object information is the same as an object identifier contained in the counter information;
if the object identifiers are different, judging whether the object identifiers in the counter information are missing or not;
If the counter information is not configured in the preset time, determining that the counter information is configured in the preset time, and returning information representing the counter information configuration error to instruct a user to modify the counter information;
if the object information is not missing, determining that the object information is configured in error, and returning information representing the object information configuration error to instruct a user to modify the object information.
By applying the scheme provided by the embodiment of the invention, after the counter information is acquired, the counter information and the object identification in the object information are required to be checked, so that the counter information and the object information can correspond to each other, and errors in the process of maintaining the counter table are avoided.
In one embodiment of the present invention, the second obtaining module 702 is further configured to:
Detecting whether a counter identifier of an original counter in an index calculation formula contained in the counter information is the same as a counter identifier of the original counter contained in the counter information;
If the counter information is different, determining that the counter information is configured in error, and returning information representing the counter information is configured in error to instruct a user to modify the counter information.
By applying the scheme provided by the embodiment of the invention, after the counter information is acquired, the counter identification in the index calculation formula and the counter identification in the counter information are required to be checked, so that the counter identification in the counter information can correspond to each other, and errors in calculating index data are avoided.
In one embodiment of the present invention, the third obtaining module 703 is further configured to:
detecting whether a counter represented by the relation information corresponds to a counter identifier contained in the counter information;
If the relation information or the counter information is not corresponding to the relation information or the counter information, determining that the relation information or the counter information is configured in error, and returning information representing the relation information or the counter information is configured in error so as to instruct a user to modify the relation information or the counter information.
By applying the scheme provided by the embodiment of the invention, after the counter information and the relation information are acquired, whether the counter identification of the counter contained in the relation information corresponds to the counter identification in the counter information or not needs to be judged, so that errors in the process of maintaining the counter table are avoided.
In one embodiment of the present invention, the third obtaining module 703 is further configured to:
detecting whether a counter table represented by the relation information corresponds to a table name contained in the object information;
If the relation information or the object information is not corresponding to the relation information or the object information, determining that the relation information or the object information is configured in error, and returning information representing the relation information or the object information is configured in error so as to instruct a user to modify the relation information or the object information.
By applying the scheme provided by the embodiment of the invention, after the relation information is acquired, the table names of the counter tables contained in the object information and the table names contained in the relation information are required to be checked, so that the object information and the relation information can be corresponding, and errors in the process of maintaining the counter tables are avoided.
In one embodiment of the present invention, the third obtaining module 703 is further configured to:
judging whether the number of the counters represented by the relation information is larger than a preset number or not;
if yes, determining the relation information configuration error, and returning information representing the relation information configuration error to instruct a user to modify the relation information.
By applying the scheme provided by the embodiment of the invention, after the relation information is acquired, whether the number of the counters represented by the relation information is larger than the preset number is also required to be judged, so that the configuration of the counters contained in the relation information is correct, and errors in the process of maintaining the counter table are avoided.
Based on the same inventive concept, corresponding to the above-mentioned counter data storage method, the embodiment of the present invention further provides a computer readable storage medium, in which a computer program is stored, which when executed by a processor, implements the steps of any one of the counter data storage methods.
By applying the counter data storage method provided by the embodiment of the invention, the counter table is maintained by acquiring the object information of the communication object to be monitored, the counter information and the relation information representing the corresponding relation between the counter table and the counter contained in the counter table. And under the condition that any index calculation formula is changed, acquiring original data, calculating new index data based on the updated index calculation formula, updating index data stored in a maintained counter table based on the new index data, and completing data storage of the counter. The equipment recorded with the counter table can automatically complete the maintenance of the counter table, so that the maintenance is not needed to be manually performed, and the maintenance speed of the counter table is improved. Meanwhile, under the condition of updating an index calculation formula, the process of acquiring the original data, obtaining the new index data and updating the index data in the counter table can be completed by the equipment, so that the labor cost and the time for completing the data storage of the counter are further reduced, and the influence on the monitoring of the running state of the wireless network is reduced.
In addition, under the condition that a plurality of index calculation formulas are updated, new index data can be calculated at the same time and updated in a counter table, so that batch data processing and data storage are realized.
In yet another embodiment of the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the steps of the counter data storage method of any of the above embodiments.
By applying the counter data storage method provided by the embodiment of the invention, the counter table is maintained by acquiring the object information of the communication object to be monitored, the counter information and the relation information representing the corresponding relation between the counter table and the counter contained in the counter table. And under the condition that any index calculation formula is changed, acquiring original data, calculating new index data based on the updated index calculation formula, updating index data stored in a maintained counter table based on the new index data, and completing data storage of the counter. The equipment recorded with the counter table can automatically complete the maintenance of the counter table, so that the maintenance is not needed to be manually performed, and the maintenance speed of the counter table is improved. Meanwhile, under the condition of updating an index calculation formula, the process of acquiring the original data, obtaining the new index data and updating the index data in the counter table can be completed by the equipment, so that the labor cost and the time for completing the data storage of the counter are further reduced, and the influence on the monitoring of the running state of the wireless network is reduced.
In addition, under the condition that a plurality of index calculation formulas are updated, new index data can be calculated at the same time and updated in a counter table, so that batch data processing and data storage are realized.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk Solid STATE DISK (SSD)), etc.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for the counter data storage device, apparatus, computer readable storage medium, computer program product embodiments, the description is relatively simple as it is substantially similar to the method embodiments, as relevant see also part of the description of the method embodiments.
The foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims (26)
1. A method of storing counter data, the method comprising:
Obtaining object information of a communication object to be monitored, wherein the object information comprises: an object identification of the communication object and a table name of a counter table, the counter table comprising: an original counter table for recording counter data of an original counter of the communication object, and an index counter table for recording counter data of an index counter of the communication object, the original counter being for recording: the directly collected original data of the communication object is used for recording: index data obtained by calculation based on the value of the original counter;
obtaining counter information, wherein the counter information comprises: a counter identifier of the counter, an object identifier of a communication object to which the counter belongs, and an index calculation formula for calculating and obtaining index data;
Acquiring relationship information representing a correspondence relationship between a counter table and a counter contained in the counter table;
running a counter maintenance program to maintain a counter table based on the object information, counter information and relationship information;
under the condition that any index calculation formula is updated, an index calculation program is operated to obtain original data, and new index data is calculated based on the updated index calculation formula;
the index data stored in the maintained counter table is updated based on the new index data.
2. The method of claim 1, further comprising, after the obtaining the counter information:
generating a database processing statement for realizing the index calculation formula;
under the condition that any index calculation formula is updated, an index calculation program is operated to obtain original data, new index data is calculated based on the updated index calculation formula, and the method comprises the following steps:
And under the condition that any index calculation formula is updated, running an index calculation program, extracting original data from the counter table based on a database processing statement corresponding to the updated index calculation formula contained in the index calculation program, and calculating the extracted original data to obtain new index data.
3. The method according to claim 1, wherein the counter information further includes: processing rule information corresponding to each original counter, the processing rule information representing: when the value of the corresponding original counter is null, the original data corresponding to the original counter is marked as null or 0, and the new index data is calculated based on the updated index calculation formula, which comprises the following steps:
And calculating new index data based on the updated index calculation formula and the corresponding processing rule information of the original counter.
4. The method of claim 1, wherein the calculating new index data based on the updated index calculation formula comprises:
under the condition that the updated index calculation formula comprises division, new index data is calculated based on the updated index calculation formula and a division calculation processing rule, wherein the division calculation processing rule is as follows: the division calculation contained in the index calculation formula is converted into multiplication calculation.
5. The method of claim 1, further comprising, after the running counter maintenance program maintains a counter table based on the object information, counter information, and relationship information:
Running a counter maintenance program, and maintaining a period counter table of the communication object based on the object information, the counter information and the relation information, wherein preset periods corresponding to different period counters are different, the statistic value of the counter of the communication object in the preset period is recorded in each period counter table, and the preset period comprises at least one of the following periods: 15 minutes, one hour, one day, one week, one month, one year;
after updating the index data stored in the maintained counter table based on the new index data, further comprising:
the statistical value recorded in the cycle counter table is updated based on the updated index data.
6. The method of claim 5, wherein the period counter table further has a valid count value corresponding to each statistic, each valid count value representing: the number of counter data counted in the process of calculating the corresponding statistic value.
7. The method of claim 1, wherein the running counter maintenance program, based on the object information, counter information, and relationship information, maintains a counter table comprising:
Running a counter maintenance program when the counter in the counter information is increased, and increasing a column corresponding to the counter in a counter table based on the object information, the counter information and the relation information;
running a counter maintenance program under the condition that a counter in the counter information is modified, and modifying a column corresponding to the counter in a counter table based on the object information, the counter information and the relation information;
when the counter in the counter information is deleted, a counter maintenance program is run, and a column corresponding to the counter is deleted in a counter table based on the object information, the counter information, and the relationship information.
8. The method according to any one of claims 1-7, further comprising, after the obtaining counter information:
Detecting whether an object identifier contained in the object information is the same as an object identifier contained in the counter information;
if the object identifiers are different, judging whether the object identifiers in the counter information are missing or not;
If the counter information is not configured in the preset time, determining that the counter information is configured in the preset time, and returning information representing the counter information configuration error to instruct a user to modify the counter information;
if the object information is not missing, determining that the object information is configured in error, and returning information representing the object information configuration error to instruct a user to modify the object information.
9. The method according to any one of claims 1-7, further comprising, after the obtaining counter information:
Detecting whether a counter identifier of an original counter in an index calculation formula contained in the counter information is the same as a counter identifier of the original counter contained in the counter information;
If the counter information is different, determining that the counter information is configured in error, and returning information representing the counter information is configured in error to instruct a user to modify the counter information.
10. The method according to any one of claims 1 to 7, further comprising, after the obtaining of the relationship information indicating the correspondence between the counter table and the counter included in the counter table:
detecting whether a counter represented by the relation information corresponds to a counter identifier contained in the counter information;
If the relation information or the counter information is not corresponding to the relation information or the counter information, determining that the relation information or the counter information is configured in error, and returning information representing the relation information or the counter information is configured in error so as to instruct a user to modify the relation information or the counter information.
11. The method according to any one of claims 1 to 7, further comprising, after the obtaining of the relationship information indicating the correspondence between the counter table and the counter included in the counter table:
detecting whether a counter table represented by the relation information corresponds to a table name contained in the object information;
If the relation information or the object information is not corresponding to the relation information or the object information, determining that the relation information or the object information is configured in error, and returning information representing the relation information or the object information is configured in error so as to instruct a user to modify the relation information or the object information.
12. The method according to any one of claims 1 to 7, further comprising, after the obtaining of the relationship information indicating the correspondence between the counter table and the counter included in the counter table:
judging whether the number of the counters represented by the relation information is larger than a preset number or not;
if yes, determining the relation information configuration error, and returning information representing the relation information configuration error to instruct a user to modify the relation information.
13. A counter data storage device comprising a memory, a transceiver, and a processor:
A memory for storing a computer program; a transceiver for transceiving data under control of the processor; a processor for reading the computer program in the memory and performing the following operations:
Obtaining object information of a communication object to be monitored, wherein the object information comprises: an object identification of the communication object and a table name of a counter table, the counter table comprising: an original counter table for recording counter data of an original counter of the communication object, and an index counter table for recording counter data of an index counter of the communication object, the original counter being for recording: the directly collected original data of the communication object is used for recording: index data obtained by calculation based on the value of the original counter;
obtaining counter information, wherein the counter information comprises: a counter identifier of the counter, an object identifier of a communication object to which the counter belongs, and an index calculation formula for calculating and obtaining index data;
Acquiring relationship information representing a correspondence relationship between a counter table and a counter contained in the counter table;
running a counter maintenance program to maintain a counter table based on the object information, counter information and relationship information;
under the condition that any index calculation formula is updated, an index calculation program is operated to obtain original data, and new index data is calculated based on the updated index calculation formula;
the index data stored in the maintained counter table is updated based on the new index data.
14. The counter data storage device according to claim 13, further comprising, after said obtaining counter information:
generating a database processing statement for realizing the index calculation formula;
under the condition that any index calculation formula is updated, an index calculation program is operated to obtain original data, new index data is calculated based on the updated index calculation formula, and the method comprises the following steps:
And under the condition that any index calculation formula is updated, running an index calculation program, extracting original data from the counter table based on a database processing statement corresponding to the updated index calculation formula contained in the index calculation program, and calculating the extracted original data to obtain new index data.
15. The counter data storage device according to claim 13, wherein the counter information further comprises: processing rule information corresponding to each original counter, the processing rule information representing: when the value of the corresponding original counter is null, the original data corresponding to the original counter is marked as null or 0, and the new index data is calculated based on the updated index calculation formula, which specifically comprises the following steps:
And calculating new index data based on the updated index calculation formula and the corresponding processing rule information of the original counter.
16. The counter data storage according to claim 13, wherein the new index data is calculated based on the updated index calculation formula, specifically comprising:
under the condition that the updated index calculation formula comprises division, new index data is calculated based on the updated index calculation formula and a division calculation processing rule, wherein the division calculation processing rule is as follows: the division calculation contained in the index calculation formula is converted into multiplication calculation.
17. The counter data storage device according to claim 13, wherein after the running counter maintenance program maintains a counter table based on the object information, counter information, and relationship information, further comprising:
Running a counter maintenance program, and maintaining a period counter table of the communication object based on the object information, the counter information and the relation information, wherein preset periods corresponding to different period counters are different, the statistic value of the counter of the communication object in the preset period is recorded in each period counter table, and the preset period comprises at least one of the following periods: 15 minutes, one hour, one day, one week, one month, one year;
after updating the index data stored in the maintained counter table based on the new index data, further comprising:
the statistical value recorded in the cycle counter table is updated based on the updated index data.
18. The counter data storage device according to claim 17, wherein the period counter table further has recorded therein a valid count value corresponding to each statistic, each valid count value representing: the number of counter data counted in the process of calculating the corresponding statistic value.
19. The counter data storage device according to claim 13, wherein the running counter maintenance program maintains a counter table based on the object information, counter information, and relationship information, specifically comprising:
Running a counter maintenance program when the counter in the counter information is increased, and increasing a column corresponding to the counter in a counter table based on the object information, the counter information and the relation information;
running a counter maintenance program under the condition that a counter in the counter information is modified, and modifying a column corresponding to the counter in a counter table based on the object information, the counter information and the relation information;
when the counter in the counter information is deleted, a counter maintenance program is run, and a column corresponding to the counter is deleted in a counter table based on the object information, the counter information, and the relationship information.
20. The counter data storage device according to any one of claims 13-19, further comprising, after said obtaining counter information:
Detecting whether an object identifier contained in the object information is the same as an object identifier contained in the counter information;
if the object identifiers are different, judging whether the object identifiers in the counter information are missing or not;
If the counter information is not configured in the preset time, determining that the counter information is configured in the preset time, and returning information representing the counter information configuration error to instruct a user to modify the counter information;
if the object information is not missing, determining that the object information is configured in error, and returning information representing the object information configuration error to instruct a user to modify the object information.
21. The counter data storage device according to any one of claims 13-19, further comprising, after said obtaining counter information:
Detecting whether a counter identifier of an original counter in an index calculation formula contained in the counter information is the same as a counter identifier of the original counter contained in the counter information;
If the counter information is different, determining that the counter information is configured in error, and returning information representing the counter information is configured in error to instruct a user to modify the counter information.
22. The counter data storage device according to any one of claims 13 to 19, further comprising, after said obtaining relationship information indicating a correspondence between a counter table and a counter included in the counter table:
detecting whether a counter represented by the relation information corresponds to a counter identifier contained in the counter information;
If the relation information or the counter information is not corresponding to the relation information or the counter information, determining that the relation information or the counter information is configured in error, and returning information representing the relation information or the counter information is configured in error so as to instruct a user to modify the relation information or the counter information.
23. The counter data storage device according to any one of claims 13 to 19, further comprising, after said obtaining relationship information indicating a correspondence between a counter table and a counter included in the counter table:
detecting whether a counter table represented by the relation information corresponds to a table name contained in the object information;
If the relation information or the object information is not corresponding to the relation information or the object information, determining that the relation information or the object information is configured in error, and returning information representing the relation information or the object information is configured in error so as to instruct a user to modify the relation information or the object information.
24. The counter data storage device according to any one of claims 13 to 19, further comprising, after said obtaining relationship information indicating a correspondence between a counter table and a counter included in the counter table:
judging whether the number of the counters represented by the relation information is larger than a preset number or not;
if yes, determining the relation information configuration error, and returning information representing the relation information configuration error to instruct a user to modify the relation information.
25. A counter data storage arrangement for use with a counter data storage device, comprising:
The first acquisition module is used for acquiring object information of a communication object to be monitored, wherein the object information comprises: an object identification of the communication object and a table name of a counter table, the counter table comprising: an original counter table for recording counter data of an original counter of the communication object, and an index counter table for recording counter data of an index counter of the communication object, the original counter being for recording: the directly collected original data of the communication object is used for recording: index data obtained by calculation based on the value of the original counter;
the second acquisition module is used for acquiring counter information, wherein the counter information comprises: a counter identifier of the counter, an object identifier of a communication object to which the counter belongs, and an index calculation formula for calculating and obtaining index data;
the third acquisition module is used for acquiring relation information representing the corresponding relation between the counter table and the counter contained in the counter table;
the first maintenance module is used for running a counter maintenance program and maintaining a counter table based on the object information, the counter information and the relation information;
The calculation module is used for running an index calculation program under the condition that any index calculation formula is updated, acquiring original data, and calculating new index data based on the updated index calculation formula;
And a first updating module for updating the index data stored in the maintained counter table based on the new index data.
26. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored therein a computer program which, when executed by a processor, implements the method steps of any of claims 1-12.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211550206.2A CN118153620A (en) | 2022-12-05 | 2022-12-05 | Counter data storage method, device and apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211550206.2A CN118153620A (en) | 2022-12-05 | 2022-12-05 | Counter data storage method, device and apparatus |
Publications (1)
Publication Number | Publication Date |
---|---|
CN118153620A true CN118153620A (en) | 2024-06-07 |
Family
ID=91292264
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211550206.2A Pending CN118153620A (en) | 2022-12-05 | 2022-12-05 | Counter data storage method, device and apparatus |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN118153620A (en) |
-
2022
- 2022-12-05 CN CN202211550206.2A patent/CN118153620A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108874803B (en) | Data storage method, device and storage medium | |
CN111506559B (en) | Data storage method, device, electronic equipment and storage medium | |
CN110781184A (en) | Data table construction method, device, equipment and storage medium | |
CN111966707A (en) | Query statement generation method and device, electronic equipment and computer readable medium | |
CN113420026A (en) | Database table structure changing method, device, equipment and storage medium | |
US20130179122A1 (en) | Method and Device for Measuring System Performance in Real Time | |
JP2009217455A (en) | Information processor, information processing program, and method | |
CN110555452A (en) | network problem processing method and device based on intelligent clustering | |
WO2016206241A1 (en) | Data analysis method and apparatus | |
CN115865611A (en) | Fault processing method and device of network equipment and electronic equipment | |
CN109002253B (en) | Method and device for processing damaged strip | |
CN118153620A (en) | Counter data storage method, device and apparatus | |
CN105493050A (en) | Data processing device, and data processing method and program | |
US20160360433A1 (en) | Technique for Counting Objects in a Telecommunications Network | |
CN110582091B (en) | Method and apparatus for locating wireless quality problems | |
CN111372270B (en) | Method, device, equipment and medium for determining suspected fault cell | |
CN102088362B (en) | Collecting method and device of performance data | |
CN110633270B (en) | Multi-strategy electric meter daily freezing value automatic substitution method and device based on priority | |
CN113840017A (en) | Automatic IP address allocation method and device, electronic equipment and computer readable medium | |
CN107919972B (en) | Method and device for acquiring ring system affiliation of physical port | |
CN114691443A (en) | Cross section data sending method and device, electronic equipment and storage medium | |
CN106330476B (en) | Method for obtaining guaranteed bandwidth of user side port and network monitoring system | |
CN110765127B (en) | Method, device, equipment and storage medium for scoring fact data | |
CN118394801B (en) | Business memory data analysis method and device, electronic equipment and storage medium | |
CN113567721B (en) | Power failure statistics method for intelligent ammeter |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |