CN110806902A - Data processing method, application portrait method and device - Google Patents

Data processing method, application portrait method and device Download PDF

Info

Publication number
CN110806902A
CN110806902A CN201810793475.9A CN201810793475A CN110806902A CN 110806902 A CN110806902 A CN 110806902A CN 201810793475 A CN201810793475 A CN 201810793475A CN 110806902 A CN110806902 A CN 110806902A
Authority
CN
China
Prior art keywords
application
information
component
component information
configuration information
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.)
Granted
Application number
CN201810793475.9A
Other languages
Chinese (zh)
Other versions
CN110806902B (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.)
Consumer Finance Ltd By Share Ltd
Original Assignee
Consumer Finance Ltd By Share 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 Consumer Finance Ltd By Share Ltd filed Critical Consumer Finance Ltd By Share Ltd
Priority to CN201810793475.9A priority Critical patent/CN110806902B/en
Publication of CN110806902A publication Critical patent/CN110806902A/en
Application granted granted Critical
Publication of CN110806902B publication Critical patent/CN110806902B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Abstract

The invention provides a data processing method, an application portrait method and a device, wherein the data processing method comprises the following steps: acquiring configuration information of an application, and acquiring component information of the application from the configuration information. The data processing method provided by the invention can be used for acquiring the applied component information simply and conveniently.

Description

Data processing method, application portrait method and device
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a data processing method, an application representation method, and an application representation device.
Background
With the rapid development of distributed services, a back-end system becomes huge, the dependency relationship among components is complicated, and the service condition management of the components is complicated.
In the prior art, the calling situation of the application (e.g., the application based on the SpringBoot) to the component can be collected through a log burying technology and the like, stored in a database (e.g., the Mysql database), and the data can be queried through a Web application and displayed on a page. However, the operation of acquiring the components associated with the application is inconvenient because the requirements of the number, the positions and the like of the buried points are inconsistent for different components.
In the prior art, no effective solution is proposed at present for the problem that the operation of obtaining the application-related component is inconvenient.
Disclosure of Invention
The embodiment of the invention provides a data processing method, an application portrait method and an application portrait device, and aims to solve the problem that operation of obtaining application-related components is inconvenient.
In order to solve the technical problem, the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides a data processing method. The method comprises the following steps:
acquiring configuration information of an application;
and acquiring the component information of the application from the configuration information.
In a second aspect, an embodiment of the present invention provides an application image method. The method comprises the following steps:
acquiring application portrait information, wherein the application portrait information comprises application component information, and the application component information is determined according to the data processing method provided by the first aspect;
and according to the acquired application portrait information, the application portrait is displayed.
In a third aspect, an embodiment of the present invention further provides a data processing apparatus. The data processing apparatus includes:
the first acquisition module is used for acquiring the configuration information of the application;
and the second acquisition module is used for acquiring the component information of the application from the configuration information.
In a fourth aspect, an application image device is also provided in the embodiments of the present invention. The application image device comprises:
an obtaining module, configured to obtain application representation information, where the application representation information includes application component information, and the application component information is determined according to the data processing method provided in the first aspect;
and the portrait module is used for portraying the application according to the acquired application portrait information.
In a fifth aspect, an embodiment of the present invention further provides a data processing apparatus, which includes a processor, a memory, and a computer program stored on the memory and executable on the processor, where the computer program, when executed by the processor, implements the steps of the data processing method described above.
In a sixth aspect, an embodiment of the present invention further provides an application rendering apparatus, including a processor, a memory, and a computer program stored on the memory and executable on the processor, where the computer program, when executed by the processor, implements the steps of the application rendering method described above.
In a seventh aspect, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the data processing method are implemented.
In an eighth aspect, the embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements the steps of the application imaging method described above.
In the embodiment of the invention, the configuration information of the application is acquired, and the component information of the application is acquired from the configuration information, so that the component information of the application can be acquired simply and conveniently.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive exercise.
FIG. 1 is a flow chart of a data processing method provided by an embodiment of the invention;
FIG. 2 is a flow chart of a data processing method according to another embodiment of the present invention;
FIG. 3 is a flow chart of an application representation method according to an embodiment of the present invention;
FIG. 4 is a block diagram of a data processing apparatus provided by an embodiment of the present invention;
FIG. 5 is a block diagram of a data processing apparatus according to yet another embodiment of the present invention;
FIG. 6 is a block diagram of an application rendering apparatus according to an embodiment of the present invention;
FIG. 7 is a block diagram of a data processing apparatus according to yet another embodiment of the present invention;
FIG. 8 is a block diagram of an application image device according to another embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides a data processing method. Referring to fig. 1, fig. 1 is a flowchart of a data processing method according to an embodiment of the present invention, as shown in fig. 1, including the following steps:
step 101, obtaining configuration information of an application.
In this embodiment of the present invention, the configuration information of the application may include at least one of configuration information stored locally by the application and configuration information stored by the configuration center. The configuration information may include component information, thread pool configuration information, global constant configuration information, and the like.
In this step, the configuration information of the application may be directly obtained from the local and/or configuration center, or the configuration information obtained when the application is started may be obtained.
And 102, acquiring the component information of the application from the configuration information.
In this embodiment of the present invention, the application may be a Java-based application (for example, a SpringBoot-based application), or an application based on other development frameworks, for example, an Objective-C-based application, or a C + + -based application, which is not limited in this embodiment of the present invention.
The application-associated components (i.e., application-callable components) may include, but are not limited to, one or more of database type components (e.g., one or more of Mysql database, Hbase database, Neo4j database, Oracle database, and Mongodb database, etc.), message intermediate type components (e.g., one or more of Kafka message component, RabbitMq message component, and ActiveMq message component, etc.), cache type components (e.g., one or more of Redis cache component, and Memcache cache component, etc.), File storage type components (e.g., one or more of FastDfs, FTP (File Transfer Protocol), and SFTP (Secure File Transfer Protocol), etc.), and the like.
The component information may include, but is not limited to, a component name, a component IP (Internet Protocol), a component Port (i.e., Port), and the like. For example, the component information of the Kafka message component may include: "Name": Kafka "," IP ": 192.168.1.10", "Port": 9092 ". It is to be understood that the component information of the above application may include component information of one or at least two components, for example, the component information associated with the application a may include component information of the Kafka message component and component information of the Mysql database.
In this step, the component information of the application may be acquired from the configuration information by analyzing the content of the configuration information, or the component information of the application may be acquired from the configuration information according to the feature information (for example, name) of the component configuration file.
Specifically, in the prior art, the component information of the application is acquired through the log embedded points, and for different components, the requirements on the number, the positions and the like of the embedded points are inconsistent, so that the operation is inconvenient. In addition, the log burying point completely depends on research and development personnel, the risks of omission and incomplete information easily exist, and the component information can be acquired only after the application requests the corresponding component. The embodiment of the invention acquires the component information of the application by acquiring the configuration information of the application, thereby not only acquiring the component information more simply and conveniently, but also improving the integrity of the acquired component information and avoiding the problem that the component information can be acquired only after the application requests the corresponding component.
It can be understood that after obtaining the component information of the application, the component information of the application may be directly output, or the component information of the application may be stored in a database, which is not limited in this embodiment of the present invention.
Compared with the prior art that the application component information is acquired through the log embedded point, the data processing method of the embodiment of the invention not only is simple and convenient to realize, but also can avoid the problem that the component information can be acquired only after the application requests the corresponding component.
Referring to fig. 2, fig. 2 is a flowchart of a data processing method according to another embodiment of the present invention. The difference between the embodiment of the present invention and the previous embodiment is mainly that the component information is further limited to be stored in the database after the component information of the application is acquired. In this embodiment of the present invention, after obtaining the component information of the application from the configuration information, the method further includes: performing target processing on the component information, wherein the target processing comprises at least one of encapsulation processing, summarization processing and validity verification, the summarization processing comprises summarizing the component information associated with each application instance corresponding to the application, and the validity verification comprises verifying whether the component information is legal and/or verifying whether a component corresponding to the component information is available; and storing the component information processed by the target in a database.
As shown in fig. 2, the data processing method provided in the embodiment of the present invention includes the following steps:
step 201, obtaining configuration information of the application.
This step is the same as the step 101, and is not described herein again to avoid repetition.
Step 202, obtaining the component information of the application from the configuration information.
This step is the same as step 102, and is not repeated herein to avoid repetition.
Step 203, performing target processing on the component information, where the target processing includes at least one of encapsulation processing, summarization processing, and validity verification, the summarization processing includes summarizing the component information associated with each application instance corresponding to the application, and the validity verification includes verifying whether the component information is legal and/or verifying whether a component corresponding to the component information is available.
In this embodiment of the present invention, the encapsulating process may include encapsulating the component information according to a preset format.
The summarizing process includes summarizing component information associated with each application instance corresponding to the application. In practical application, at least two application examples may exist in the same application, and components associated with different application examples may be inconsistent, and at this time, the obtained component information of the application may be more comprehensive and complete by summarizing the component information associated with each application example corresponding to the application.
The verifying whether the component information is legal may include verifying whether an IP format in the component information is legal, verifying whether a port in the component information is accessible, and the like. For example, the IP of the component information of the montodb database is 10.120.120.300, the port is 3308, and the effective range of the IP is 0 to 255, so the IP format in the component information is wrong, that is, the component information of the montodb database is illegal.
It can be understood that, in the embodiment of the present invention, it may be only verified whether the component information is legal, or only verified whether a component corresponding to the component information is available, or whether the component information is legal is verified, and in a case that it is determined that the component information is legal, it is further verified whether a component corresponding to the component information is available.
In the case where the target process includes at least two of the encapsulation process, the aggregation process, and the validity verification, the processes may be performed in any order of processing. The following examples are given to illustrate embodiments of the present invention:
the first condition is as follows: when the target processing includes encapsulation processing and summarization processing, the component information may be summarized first, and then the summarized component information may be encapsulated; the component information may be encapsulated first, and the encapsulated component information may be summarized.
Case two: when the target processing includes encapsulation processing and validity verification, validity verification may be performed on the component information first, and then encapsulation processing may be performed on the component information after validity verification; or the component information is packaged firstly, and then the validity verification is performed on the packaged component information.
Case three: in the case where the target processing includes summarization and validity verification, the component information may be summarized first and then validity verification may be performed on the summarized component information, or validity verification may be performed on the component information first and then summarization may be performed on the validity verified component information.
Case four: under the condition that the target processing comprises packaging processing, summarizing processing and validity verification, the summarizing processing can be executed on the component information, then the packaging processing is executed on the summarized component information, and then the validity verification is executed on the packaged component information; or summarizing the component information, verifying the validity of the summarized component information, and packaging the verified component information; or, the component information may be encapsulated first, then validity verification is performed on the encapsulated component information, and then summary processing is performed on the validity verified component information.
And step 204, storing the component information after the target processing in a database.
In the embodiment of the present invention, the database may be a Mysql database, an Hbase database, a Neo4j database, an Oracle database, a Mongodb database, or the like.
In this step, in the case that the number of applications is one, the component information of the application may be directly stored in the database; in the case where the number of applications is at least two, the component information of each application and the identification information of the application (e.g., application name, unique identification of the application, etc.) may be stored in the database in association, respectively.
According to the embodiment of the invention, the acquired component information is subjected to target processing and stored in the database, so that a user can conveniently view the component information of the application subsequently to analyze the characteristics of the application.
Optionally, step 204, namely, storing the target processed component information in a database, includes:
generating a unique identifier of the component information after target processing;
storing the unique identifier of the target processed component information and the identifier information of the application in a first storage area of the database in an associated manner;
and the unique identifier of the target processed component information and the target processed component information are stored in a second storage area of the database in an associated manner.
In the embodiment of the invention, the unique identifier can be a combination of one or more of numbers, letters, Chinese characters and the like, the unique identifiers of the component information of the same component are the same, and the unique identifiers of the component information of different components are different. For example, when the database is the Hbase database, the unique identifier may be a row key (i.e., RowKey). The identification information of the application may be a name of the application or other information that can uniquely identify the application. The first storage area and the second storage area may be different storage areas in the database, for example, the first storage area and the second storage area are different data tables in the database.
Optionally, in a case that the component information after the target processing includes the component information of at least two components, the unique identifier of the component information of each of the at least two components may be generated respectively. For example, the target processed component information includes the component information of the Mysql database and the component information of the Kafka message component, and the unique identification Key1 of the component information of the Mysql database and the unique identification Key2 of the component information of the Kafka message component can be generated respectively.
Optionally, the unique identifier of the component information and the component information are stored in a second storage area of the database in an associated manner, and may be stored in the second storage area in a form of a key-value pair, where the unique identifier of the component information is a key and the component information is a value.
In practical applications, the same component may be called by multiple applications, that is, the component information of the same component may be associated with multiple applications. The embodiment of the invention generates the unique identifier of each component information, stores each component information and the corresponding unique identifier in an associated manner, and stores the unique identifier of each component information and the identifier information of the associated application in an associated manner, thereby reducing repeated storage of the component information and improving data access efficiency.
Optionally, the step 101 or the step 201, that is, the obtaining the configuration information of the application, includes:
acquiring configuration information of an application based on Java in a mode of enhancing byte codes based on Java; or
And receiving the configuration information acquired and reported by the application.
In the embodiment of the present invention, the Java enhanced bytecode may refer to modifying the Java bytecode after generating the Java bytecode, so as to enhance the function of the Java bytecode. The Java-based application may include a SpringBoot-based application.
In an embodiment, a Java-based application can be intercepted for obtaining a code related to configuration information based on a Java enhanced bytecode manner to obtain configuration information of the Java-based application, so that the configuration information of the Java-based application can be obtained without modifying the application code.
In another embodiment, the configuration information obtained and reported by the application may be received, that is, the application may actively report the configuration information after obtaining the configuration information, and this configuration information obtaining manner may improve the accuracy of the obtained configuration information.
Optionally, the step 101 or the step 201, that is, the obtaining the configuration information of the application, includes: and acquiring the configuration information acquired when the application is started.
In the embodiment of the invention, the configuration information acquired when the application is started can be intercepted, and the accuracy of the acquired configuration information can be improved.
Optionally, the step 102 or the step 202, that is, the obtaining component information of the application from the configuration information, includes:
and screening the applied component information from the configuration information according to a preset component configuration naming rule.
In the embodiment of the present invention, the preset component configuration naming rule may be reasonably set according to an actual situation, for example, may be set according to a name constrained in an application specification (e.g., db. mongo. host of a Mongodb database) and/or a recommended configuration name of a component (e.g., bootstraps. servers of a Kafka message component).
The embodiment of the invention screens the component information from the configuration information according to the preset component configuration naming rule, and can improve the efficiency and accuracy of screening the component information.
Optionally, after the step 102 or the step 202, that is, after the obtaining the component information of the application from the configuration information, the method further includes:
when the size of the component information is larger than a preset value, transmitting the component information to a data reporting interface in a fragmentation mode;
transmitting the component information uploaded in the fragments to a data storage interface through the data reporting interface;
and storing the component information in a database through the data storage interface.
In the embodiment of the invention, the preset value can be reasonably set according to actual conditions. Specifically, the component information can be transmitted to the data reporting interface in a fragmented manner when the size of the component information is larger than a preset value, and the component information can be directly transmitted to the data reporting interface when the size of the component information is smaller than or equal to the preset value, so that the transmission speed is increased.
In the embodiment of the invention, the data reporting interface can receive component information of different applications and transmit the received component information to the data storage interface so as to store the component information in the database, thereby facilitating the unified management of data. It should be noted that, while different component information is transmitted to the data reporting interface, the identification information of the application associated with each component information may be transmitted to the data reporting interface together.
Optionally, in the embodiment of the present invention, the received component information of the application may be stored according to different dimensions, so that data may be queried based on different dimensions, for example, all applications associated with a certain component may be queried, and component information of all components associated with a certain application may also be queried.
Optionally, in the embodiment of the present invention, the application portrait information, that is, the component information associated with the application, may be queried through the browser, so that characteristics of the application and associated information between the application and the application may be analyzed.
The following describes embodiments of the present invention with reference to examples:
step a, starting an application based on the SpringBoot to acquire external configuration information of a local or configuration center.
And b, intercepting the external configuration information acquired by the application, and screening component information from the external configuration information.
In this step, configuration information obtained by starting an application based on the SpringBoot may be intercepted in a manner based on Java enhanced bytecode.
Optionally, the embodiment of the present invention may further perform encapsulation processing on the component information obtained by screening.
In practical applications, the component information may be, for example, "IP: port "or" IP 1: port1, IP 2: port2 ", etc., requires the splitting and packaging of component information.
And c, transmitting the packaged component information to a data reporting interface through a User Datagram Protocol (UDP).
In this step, if the size of the packaged component information is larger than a preset value, the component information can be fragmented and transmitted to a data reporting interface.
It should be noted that the data reporting interface may receive component information of different applications, and therefore, the component information is transmitted to the data reporting interface, and meanwhile, the identification information of the application associated with the component information may be transmitted to the data reporting interface.
D, the data reporting interface carries out validity verification on the packaged component information and transmits the component information passing the validity verification to the data storage interface.
In this step, the validity verification may include verification of the component information itself (e.g., whether the IP format is illegal, whether the port is illegal, etc.) and verification of whether a component corresponding to the component information is available.
For example, the IP of the component information of the montodb database is 10.120.120.300, the port is 3308, and the effective range of the IP is 0 to 255, so the IP format in the component information is wrong, that is, the component information of the montodb database is illegal.
And e, after the data storage interface receives the component information, storing the received component information into an Hbase database.
In this step, the data storage interface may receive component information of different applications and store the component information in the Hbase database. Optionally, the received data may be stored according to different dimensions, so that the data may be queried based on the different dimensions, for example, all applications associated with a certain component may be queried, component information of all components associated with a certain application may also be queried, and the like.
It is understood that data conversion may be performed prior to data storage, for example, the component information is stored in the Hbase database, and then the component information in the application-component is converted into a row key (i.e., Rowkey) for storage. This may improve access efficiency since component information may be associated with multiple applications.
For example, if the application example a includes the component B, the component information of the component B is stored in the Hbase database and is marked with KeyC, and the application example a only needs to record KeyC.
And f, accessing the database through the browser to inquire the application portrait information, namely the application component information.
In the embodiment of the invention, the configuration information obtained by starting the application based on the SpringBoot is intercepted based on a Java enhanced byte code mode, the application code does not need to be modified, and the processing irrelevant to the service in the application code can be simplified. The data are stored based on the Hbase database, the requirement for mass data storage can be met, and different components are called to collect different data in an adaptive mode. Acquiring component information based on configuration information can avoid the problem that component information can be acquired only when an application requests a corresponding component.
In addition, under the condition that the application has different configurations, such as global configuration, category configuration, application configuration and the like, the effective information in the application configuration can be quickly diagnosed through the component information acquired by the embodiment of the invention.
The embodiment of the invention also provides an application portrait method. Referring to fig. 3, fig. 3 is a flowchart of an application representation method according to an embodiment of the present invention, as shown in fig. 3, including the following steps:
step 301, obtaining application image information, where the application image information includes application component information, and the application component information is determined according to the data processing method.
It can be understood that, for the related content of the data processing method, reference may be made to the related description in the foregoing data processing method embodiment, and details are not repeated herein to avoid repetition.
Step 302, the application representation is displayed according to the obtained application representation information.
In the embodiment of the invention, the application portrait information comprises the component information of the application, so that the application is portrait based on the application portrait information, the dependency relationship between the application and the component can be obtained, a user can know the component used by the application and the component related application conveniently, and reliable data support is provided for application transformation.
Optionally, the application representation information may further include target information, where the target information may include at least one of index information of the component indicated by the component information, an operation state of the component, index information of the application, and membership information of the application.
In the embodiment of the present invention, the index information of the component may include, but is not limited to, one or more items of general index information such as a request amount, a response time, an error rate, and the like of the component. In addition, the index information of the above-mentioned components may also include specific index information set for different types of components, for example, for a file storage type component, the specific index information may include information of operations such as uploading and downloading, and for a database type component, the specific index information may include information of operations such as querying, adding, updating, and deleting. Optionally, in the embodiment of the present invention, index information of each component may be recorded by an Agent (i.e., Agent).
The operation status of the above components may include, but is not limited to, one or more of request amount, response time, CPU load, memory, disk, and the like. It is understood that the component of the application may be a component or a cluster of components. Optionally, in the embodiment of the present invention, the operation state of the component or the component cluster may be obtained through a monitoring system corresponding to the component.
The index information of the application may include, but is not limited to, one or more of request amount, response time, error rate, and the like of the application. Optionally, in the embodiment of the present invention, index information of each application may be recorded by an Agent (i.e., Agent).
The membership information of the application may include, but is not limited to, one or more items of information of departments, product lines, system responsible persons, system grades, and the like. Optionally, in the embodiment of the present invention, the membership information of each application may be acquired through an external system.
In the embodiment of the invention, the application image can be performed based on the information of the plurality of dimensions. The following is illustrated by way of example:
for application A, the database type component comprises 3 databases, namely a Mysql database, a Mongdb database and an Hbase database; the file storage type component of application a includes FTP, then application a may be rendered as follows:
the application name is as follows: a;
the basic information of the application includes:
the operation time is as follows: t1;
amount requested per day: s1;
average response time: t isavr1
Maximum response time: t ismax1
The membership information of the application includes:
and (4) department: a department;
product line: a, a product line;
system level: a 1;
the system responsible person: zhang III;
and (4) contacting the telephone: (ii) a;
the component information includes:
database type component:
1) MySQL database
Service address: XXX;
request amount: s2 (ratio: y 1%);
average response time: t isavr2
Maximum response time: t ismax2
2) Mongodb database
Service address: YYY;
request amount: s3 (ratio: y 2%);
average response time: t isavr3
Maximum response time: t ismax3
3) Hbase database
Service address: ZZZ;
request amount: s4 (ratio: y 3%);
average response time: t isavr4
Maximum response time: t ismax4
The file storage type component includes:
1)、FTP
service address: a UUU;
request amount: s5 (ratio: y 4%);
average response time: t isavr5
Maximum response time: t ismax5
Average data amount: pavr
Maximum data size: pmax
The operation comprises the following steps:
uploading: r1 (ratio: y 5%);
download: R2 (ratio: y 6%).
Optionally, in the embodiment of the present invention, the dynamic data may be determined based on a determination rule (for example, a threshold corresponding to different preset indicators) preset for dynamic data (for example, indicator information of an application, an operating state of the application, indicator information of a component server, and the like) in the application representation information, so as to find a possible problem point, and may output prompt information.
For example, for the application a, if the access amount of the montodb database is lower than the corresponding threshold, the following prompt information may be output: the database type components on which the application A depends are too many (3), and whether MongoDB can be unavailable (the access amount is too low); if the number of times of calling the FTP component is greater than the corresponding first threshold value and the data volume is less than the corresponding second threshold value, the following prompt information can be output: FTP calls are frequent, the data volume is small, and Redis cache can be used for replacement.
According to the embodiment of the invention, the application is portrayed according to the application portrayal information, so that a user can visually check the dependency relationship between the application and the component, the component state used by the application and the application related to the component can be clearly known, reliable data support is provided for application transformation, and possible problem points can be timely found.
The data processing method and the application image method may be executed by the same electronic device, or may be executed by different electronic devices.
Referring to fig. 4, fig. 4 is a block diagram of a data processing apparatus according to an embodiment of the present invention. As shown in fig. 4, the data processing apparatus 400 includes: a first obtaining module 401 and a second obtaining module 402, wherein:
a first obtaining module 401, configured to obtain configuration information of an application;
a second obtaining module 402, configured to obtain component information of the application from the configuration information.
Optionally, the first obtaining module 401 is specifically configured to:
acquiring configuration information of an application based on Java in a mode of enhancing byte codes based on Java; or
And receiving the configuration information acquired and reported by the application.
Optionally, the first obtaining module 401 is specifically configured to:
and acquiring the configuration information acquired when the application is started.
Optionally, the second obtaining module 402 includes:
and the screening unit is used for screening the applied component information from the configuration information according to a preset component configuration naming rule.
Optionally, referring to fig. 5, the apparatus further includes:
a processing module 403, configured to perform target processing on the component information after obtaining the component information of the application from the configuration information, where the target processing includes at least one of encapsulation processing, summarization processing, and validity verification, where the summarization processing includes summarizing the component information associated with each application instance corresponding to the application, and the validity verification includes verifying whether the component information is legal and/or verifying whether a component corresponding to the component information is available;
the first storage module 404 is configured to store the target processed component information in a database.
Optionally, the first storage module 404 is specifically configured to:
generating a unique identifier of the component information after target processing;
storing the unique identifier of the target processed component information and the identifier information of the application in a first storage area of the database in an associated manner;
and the unique identifier of the target processed component information and the target processed component information are stored in a second storage area of the database in an associated manner.
Optionally, the apparatus further comprises:
the first transmission module is used for transmitting the component information in a fragmentation manner to a data reporting interface under the condition that the size of the component information is larger than a preset value after the component information of the application is acquired from the configuration information;
the second transmission module is used for transmitting the component information uploaded by the fragments to a data storage interface through the data reporting interface;
and the second storage module is used for storing the component information in a database through the data storage interface.
The data processing apparatus 400 provided in the embodiment of the present invention can implement each process in the method embodiments of fig. 1 to fig. 2, and is not described herein again to avoid repetition.
In the data processing apparatus 400 according to the embodiment of the present invention, the first obtaining module 401 is configured to obtain configuration information of an application; the second obtaining module 402 is configured to obtain the component information of the application from the configuration information, and compared with obtaining the component information of the application through a log buried point in the prior art, the second obtaining module is not only simple and convenient to implement, but also can avoid a problem that the component information can be obtained only after the application requests a corresponding component.
Referring to fig. 6, fig. 6 is a structural diagram of an application image device according to an embodiment of the present invention. As shown in fig. 6, the application image device 600 includes: an acquisition module 601 and a portrait module 602, wherein:
an obtaining module 601, configured to obtain application representation information, where the application representation information includes application component information, and the application component information is determined according to the data processing method provided in the first aspect;
a representation module 602, configured to represent the application representation according to the obtained application representation information.
Optionally, the application portrait information further includes target information, where the target information includes at least one of index information of the component indicated by the component information, an operating state of the component, index information of the application, and membership information of the application.
The application representation apparatus 600 according to the embodiment of the present invention can implement each process in the method embodiment of fig. 3, and is not described herein again to avoid repetition.
In the application representation apparatus 600 of the embodiment of the present invention, the obtaining module 601 is configured to obtain application representation information, where the application representation information includes application component information, and the application component information is determined according to the data processing method provided in the first aspect; the representation module 602 is configured to represent the application according to the obtained application representation information, so that a user can visually check a dependency relationship between the application and the component, and the user can know the component used by the application and the application associated with the component.
Referring to fig. 7, fig. 7 is a block diagram of a data processing apparatus according to still another embodiment of the present invention, and as shown in fig. 7, a data processing apparatus 700 includes: a processor 701, a memory 702 and a computer program stored on said memory 702 and executable on said processor, the various components in the data processing device 700 being coupled together by a bus interface 703, said computer program realizing the following steps when executed by said processor 701:
acquiring configuration information of an application;
and acquiring the component information of the application from the configuration information.
Optionally, the computer program is further configured to, when executed by the processor 701, implement the following steps:
acquiring configuration information of an application based on Java in a mode of enhancing byte codes based on Java; or
And receiving the configuration information acquired and reported by the application.
Optionally, the computer program is further configured to, when executed by the processor 701, implement the following steps:
and acquiring the configuration information acquired when the application is started.
Optionally, the computer program is further configured to, when executed by the processor 701, implement the following steps:
and screening the applied component information from the configuration information according to a preset component configuration naming rule.
Optionally, the computer program is further configured to, when executed by the processor 701, implement the following steps:
after acquiring the component information of the application from the configuration information, performing target processing on the component information, wherein the target processing includes at least one of encapsulation processing, summarization processing and validity verification, the summarization processing includes summarizing the component information associated with each application instance corresponding to the application, and the validity verification includes verifying whether the component information is legal and/or verifying whether a component corresponding to the component information is usable;
and storing the component information processed by the target in a database.
Optionally, the computer program is further configured to, when executed by the processor 701, implement the following steps:
generating a unique identifier of the component information after target processing;
storing the unique identifier of the target processed component information and the identifier information of the application in a first storage area of the database in an associated manner;
and the unique identifier of the target processed component information and the target processed component information are stored in a second storage area of the database in an associated manner.
Optionally, the computer program is further configured to, when executed by the processor 701, implement the following steps:
after acquiring the component information of the application from the configuration information, transmitting the component information to a data reporting interface in a fragmentation mode under the condition that the size of the component information is larger than a preset value;
transmitting the component information uploaded in the fragments to a data storage interface through the data reporting interface;
and storing the component information in a database through the data storage interface.
Optionally, an embodiment of the present invention further provides a data processing apparatus, which includes a processor 701, a memory 702, and a computer program that is stored in the memory 702 and is executable on the processor 701, and when the computer program is executed by the processor 701, the computer program implements each process of the data processing method embodiment, and can achieve the same technical effect, and details are not described here to avoid repetition.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the data processing method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
Referring to fig. 8, fig. 8 is a block diagram of an application image device according to another embodiment of the present invention, and as shown in fig. 8, the application image device 800 includes: a processor 801, a memory 802 and a computer program stored on the memory 802 and executable on the processor, the various components of the application rendering device 800 being coupled together by a bus interface 803, the computer program when executed by the processor 801 implementing the steps of:
acquiring application portrait information, wherein the application portrait information comprises application component information, and the application component information is determined according to the data processing method;
and according to the acquired application portrait information, the application portrait is displayed.
Optionally, the application portrait information further includes target information, where the target information includes at least one of index information of the component indicated by the component information, an operating state of the component, index information of the application, and membership information of the application.
Optionally, an application image device according to an embodiment of the present invention further includes a processor 801, a memory 802, and a computer program stored in the memory 802 and capable of running on the processor 801, where the computer program is executed by the processor 801 to implement the processes of the application image method embodiment, and can achieve the same technical effects, and in order to avoid redundancy, the application image device is not described herein again.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the above embodiment of the image application method, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It should be noted that, in this document, 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 an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
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 (15)

1. A data processing method, comprising:
acquiring configuration information of an application;
and acquiring the component information of the application from the configuration information.
2. The method of claim 1, wherein the obtaining configuration information of the application comprises:
acquiring configuration information of an application based on Java in a mode of enhancing byte codes based on Java; or
And receiving the configuration information acquired and reported by the application.
3. The method of claim 1, wherein the obtaining configuration information of the application comprises:
and acquiring the configuration information acquired when the application is started.
4. The method of claim 1, wherein the obtaining component information of the application from the configuration information comprises:
and screening the applied component information from the configuration information according to a preset component configuration naming rule.
5. The method according to any one of claims 1 to 4, wherein after the obtaining the component information of the application from the configuration information, the method further comprises:
performing target processing on the component information, wherein the target processing comprises at least one of encapsulation processing, summarization processing and validity verification, the summarization processing comprises summarizing the component information associated with each application instance corresponding to the application, and the validity verification comprises verifying whether the component information is legal and/or verifying whether a component corresponding to the component information is available;
and storing the component information processed by the target in a database.
6. The method of claim 5, wherein storing the target processed component information in a database comprises:
generating a unique identifier of the component information after target processing;
storing the unique identifier of the target processed component information and the identifier information of the application in a first storage area of the database in an associated manner;
and the unique identifier of the target processed component information and the target processed component information are stored in a second storage area of the database in an associated manner.
7. The method according to any one of claims 1 to 4, wherein after the obtaining the component information of the application from the configuration information, the method further comprises:
when the size of the component information is larger than a preset value, transmitting the component information to a data reporting interface in a fragmentation mode;
transmitting the component information uploaded in the fragments to a data storage interface through the data reporting interface;
and storing the component information in a database through the data storage interface.
8. A method for applying an image, comprising:
obtaining application representation information, the application representation information comprising component information of an application, the component information of the application being determined according to the data processing method of any one of claims 1-7;
and according to the acquired application portrait information, the application portrait is displayed.
9. The method of claim 8, wherein the application representation information further comprises target information, wherein the target information comprises at least one of index information of a component indicated by the component information, an operation state of the component, index information of the application, membership information of the application.
10. A data processing apparatus, comprising:
the first acquisition module is used for acquiring the configuration information of the application;
and the second acquisition module is used for acquiring the component information of the application from the configuration information.
11. An application image device, comprising:
an obtaining module configured to obtain application representation information, the application representation information including component information of an application, the component information of the application being determined according to the data processing method of any one of claims 1 to 7;
and the portrait module is used for portraying the application according to the acquired application portrait information.
12. A data processing apparatus comprising a processor, a memory and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the data processing method as claimed in any one of claims 1 to 7.
13. An application rendering device comprising a processor, a memory and a computer program stored on the memory and executable on the processor, the computer program when executed by the processor implementing the steps of the application rendering method as claimed in any one of claims 8 to 9.
14. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the data processing method according to any one of claims 1 to 7.
15. A computer-readable storage medium, having stored thereon a computer program which, when executed by a processor, carries out the steps of an application representation method as claimed in any one of claims 8 to 9.
CN201810793475.9A 2018-07-18 2018-07-18 Data processing method, application portrait method and device Active CN110806902B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810793475.9A CN110806902B (en) 2018-07-18 2018-07-18 Data processing method, application portrait method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810793475.9A CN110806902B (en) 2018-07-18 2018-07-18 Data processing method, application portrait method and device

Publications (2)

Publication Number Publication Date
CN110806902A true CN110806902A (en) 2020-02-18
CN110806902B CN110806902B (en) 2021-09-03

Family

ID=69486648

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810793475.9A Active CN110806902B (en) 2018-07-18 2018-07-18 Data processing method, application portrait method and device

Country Status (1)

Country Link
CN (1) CN110806902B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101876913A (en) * 2010-01-05 2010-11-03 深圳中兴网信科技有限公司 Software component management method and software component manager
CN102541598A (en) * 2011-12-26 2012-07-04 深圳联友科技有限公司 Method and system for dynamically loading component
CN103324517A (en) * 2012-03-20 2013-09-25 华为终端有限公司 Off-line application generation and call method, terminal and system
CN105426760A (en) * 2015-11-05 2016-03-23 工业和信息化部电信研究院 Detection method and apparatus for malicious android application
CN106502736A (en) * 2016-10-18 2017-03-15 腾讯科技(深圳)有限公司 Applied program processing method and device
US9760358B2 (en) * 2013-10-30 2017-09-12 Oracle International Corporation System and method for test to production support in a cloud platform environment
US10031735B2 (en) * 2016-09-30 2018-07-24 International Business Machines Corporation Secure deployment of applications in a cloud computing platform

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101876913A (en) * 2010-01-05 2010-11-03 深圳中兴网信科技有限公司 Software component management method and software component manager
CN102541598A (en) * 2011-12-26 2012-07-04 深圳联友科技有限公司 Method and system for dynamically loading component
CN103324517A (en) * 2012-03-20 2013-09-25 华为终端有限公司 Off-line application generation and call method, terminal and system
US9760358B2 (en) * 2013-10-30 2017-09-12 Oracle International Corporation System and method for test to production support in a cloud platform environment
CN105426760A (en) * 2015-11-05 2016-03-23 工业和信息化部电信研究院 Detection method and apparatus for malicious android application
US10031735B2 (en) * 2016-09-30 2018-07-24 International Business Machines Corporation Secure deployment of applications in a cloud computing platform
CN106502736A (en) * 2016-10-18 2017-03-15 腾讯科技(深圳)有限公司 Applied program processing method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
张真: "微服务治理实战:服务流的自动化构建与应用", 《HTTPS://DBAPLUS.CN/NEWS-141-932-1.HTML》 *
麦田守望者: "应⽤软件中的性能分析基础教程", 《HTTPS://WWW.OFFICE68.COM/COMPUTER/20657.HTML》 *

Also Published As

Publication number Publication date
CN110806902B (en) 2021-09-03

Similar Documents

Publication Publication Date Title
US11188443B2 (en) Method, apparatus and system for processing log data
CN109257451B (en) Corresponding relation analysis method and equipment
US20140059381A1 (en) Methods for testing odata services
CN113452780B (en) Access request processing method, device, equipment and medium for client
CN109194749B (en) Method for monitoring network request and storage medium
CN106713242B (en) Data request processing method and processing device
CN112632129A (en) Code stream data management method, device and storage medium
US7539776B1 (en) Dynamic uniform resource locator compression
CN114422439A (en) Interface current limiting method and device, computer equipment and storage medium
CN111680247B (en) Local calling method, device and equipment of webpage character strings and storage medium
WO2012119496A1 (en) Pre-reading method and equipment
CN110806902B (en) Data processing method, application portrait method and device
CN110138599B (en) Domain Name System (DNS) query method, device, medium and electronic equipment based on domain name association degree
CN110633432A (en) Method, device, terminal equipment and medium for acquiring data
US20190014130A1 (en) Detecting safe internet resources
CN112202785B (en) Uploaded file processing method, device and equipment and computer storage medium
CN114500484A (en) Page rendering method and device, electronic equipment and readable medium
CN110990153B (en) Dubbo interface caching method and device under distributed environment based on SpringCache
EP2164231A1 (en) Mobile phone optimized online communication
CN114461485A (en) Resource loading monitoring method, device, equipment and storage medium
CN109688204B (en) File downloading method, node and terminal based on NDN (named data networking)
CN112231566A (en) Information pushing method, device and system and readable storage medium
CN112788077A (en) Data acquisition method and device, computer equipment and computer-readable storage medium
CN116304458B (en) Method, device, equipment and medium for web page real-time notification update
CN109324858B (en) Method and device for acquiring display content in webpage

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant