CN108196875B - Statistical system and method for APP self service - Google Patents

Statistical system and method for APP self service Download PDF

Info

Publication number
CN108196875B
CN108196875B CN201810094167.7A CN201810094167A CN108196875B CN 108196875 B CN108196875 B CN 108196875B CN 201810094167 A CN201810094167 A CN 201810094167A CN 108196875 B CN108196875 B CN 108196875B
Authority
CN
China
Prior art keywords
library
statistical
service
condition
description
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.)
Active
Application number
CN201810094167.7A
Other languages
Chinese (zh)
Other versions
CN108196875A (en
Inventor
颜昀
车勇子
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hunan Happly Sunshine Interactive Entertainment Media Co Ltd
Original Assignee
Hunan Happly Sunshine Interactive Entertainment Media Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Hunan Happly Sunshine Interactive Entertainment Media Co Ltd filed Critical Hunan Happly Sunshine Interactive Entertainment Media Co Ltd
Priority to CN201810094167.7A priority Critical patent/CN108196875B/en
Publication of CN108196875A publication Critical patent/CN108196875A/en
Application granted granted Critical
Publication of CN108196875B publication Critical patent/CN108196875B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management

Abstract

The invention discloses a statistical system and a statistical method for self business of APP (application). the statistical system comprises a statistical business library and a statistical engine module, wherein the statistical business library comprises a statistical business description library, a condition description library, an action description library and a data format description library, and the statistical engine module comprises a loading resolver, an identification network and an action execution library; the statistical service description library is mapped to the condition description library, the data format description library and the action description library; the statistical engine module generates an identification network according to the data in the statistical service library; the loading resolver is used for loading the data in the statistical service library into the statistical engine module; and the recognition network detects whether the condition is triggered by using a reflection mechanism, if so, the condition matching is carried out, and if the condition matching is successful, the action execution library executes the action. The invention can effectively reduce or contact the coupling between the statistical service and the APP service, improve the development efficiency, reduce the maintenance cost and facilitate the unified management of the statistical service.

Description

Statistical system and method for APP self service
Technical Field
The invention particularly relates to a statistical system and a statistical method for the self business of an APP (application).
Background
For the APP self service, the statistic service refers to collecting relevant state data output of the APP self service at that time when the APP self service runs to a certain moment in order to monitor the running state of the APP self service.
Traditional statistical services must be hard-coded into the code of the self-service of the APP by developers, so that the coupling between the statistical services and the self-service is caused, the coupled statistical services must be maintained when the self-service of the APP is upgraded and deployed, and the development, the upgrade and the maintenance of the self-service of the APP are seriously hindered; meanwhile, hard codes of statistical services are not regularly scattered in various places of the service codes of the APP, and unified management and maintenance cannot be performed.
Disclosure of Invention
In the prior art, the statistical service is hard-coded in the code of the APP self service, and the statistical service is closely coupled with the APP self service, so that the development, the upgrade and the maintenance of the APP self service are not facilitated, and the statistical service cannot be uniformly managed and maintained. The present invention aims to provide a statistical system and method for the self-service of the APP, which can effectively reduce or contact the coupling between the statistical service and the self-service of the APP, so that developers do not need to maintain the statistical service when developing, upgrading or maintaining the self-service of the APP, development efficiency is improved, maintenance cost is reduced, and uniform management of the statistical service is facilitated.
In order to solve the technical problems, the technical scheme adopted by the invention is as follows:
a statistical system for self business of APP is characterized by comprising a statistical business library and a statistical engine module, wherein the statistical business library comprises a statistical business description library, a condition description library, an action description library and a data format description library, and the statistical engine module comprises a loading resolver, an identification network and an action execution library; wherein:
counting section programming of the service library facing to the APP self service;
the statistical service description library is mapped to the condition description library, the data format description library and the action description library in a service description mode;
the condition description library is used for describing conditions triggered by the statistical service;
the data format description library is used for configuring the format of the output of the acquired data;
the action description library is used for describing the target and the mode of data output after collection;
the statistical engine module is a rule engine and generates an identification network consisting of conditions and actions according to data in a statistical service library loaded by the loading resolver;
the loading resolver is used for loading the data in the statistical service library into the statistical engine module;
the recognition network detects whether the condition in the recognition network is triggered by using a reflection mechanism, if the recognition network detects that the condition is triggered, the recognition network performs condition matching by using a Rete algorithm, and if the condition matching is successful, the recognition network informs an action execution library to execute the action associated with the matching condition; if the condition matching is unsuccessful, continuing to detect whether the condition is triggered;
and the action execution library is used for executing the action associated with the matching condition when the condition matching in the network is successfully identified, and the action associated with the matching condition comprises collecting and outputting data according to the data format configured in the data format description library.
By means of the structure, the invention firstly utilizes the reflection mechanism to detect the running state (tangent plane) of the APP self service, and then executes the statistical service. The method and the device have the advantages that the statistical service is extracted from the APP self service, the statistical service is triggered through a reflection mechanism, and the statistical service does not need to be hard-coded into the APP self service, so that the aim of decoupling the statistical service and the APP self service is fulfilled, the APP self service can be independently upgraded and maintained, developers do not need to maintain the statistical service when developing, upgrading or maintaining the APP self service, the development efficiency is improved, and the maintenance cost is reduced; meanwhile, all the statistical services can be centralized in a statistical service library, and unified maintenance and management are facilitated.
Further, the condition description library describes the condition of the statistical business trigger by using a predicate technology.
Because the predicate technology is used for describing the conditions for counting the service triggering, the conditions can be multiplexed and combined to form other required triggering conditions, so that redundant condition description is avoided, the complexity of the system is reduced, and the maintenance is convenient.
Further, the action execution library collects data using a key-value encoding technique according to the data format configured in the data format description library.
Because the definition of the type of the acquired data is required to be known when the data is acquired, in order to avoid the coupling of the statistical service and the type caused by the reference of the definition of the type of the acquired data, which is not beneficial to subsequent maintenance and expansion, the invention uses a key value coding mechanism, can dynamically acquire the data according to instance and keypath configured by a configuration description file, and avoids the introduction of the definition of a specific type, so that the statistical service is completely decoupled from the self-service of the APP.
Based on the same inventive concept, the invention also provides a statistical method for the APP self service by using the statistical system, which comprises the following steps:
step A, mapping a statistical service description library for APP self service section programming to a condition description library, a data format description library and an action description library in a service description mode;
b, loading the data in the statistical service library into a statistical engine module by a loading resolver;
c, the statistical engine module generates an identification network consisting of conditions and actions according to the loaded data in the statistical service library;
d, the identification network detects whether the condition in the identification network is triggered or not by using a reflection mechanism, if the condition is detected to be triggered by the identification network, the identification network performs condition matching by using a Rete algorithm, and if the condition matching is successful, the step E is skipped; if the condition matching is not successful, circularly executing the step D;
and E, identifying the network to inform the action execution library to execute the action associated with the matching condition, and acquiring and outputting data by the action execution library according to the data format configured in the data format description library.
Further, in the step D, the identification network further detects whether a condition in the identification network is triggered by using a predicate and a key value encoding technology.
Further, in the step E, the action execution library collects data by using a key value coding technique according to the data format configured in the data format description library.
Compared with the prior art, the invention has the following beneficial effects:
firstly, the statistical service is defined by a service description file, and the code of the statistical module is not required to be modified for modifying and maintaining the statistical service, so that the development is facilitated.
Secondly, the statistical service registers the section by dynamically loading the service description file, thereby avoiding code redundancy caused by using a hard coding mode for the registration section.
Thirdly, data are acquired by using a key value coding mechanism, the coupling of statistical service and APP self service caused by the fact that the type definition needs to be known during data acquisition is avoided, the statistical service and the APP self service are completely decoupled, the development efficiency is improved, and the maintenance cost is reduced.
Fourthly, fine-grained configuration is carried out on the triggering condition, the data acquisition and the data output, the configuration is multiplexed to the greatest extent, and the code redundancy of complex statistical services is reduced.
And fifthly, the statistical services are uniformly managed and maintained in the statistical service library and cannot be scattered into the APP service codes, so that the statistical services are conveniently and uniformly managed.
Drawings
FIG. 1 is a block diagram of a statistical system according to the present invention.
FIG. 2 is a schematic diagram of an embodiment of a statistical service library definition.
FIG. 3 is a schematic diagram of an embodiment of an identification network.
The system comprises a statistical service library 1, a statistical engine module 2, a statistical service description library 3, a condition description library 4, an action description library 5, a data format description library 6, a loading resolver 7, an identification network 8 and an action execution library 9.
Detailed Description
The invention follows the following prior art:
reflection: reflection is a computer-processed way that a program can access, detect, and modify its own state or behavior, allowing the program to create and modify objects of any class without having to hard-code the target class in advance.
KVC: key value coding (keyed value coding) is a mechanism by which property values of class objects can be accessed directly through a string (Key) without knowing the definition of the class.
Rete algorithm: the Rete algorithm is designed and invented by c.l. forgy in 1979, Rete is the meaning of the network, and he finally interprets (or compiles) all rules to generate a recognition network 8, wherein the recognition network comprises an alpha network (rule network) and a beta network (action execution network), and the Rete algorithm quickly recognizes whether conditions exist according to external input and executes corresponding actions.
And (3) predicate: the input object is evaluated by an expression described by a character string.
AOP: the method is mainly realized by extracting the tangent plane in the service processing process, and is aimed at a certain step or stage in the processing process to obtain the isolation effect of low coupling between parts in the logic process.
A relational database: the relational database is a database established on the basis of a relational model, and data in the database is processed by means of mathematical concepts and methods such as set algebra and the like.
The relation model is as follows: the relational model refers to a data model which represents entities and the connection between the entities in the form of a two-dimensional table.
As shown in fig. 1 to fig. 3, the statistical system for APP own service of the present invention includes a statistical service library 1 and a statistical engine module 2, where the statistical service library 1 includes a statistical service description library 3, a condition description library 4, an action description library 5 and a data format description library 6, and the statistical engine module 2 includes a loading parser 7, an identification network 8 and an action execution library 9; wherein:
the statistical service library 1 is a database based on a relational model and is oriented to section programming of APP self services.
The statistical service description library 3 is mapped to the condition description library 4, the data format description library 6 and the action description library 5 in a service description mode.
The condition description library 4 is used for describing the condition of the statistical service trigger.
The data format description library 6 is used for configuring the format of the collected data output.
The action description library 5 is used for describing the target and the mode of data output after collection.
The statistical engine module 2 is a lightweight rule engine, and the statistical engine module 2 generates an identification network 8 consisting of conditions and actions according to the data in the statistical service library 1 loaded by the loading resolver 7.
The loading parser 7 is used for loading the data in the statistical service library 1 into the statistical engine module 2.
The recognition network 8 detects whether the condition in the recognition network 8 is triggered by using a reflection mechanism, if the recognition network 8 detects that the condition is triggered, the recognition network 8 uses a Rete algorithm to perform condition matching, and if the condition matching is successful, the recognition network 8 informs the action execution library 9 to execute the action associated with the matching condition; if the condition match is not successful, then continuing to detect whether the condition is triggered.
The action execution library 9 is used for executing the action associated with the matching condition when the condition matching in the recognition network 8 is successful, and the action associated with the matching condition comprises collecting and outputting data according to the data format configured in the data format description library 6.
The condition description library 4 uses predicate technology to describe the condition of the statistical business trigger.
The action execution library 9 collects data using a key-value encoding technique according to the data format configured in the data format description library 6.
The method for counting the APP self service by using the counting system comprises the following steps:
step A, mapping the statistical service description library 3 which is oriented to the APP self service section programming to a condition description library 4, a data format description library 6 and an action description library 5 in a service description mode. The statistical services library 1 defines an embodiment as shown in fig. 2, where redundant data is reduced using the relational database principle.
And step B, loading the data in the statistical service library 1 into the statistical engine module 2 by the loading resolver 7.
And C, the statistical engine module 2 generates an identification network 8 consisting of conditions and actions according to the loaded data in the statistical service library 1. An embodiment of a recognition network 8 consisting of conditions and actions is shown in fig. 3.
D, the recognition network 8 detects whether the condition in the recognition network 8 is triggered or not by using a reflection mechanism, if the recognition network 8 detects that the condition is triggered, the recognition network 8 performs condition matching by using a Rete algorithm, and if the condition matching is successful, the step E is skipped; and if the condition matching is not successful, circularly executing the step D.
And E, the recognition network 8 informs the action execution library 9 to execute the action associated with the matching condition, and the action execution library 9 collects and outputs data according to the data format configured in the data format description library 6. The collected data can be output to a memory, a database or a server and the like.
In said step D, the recognition network 8 also detects whether a condition in the recognition network 8 is triggered, using predicate and key-value encoding techniques.
In the step E, the action execution library 9 collects data by using a key value encoding technique according to the data format configured in the data format description library 6.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (6)

1. A statistical system for self-service of APP is characterized by comprising a statistical service library (1) and a statistical engine module (2), wherein the statistical service library (1) comprises a statistical service description library (3), a condition description library (4), an action description library (5) and a data format description library (6), and the statistical engine module (2) comprises a loading resolver (7), an identification network (8) and an action execution library (9); wherein:
the statistical service library (1) is programmed by facing to the section of the APP self service;
the statistical service description library (3) is mapped to the condition description library (4), the data format description library (6) and the action description library (5) in a service description mode;
the condition description library (4) is used for describing conditions triggered by the statistical service;
the data format description library (6) is used for configuring the format of the output of the acquired data;
the action description library (5) is used for describing the target and the mode of data output after collection;
the statistical engine module (2) is a rule engine, and the statistical engine module (2) generates an identification network (8) consisting of conditions and actions according to data in the statistical service library (1) loaded by the loading resolver (7);
the loading parser (7) is used for loading the data in the statistical service library (1) into the statistical engine module (2);
the recognition network (8) detects whether a condition in the recognition network (8) is triggered or not by using a reflection mechanism, if the recognition network (8) detects that the condition is triggered, the recognition network (8) performs condition matching by using a Rete algorithm, and if the condition matching is successful, the recognition network (8) informs the action execution library (9) to execute an action associated with the matched condition; if the condition matching is unsuccessful, continuing to detect whether the condition is triggered;
the action execution library (9) is used for executing the action associated with the matching condition when the condition matching in the recognition network (8) is successful, and the action associated with the matching condition comprises collecting and outputting data according to the data format configured in the data format description library (6).
2. Statistical system for APP self-traffic as in claim 1, characterized in that said conditional description library (4) describes the conditions of statistical traffic triggering using predicate techniques.
3. Statistical system for APP own traffic as claimed in claim 1 or 2 characterized in that the action execution repository (9) collects data using key-value coding technique according to the data format configured in the data format description repository (6).
4. A statistical method for the APP own traffic using the statistical system according to any one of claims 1 to 3, characterized by comprising the steps of:
a, mapping a statistical service description library (3) which is oriented to APP self service section programming to a condition description library (4), a data format description library (6) and an action description library (5) in a service description mode;
b, loading the data in the statistical service library (1) into a statistical engine module (2) by a loading resolver (7);
c, the statistical engine module (2) generates an identification network (8) consisting of conditions and actions according to the loaded data in the statistical service library (1);
d, the identification network (8) detects whether the condition in the identification network (8) is triggered or not by using a reflection mechanism, if the identification network (8) detects that the condition is triggered, the identification network (8) performs condition matching by using a Rete algorithm, and if the condition matching is successful, the step E is skipped; if the condition matching is not successful, circularly executing the step D;
and E, the recognition network (8) informs the action execution library (9) to execute the action associated with the matching condition, and the action execution library (9) collects and outputs data according to the data format configured in the data format description library (6).
5. Statistical method for APP self traffic in accordance with claim 4 characterized in that in said step D the recognition network (8) also uses predicate and key-value coding techniques to detect if conditions in the recognition network (8) are triggered.
6. Statistical method for APP self-traffic as per claim 4 or 5, characterized in that in step E the action execution library (9) collects data using key-value coding technique according to the data format configured in the data format description library (6).
CN201810094167.7A 2018-01-31 2018-01-31 Statistical system and method for APP self service Active CN108196875B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810094167.7A CN108196875B (en) 2018-01-31 2018-01-31 Statistical system and method for APP self service

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810094167.7A CN108196875B (en) 2018-01-31 2018-01-31 Statistical system and method for APP self service

Publications (2)

Publication Number Publication Date
CN108196875A CN108196875A (en) 2018-06-22
CN108196875B true CN108196875B (en) 2021-07-09

Family

ID=62591459

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810094167.7A Active CN108196875B (en) 2018-01-31 2018-01-31 Statistical system and method for APP self service

Country Status (1)

Country Link
CN (1) CN108196875B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1878083A (en) * 2005-06-09 2006-12-13 华为技术有限公司 Method and system for recording usage network capability and application therefor
CN102495832A (en) * 2011-12-12 2012-06-13 方正国际软件有限公司 System for automatically generating document in software development process
CN104756074A (en) * 2012-10-29 2015-07-01 高通股份有限公司 Rules engine as a platform for mobile applications
CN105450457A (en) * 2015-12-14 2016-03-30 四川长虹电器股份有限公司 Management method for applications in open platform
CA2627893C (en) * 2008-03-31 2016-09-13 Prophix Software Inc. Method and system for performing data manipulations associated with business processes and operations
CN107506293A (en) * 2016-06-14 2017-12-22 中兴通讯股份有限公司 A kind of software performance data acquisition method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9170917B2 (en) * 2011-04-01 2015-10-27 Paypal, Inc. Flow tracing though diverse logical and physical application and infrastructure layers/dependencies

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1878083A (en) * 2005-06-09 2006-12-13 华为技术有限公司 Method and system for recording usage network capability and application therefor
CA2627893C (en) * 2008-03-31 2016-09-13 Prophix Software Inc. Method and system for performing data manipulations associated with business processes and operations
CN102495832A (en) * 2011-12-12 2012-06-13 方正国际软件有限公司 System for automatically generating document in software development process
CN104756074A (en) * 2012-10-29 2015-07-01 高通股份有限公司 Rules engine as a platform for mobile applications
CN105450457A (en) * 2015-12-14 2016-03-30 四川长虹电器股份有限公司 Management method for applications in open platform
CN107506293A (en) * 2016-06-14 2017-12-22 中兴通讯股份有限公司 A kind of software performance data acquisition method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"How the Rete Algorithm Works";Carole-Ann Berlioz;《https://www.sparklinglogic.com/rete-algorithm-demystified-part-2/》;20110314;全文 *
"移动应用要如何埋点上传才能收集更多数据";刈刀(程君杰);《https://dbaplus.cn/news-21-633-1.html》;20160825;全文 *

Also Published As

Publication number Publication date
CN108196875A (en) 2018-06-22

Similar Documents

Publication Publication Date Title
US11620286B2 (en) Continuous cloud-scale query optimization and processing
JP5864583B2 (en) Support for parameterized queries / views in complex event processing
US9489189B2 (en) Dynamically generate and execute a context-specific patch installation procedure on a computing system
CN106062751B (en) Management of data profiling operations relating to data types
CN107003931B (en) Decoupling test validation from test execution
US10013242B2 (en) Distributed compilation of statically typed languages
WO2021057252A1 (en) Service processing flow configuration method and apparatus, and service request processing method and apparatus
US20200117433A1 (en) Code optimization conversations for connected managed runtime environments
WO2019179408A1 (en) Construction of machine learning model
CN112540767B (en) Program code generation method and device, electronic equipment and storage medium
KR20200071877A (en) Method and System for information extraction using a self-augmented iterative learning
US11301221B2 (en) Rapid code compiling system
CN111240772A (en) Data processing method and device based on block chain and storage medium
WO2020038376A1 (en) Method and system for uniformly performing feature extraction
US20130019230A1 (en) Program Generating Apparatus, Method of Generating Program, and Medium
CN108196875B (en) Statistical system and method for APP self service
US20220083320A1 (en) Maintenance of computing devices
US11953979B2 (en) Using workload data to train error classification model
CN110489128B (en) Method and apparatus for converting feature computation script into underlying program code
CN111771195A (en) Stream processing apparatus and data stream processing method
US11468339B2 (en) Agnostic data structure for debriefing predictive software
CN110825530B (en) Instruction execution method and device for artificial intelligence chip
CN109976805B (en) Event-driven architecture mode identification method based on ontology
CN111475375A (en) Data state updating method and equipment
CN113596043B (en) Attack detection method, attack detection device, storage medium and electronic device

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
GR01 Patent grant
GR01 Patent grant