CN108959046B - Information processing method, equipment and device - Google Patents

Information processing method, equipment and device Download PDF

Info

Publication number
CN108959046B
CN108959046B CN201810587160.9A CN201810587160A CN108959046B CN 108959046 B CN108959046 B CN 108959046B CN 201810587160 A CN201810587160 A CN 201810587160A CN 108959046 B CN108959046 B CN 108959046B
Authority
CN
China
Prior art keywords
data
application
service
response message
container
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
CN201810587160.9A
Other languages
Chinese (zh)
Other versions
CN108959046A (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.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing 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 Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN201810587160.9A priority Critical patent/CN108959046B/en
Publication of CN108959046A publication Critical patent/CN108959046A/en
Application granted granted Critical
Publication of CN108959046B publication Critical patent/CN108959046B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring

Abstract

The embodiment of the invention discloses an information processing method, equipment and a device, wherein the method comprises the following steps: when a first instruction for starting an application is received by a starting service, acquiring a first container based on the first instruction, wherein the first container is a container corresponding to the application; the starting service starts the first container based on the first instruction, wherein the first container is internally provided with a proxy service; the agent service acquires data generated in the running process of the application through a first plug-in; the proxy service sends the data to a routing service, wherein the routing service is not in the first container.

Description

Information processing method, equipment and device
Technical Field
The present invention relates to the field of information processing technologies, and in particular, to an information processing method, device, and apparatus.
Background
At present, when a container arrangement system (kubernets) is used for dynamically generating running services, if the services run, service developers can monitor the running states of the services in real time. Once the container is destroyed, information such as logs when the application in the container runs is lost, and the application cannot be analyzed effectively. In this case, the service developer cannot effectively evaluate the service operation condition.
Disclosure of Invention
In view of the above, embodiments of the present invention provide an information processing method, device and apparatus for solving the problems in the prior art, which can save the relevant data of the application in the container, thereby improving the reliability of the system.
The technical scheme of the embodiment of the invention is realized as follows:
in one aspect, an embodiment of the present invention provides an information processing method applied to an electronic device, where the method includes:
when a first instruction for starting an application is received by a starting service, acquiring a first container based on the first instruction, wherein the first container is a container corresponding to the application;
the starting service starts the first container based on the first instruction, wherein the first container is internally provided with a proxy service;
the agent service acquires data generated in the running process of the application through a first plug-in;
the proxy service sends the data to a routing service, wherein the routing service is not in the first container.
In another aspect, an embodiment of the present invention provides an electronic device, where the electronic device at least includes a memory, a communication bus, and a processor, where:
the memory is used for storing an information processing program;
the communication bus is used for realizing connection communication between the processor and the memory;
the processor is configured to execute the information processing program stored in the memory to implement the steps of the information processing method provided by the embodiment of the present invention.
In another aspect, an embodiment of the present invention provides an information processing apparatus, including: first acquisition module, first start module, collection module and first sending module, wherein:
the first obtaining module is used for obtaining a first container based on a first instruction when the first instruction for starting an application is received, wherein the first container is a container corresponding to the application;
the first starting module is configured to start the first container based on the first instruction, where the first container is built-in with a proxy service;
the acquisition module is used for acquiring data generated in the running process of the application through a first plug-in;
a first sending module, configured to send the data to a routing service, where the routing service is not in the first container.
The embodiment of the invention provides an information processing method, equipment and a device, wherein when a starting service receives a first instruction for starting an application, a first container is obtained based on the first instruction, wherein the first container is a container corresponding to the application; then the starting service starts the first container based on the first instruction, wherein the first container is internally provided with proxy service; then the agent service collects data generated in the running process of the application through a first plug-in; finally, the proxy service sends the data to a routing service, wherein the routing service is not in the first container; in this way, since the routing service is not in the first container, the data related to the application in the first container can be obtained from the routing service even if the first container is destroyed, so that the operation state of the application can be evaluated, and the reliability of the system can be further improved.
Drawings
FIG. 1 is a schematic diagram of an implementation flow of an information processing method according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart illustrating another information processing method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an application scenario of an information processing method according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a structure of an electronic device according to an embodiment of the invention;
FIG. 5 is a block diagram of an information processing apparatus according to an embodiment of the present invention.
Detailed Description
The technical solution of the present invention is further elaborated below with reference to the drawings and the specific embodiments.
The present embodiment provides an information processing method, which is applied to an electronic device, and the functions implemented by the information processing method can be implemented by a processor in the electronic device calling a program code, which can be stored in a computer storage medium.
Fig. 1 is a schematic flow chart of an implementation of an information processing method according to an embodiment of the present invention, as shown in fig. 1, the method includes:
step S101, when the starting service receives a first instruction for starting the application, a first container is obtained based on the first instruction.
Here, the step S101 may be implemented by an electronic device, and the electronic device may be an intelligent terminal, for example, a mobile terminal device with wireless communication capability such as a mobile phone (mobile phone), a tablet computer, and a notebook computer, and may also be an intelligent terminal device that is not convenient to move such as a desktop computer and a desktop computer.
The first container is a container corresponding to the application. A container is a collection of interfaces between an application/component and a server platform so that the application/component can be deployed to run on the server conveniently. Applications tend to have many components, for example, most applications require support from a database or middleware service to enable storage, retrieval, and integration of data. Therefore, these services need to be split into application-own containers by design and deployment. Generally, an application runs in one process, and one application corresponds to one container based on the theory that one container only runs one process. Of course, it is not absolute that one application is run in one container, and in some cases, a plurality of applications may be run in one container.
In the embodiment of the present invention, the first instruction for starting the application may be that the user clicks an icon of the application, or that the user performs a preset operation for starting the application, for example, the user performs a preset gesture for starting the application, or sends a preset voice for starting the application. The first instruction carries an identifier of the application.
After the starting service receives the first instruction, acquiring an application identifier carried in the first instruction, and then acquiring a first container corresponding to the application based on the application identifier.
It should be noted that, in this embodiment, one start-up service may be responsible for starting up one application, or one start-up service may be responsible for starting up multiple applications.
Step S102, the start service starts the first container based on the first instruction.
Here, after receiving the first command, the initiating service parses the first command to know the intention of the first command, and responds accordingly based on the first command. In this embodiment, since the first instruction is an instruction for starting an application, and the application is run in the first container, it is necessary to start the first container based on the first instruction.
The first container has an agent service built therein. Since an application is composed of various components, and the components communicate with the container, or the components communicate with other components in the same container through services, the services can be provided by the container by default, that is, the services are built in the container, each component can acquire the services of the container, and each service is responsible for one or more closely related tasks. For example, the proxy service is responsible for collecting data for application execution and sending the data to the routing service.
And step S103, the agent service acquires data generated in the running process of the application through a first plug-in.
Here, the first plug-in is a plug-in capable of collecting data generated by the application in the running process in real time. The first plug-in includes but is not limited to a thrift, http, shell, jms, file, directory, kafka plug-in.
Step S104, the proxy service sends the data to a routing service.
Here, the route (route) service is not in the first container, and is a service external to the container orchestration system.
The container orchestration system can provide mechanisms such as container configuration, publication and discovery, system monitoring and failover, declarative system configuration, and rules and constraint definitions regarding container placement and performance. Currently common container organization systems include Docker Swarm, Kubernets, Marathon, and Nomad. In this embodiment, a kubernets container orchestration system is used. Kubernets is a complete distributed system support platform, supports multi-layer security protection, an admission mechanism, multi-tenant application support, transparent service registration, service discovery, built-in load balancing, a strong fault discovery and self-repair mechanism, service rolling upgrade and online capacity expansion, an extensible resource automatic scheduling mechanism, multi-granularity resource quota management capacity and complete management tools, and comprises development, testing, deployment, operation and maintenance monitoring and a one-stop complete distributed system development and support platform.
Because the routing service is externally arranged in Kubernetes and does not exist in the first container, even if the container is accidentally destroyed, the routing service cannot be destroyed, and further some operation information of the container before destruction can be obtained through the routing service, so that the operation information is analyzed, the operation state of the application and the reason for destroying the container are obtained, the system is improved, and the reliability of the system is further improved.
In the information processing method provided by the embodiment of the invention, first, when a first instruction for starting an application is received by a starting service, a first container is obtained based on the first instruction, wherein the first container is a container corresponding to the application; then the starting service starts the first container based on the first instruction, wherein the first container is internally provided with proxy service; then the agent service collects data generated in the running process of the application through a first plug-in; finally, the proxy service sends the data to a routing service, wherein the routing service is not in the first container; in this way, since the routing service is not in the first container, even if the first container is destroyed, the data related to the application in the first container can be obtained from the routing service, so that the operation condition of the application and the operation condition of the container can be evaluated, and the reliability of the system can be further improved.
Based on the foregoing embodiments, an information processing method is further provided in an embodiment of the present invention, and fig. 2 is a schematic flow chart illustrating an implementation of the information processing method in the embodiment of the present invention, as shown in fig. 2, the method includes the following steps:
step S201, when the start service receives a first instruction for starting an application, acquiring a first container based on the first instruction.
Here, the first container is a container corresponding to the application.
Step S202, the start service starts the first container based on the first instruction.
Here, the first container embeds a proxy service.
Step S203, the agent service collects data generated in the running process of the application through a first plug-in.
Step S204, the proxy service sends the data to a routing service.
Here, the routing service is not in the first container.
In this embodiment, the sending of the data to the routing service by the proxy service may be implemented in two ways:
in the first mode, the proxy service sends the data to the routing service in a socket mode after a preset interval duration;
in the second mode, when the space occupied by the data collected by the proxy service is larger than a preset threshold value, the data is sent to the routing service in a socket mode.
Step S205, the routing service stores the data.
Here, the route storing the data may be writing the data to a local disk or writing the data to a designated server.
In step S206, the service requesting data receives a second instruction to acquire data of the application.
Here, the service of requesting data may be a data retention service or a data presentation service.
Step S207, based on the second instruction, the service requesting data sends a second request message for acquiring the data of the application to the operation service of the first container.
Here, since the proxy service does not transmit data to the routing service in real time, in order to acquire the most comprehensive data, it is necessary to transmit a second request message to the running service in the container to acquire the data of the application.
In step S208, the service requesting data determines whether a second response message sent by the running service is received.
Here, if the service requesting data receives the second response message sent by the running service, it indicates that the container is not destroyed, and then the process proceeds to step S209; if the service requesting data does not receive the second response message sent by the running service, indicating that the container is destroyed, then step S210 is entered.
In other embodiments, when the service of the request data determines whether the second response message is received, a timer may be started to time, and determine whether the second response message is received within a preset time period, if the second response message is received within the preset time period, the step S208 is performed; if the second response message is received within the preset time period, the process proceeds to step S209.
Step S209, the service of the request data analyzes the second response message to obtain the data of the application carried in the second response message.
Step S210, the service requesting data sends a first request message for acquiring the data of the application to the routing service.
Step S211, the routing service analyzes the received first request message, and obtains the identifier of the application.
Step S212, the routing service obtains the data of the application according to the identifier of the application.
Step S213, the routing service carries the data of the application in the first response message, and sends the data to the service requesting the data.
Here, in the implementation process of step S213, the routing service may carry the data of the application in a first response message, and send the first response message to the service requesting the data through the first plug-in.
Step S214, the service requesting data receives and analyzes the first response message, and obtains the application data carried in the first response message.
In other embodiments, after step S206, step S207 to step S209 may not be executed, and step S210 is directly executed, that is, after the service requesting data receives the second instruction, the first request message is directly sent to the routing service, because the routing service is a service other than the first container, and even if the first container is destroyed, the first request message sent to the routing service must acquire the data of the application.
It should be noted that, for the explanation of the same steps or concepts in the present embodiment as in the other embodiments, reference may be made to the description in the other embodiments.
Fig. 3 is a schematic view of an application scenario of an information processing method according to an embodiment of the present invention, as shown in fig. 3, a routing service 302 is externally disposed on a first container 301, an agent service 305 sends data generated in an application running process to the routing service 302, and when a service 303 requesting data needs to acquire application data, if the first container 301 is not destroyed, the service 303 requesting data sends a second request message to a running service 304 in the first container to acquire data; upon destruction of the container, the data requesting service 303 sends a first request message to the routing service 302 to obtain the data.
In the information processing method provided by the embodiment of the invention, firstly, when a first instruction for starting an application is received by a starting service, a first container is obtained based on the first instruction, and the first container is started based on the first instruction, wherein the first container is internally provided with a proxy service; the proxy service acquires data generated in the running process of the application through a first plug-in and sends the data to a routing service, wherein the routing service is not in the first container; when the service requesting data receives a second instruction for acquiring the data of the application, a second request message for acquiring the data of the application is sent to the running service of the first container based on the second instruction; if a second response message sent by the running service is received, analyzing the second response message to obtain the application data carried in the second response message; if the second response message is not received, sending a first request message for acquiring the data of the application to the routing service; the service of the request data receives and analyzes a first response message to obtain the data of the application carried in the first response message; therefore, the application data is sent to the routing service outside the container, so that the running information of the application or the container can be obtained under the condition of destroying the container, and the reason for destroying the container and the running condition before destroying the container can be conveniently determined.
Based on the foregoing embodiment, an embodiment of the present invention further provides an information processing method, where the method includes the following steps:
step 31, when the start service receives a first instruction for starting the application, a first container is obtained based on the first instruction.
Here, the first container is a container corresponding to the application.
Step 32, the start service starts the first container based on the first instruction.
Here, the first container embeds a proxy service.
And step 33, the agent service collects data generated by the application in the running process through the first plug-in.
Step 34, the proxy service sends the data to a routing service.
Here, the routing service is not in the first container.
In this embodiment, the sending of the data to the routing service by the proxy service may be implemented in two ways:
in the first mode, the proxy service sends the data to the routing service in a socket mode after a preset interval duration;
in the second mode, when the space occupied by the data collected by the proxy service is larger than a preset threshold value, the data is sent to the routing service in a socket mode.
Step 35, the routing service stores the data.
Here, the route storing the data may be writing the data to a local disk or writing the data to a designated server.
The service requesting the data receives a second instruction to retrieve the data of the application, step 36.
Here, the service of requesting data may be a data retention service or a data presentation service.
And step 37, the service for requesting data sends a first request message for acquiring the data of the application to the routing service based on the second instruction, and sends a second request message for acquiring the data of the application to the running service of the first container.
Here, since the most comprehensive and real-time data can be acquired through the operation service of the first container, if the first container is destroyed, the data cannot be acquired from the operation service; and the data can be ensured to be acquired through the routing service, so that after the second instruction is received, the service requesting the data can send a request message for acquiring the data to the running service and the routing service in parallel.
And step 38, the service requesting data acquires the data of the application based on the received first response message sent by the routing service and/or the second response message sent by the running service.
It should be noted that, for the explanation of the same steps or concepts in the present embodiment as in the other embodiments, reference may be made to the description in the other embodiments.
In the information processing method provided by the embodiment of the invention, firstly, when a first instruction for starting an application is received by a starting service, a first container is obtained based on the first instruction, and the first container is started based on the first instruction, wherein the first container is internally provided with a proxy service; the proxy service acquires data generated in the running process of the application through a first plug-in and sends the data to a routing service, wherein the routing service is not in the first container; when a service requesting data receives a second instruction for acquiring data of an application, based on the second instruction, sending a first request message for acquiring the data of the application to the routing service, and sending a second request message for acquiring the data of the application to a running service of the first container; finally, acquiring the data of the application based on the received first response message sent by the routing service and/or the second response message sent by the running service; in this way, the data generated in the application running process is sent to the routing service outside the first container, and when the service requesting the data needs to acquire the data of the application, the request message for acquiring the data is sent to the routing service and the running service in the first container in parallel, so that the data of the application can be acquired, and the most real-time and comprehensive data can be acquired as far as possible.
Here, in an actual implementation process, the step 38 may be implemented by:
step 381, the service of the request data determines whether the first response message and the second response message are received within a preset waiting time.
Here, the preset waiting time period is determined according to a first waiting time period counted before from after the first request message is transmitted to the first response message is received and a second waiting time period counted before from after the second request message is transmitted to the second response message is received. If the first container is not destroyed, the second response message should be able to be received within a preset wait period.
If the first response message and the second response message are received within the preset waiting duration, go to step 382; if the first response message and the second response message are not received within the preset time period, step 385 is entered.
Step 382, the service requesting data acquires the first data carried in the first response message and the first attribute information of the first data.
Here, the first attribute information includes at least a first start time, a first end time, and a first space size.
The first start time may be a time when the first data starts to be saved, the first end time may be a time when the first data ends to be saved, and the first space size may be a size of a storage space occupied by the first data.
Step 383, the service of the request data obtains the second data carried in the second response message and the second attribute information of the second data.
Here, the second attribute information includes at least a second start time, a second end time, and a second space size.
Step 384, based on the first attribute information and the second attribute information, the service requesting data determines data of the application to be saved from the first data and the second data.
In step 385, the service requesting data determines whether a first response message is received within a preset waiting duration.
Here, if the first response message is received within a preset waiting time and the second response message is not received, go to step 386; if the first response message is not received within the preset wait period, go to step 387.
Step 386, the service of the request data analyzes the first response message, and obtains the data of the application.
Step 387, if the second response message is received within the preset waiting time and the first response message is not received, analyzing the second response message, and acquiring the data of the application.
In other embodiments, here, in practical applications, the step 384 may be implemented by:
step 41, if the first termination time is earlier than the second termination time and the first space size is smaller than the second space size, determining the second data as the data of the application to be saved;
step 42, if the first termination time is earlier than the second start time, or if the second termination time is earlier than the first start time, determining the first data and the second data as the saved data of the application;
and 43, if the second termination time is earlier than the first termination time and the second space size is smaller than the first space size, determining the first data as the data of the application to be saved.
In the embodiment of steps 41 to 43, if the first termination time is earlier than the second termination time, and the first space size is smaller than the second space size, it indicates that the first data stored in the routing service is earlier than the end storage time of the second data obtained from the running service, and the first space size is smaller than the second space size, which indicates that the second data contains the first data, so that the second data is determined as the data of the application to be stored, and conversely, the second termination time is earlier than the first termination time, and the second space size is smaller than the first space size, the first data is determined as the data of the application to be stored. And if the first termination time is earlier than the second start time, or if the second termination time is earlier than the first start time, indicating that the first data and the second data are not intersected, determining that the first data and the second data are both data of the application to be saved.
Based on the foregoing embodiments, an electronic device is provided in an embodiment of the present invention, fig. 4 is a schematic structural diagram of the electronic device in the embodiment of the present invention, and as shown in fig. 4, the electronic device 400 includes a memory 401, a communication bus 402, and a processor 403, where:
the memory 401 is used for storing an information processing program;
the communication bus 402 is used for realizing connection communication between the processor and the memory;
the processor 403 is configured to execute the information processing program stored in the memory, so as to implement the following steps:
when a first instruction for starting an application is received by a starting service, acquiring a first container based on the first instruction, wherein the first container is a container corresponding to the application;
the starting service starts the first container based on the first instruction, wherein the first container is internally provided with a proxy service;
the agent service acquires data generated in the running process of the application through a first plug-in;
the proxy service sends the data to a routing service, wherein the routing service is not in the first container.
In other embodiments, the processor 403 is further configured to execute an information processing program stored in the memory to implement the following steps:
when a service requesting data receives a second instruction for acquiring data of an application, a first request message for acquiring the data of the application is sent to the routing service based on the second instruction;
and the service requesting the data receives and analyzes the first response message to obtain the data of the application carried in the first response message.
In other embodiments, before sending the first request message for obtaining the data of the application to the routing service, the processor 403 is further configured to execute an information processing program stored in a memory to implement the following steps:
when the service requesting data receives a second instruction for acquiring the data of the application, a second request message for acquiring the data of the application is sent to the running service of the first container based on the second instruction;
if a second response message sent by the running service is received, analyzing the second response message to obtain the application data carried in the second response message;
and if the second response message is not received, sending a first request message for acquiring the data of the application to the routing service.
In other embodiments, the processor 403 is further configured to execute an information processing program stored in the memory to implement the following steps:
when a service requesting data receives a second instruction for acquiring data of an application, based on the second instruction, sending a first request message for acquiring the data of the application to the routing service, and sending a second request message for acquiring the data of the application to a running service of the first container;
and acquiring the data of the application based on the received first response message sent by the routing service and/or the second response message sent by the running service.
In other embodiments, the obtaining data of the application based on the received first response message sent by the routing service and/or the second response message sent by the running service includes:
if the first response message is received within a preset waiting time and the second response message is not received, analyzing the first response message and acquiring the data of the application; alternatively, the first and second electrodes may be,
if the second response message is received within a preset waiting time and the first response message is not received, analyzing the second response message and acquiring the data of the application; alternatively, the first and second electrodes may be,
if the first response message and the second response message are received within a preset waiting time, acquiring first data carried in the first response message and first attribute information of the first data;
acquiring second data carried in the second response message and second attribute information of the second data;
determining data of the application to be saved from the first data and the second data based on the first attribute information and the second attribute information.
In other embodiments, the determining, from the first data and the second data, data of the application to be saved based on the first attribute information and the second attribute information includes:
determining the second data as the data of the application to be saved if the first termination time is earlier than the second termination time and the first space size is smaller than the second space size;
determining the first data and the second data as the saved data of the application if the first termination time is earlier than the second start time or if the second termination time is earlier than the first start time;
and if the second termination time is earlier than the first termination time and the second space size is smaller than the first space size, determining the first data as the data of the application to be saved.
In other embodiments, the processor 403 is further configured to execute an information processing program stored in the memory to implement the following steps:
the routing service analyzes the received first request message and acquires the identifier of the application;
the routing service acquires the data of the application according to the identifier of the application;
and the routing service carries the data of the application in a first response message and sends the data to the service requesting the data.
In other embodiments, the proxy service sends the data to a routing service, including: the proxy service sends the data to the routing service in a socket mode after a preset interval duration; or when the space occupied by the data acquired by the proxy service is larger than a preset threshold value, the data is sent to the routing service in a socket mode;
alternatively, the first and second electrodes may be,
the routing service carries the data of the application in a first response message and sends the data to a service requesting data, and the routing service comprises the following steps: and the routing service carries the data of the application in a first response message and sends the data to the service requesting the data through the first plug-in.
Here, it should be noted that: the above description of the embodiments of the electronic device, similar to the above description of the method, has the same advantageous effects as the embodiments of the method. For technical details not disclosed in the embodiments of the electronic device of the present invention, a person skilled in the art shall understand with reference to the description of the embodiments of the method of the present invention.
Accordingly, an embodiment of the present invention further provides a computer storage medium, in which computer-executable instructions are stored, and when the computer-executable instructions are executed by a processor, the steps of the information processing method provided by the above-mentioned embodiment are implemented.
An information processing apparatus according to an embodiment of the present invention is provided, and fig. 5 is a schematic flow chart illustrating an implementation of the information processing apparatus according to the embodiment of the present invention, as shown in fig. 5, the apparatus 500 includes: a first obtaining module 501, a first starting module 502, a collecting module 503 and a first sending module 504, wherein:
the first obtaining module 501 is configured to, when a first instruction for starting an application is received, obtain a first container based on the first instruction, where the first container is a container corresponding to the application;
the first starting module 502 is configured to start the first container based on the first instruction, where the first container is built-in with a proxy service;
the acquisition module 503 is configured to acquire data generated by the application in the running process through a first plug-in;
a first sending module 504 configured to send the data to a routing service, wherein the routing service is not in the first container.
In other embodiments, the apparatus further comprises:
the second sending module is used for sending a first request message for acquiring the data of the application to the routing service based on a second instruction when the second instruction for acquiring the data of the application is received;
and the first receiving module is used for receiving and analyzing the first response message to obtain the application data carried in the first response message.
In other embodiments, the apparatus further comprises:
a third sending module, configured to, when a second instruction for acquiring data of an application is received, send, based on the second instruction, a second request message for acquiring the data of the application to an operating service of the first container;
the analysis module is used for analyzing a second response message sent by the running service if the second response message is received, so as to obtain the application data carried in the second response message;
a fourth sending module, configured to send, to the routing service, a first request message for obtaining the data of the application if the second response message is not received.
In other embodiments, the apparatus further comprises:
a fifth sending module, configured to, when a second instruction for acquiring data of an application is received, send, based on the second instruction, a first request message for acquiring the data of the application to the routing service, and send, to an operating service of the first container, a second request message for acquiring the data of the application;
and the second obtaining module is used for obtaining the data of the application based on the received first response message sent by the routing service and/or the second response message sent by the running service.
In other embodiments, the second obtaining module comprises:
a first obtaining unit, configured to, if the first response message is received within a preset waiting duration and the second response message is not received, parse the first response message, and obtain data of the application; alternatively, the first and second electrodes may be,
a second obtaining unit, configured to, if the second response message is received within a preset waiting duration and the first response message is not received, parse the second response message, and obtain the data of the application; alternatively, the first and second electrodes may be,
a third obtaining unit, configured to obtain, if the first response message and the second response message are received within a preset waiting duration, first data carried in the first response message and first attribute information of the first data;
a fourth obtaining unit, configured to obtain second data carried in the second response message and second attribute information of the second data;
a determining unit configured to determine data of the application to be saved from the first data and the second data based on the first attribute information and the second attribute information.
In other embodiments, the first attribute information at least includes a first start time, a first end time, and a first space size, and the second attribute information at least includes a second start time, a second end time, and a second space size, and correspondingly, the determining unit is further configured to:
determining the second data as the data of the application to be saved if the first termination time is earlier than the second termination time and the first space size is smaller than the second space size;
determining the first data and the second data as the saved data of the application if the first termination time is earlier than the second start time or if the second termination time is earlier than the first start time;
and if the second termination time is earlier than the first termination time and the second space size is smaller than the first space size, determining the first data as the data of the application to be saved.
In other embodiments, the apparatus further comprises:
a third obtaining module, configured to analyze the received first request message, and obtain an identifier of the application;
the fourth acquisition module is used for acquiring the data of the application according to the application identifier;
and a sixth sending module, configured to carry the data of the application in the first response message, and send the data to the service requesting the data.
In other embodiments, the first transmitting module comprises:
the first sending unit is used for sending the data to the routing service in a socket mode through a preset interval duration; alternatively, the first and second electrodes may be,
the second sending unit is used for sending the data to the routing service in a socket mode when the space occupied by the acquired data is larger than a preset threshold;
in other embodiments, the sixth sending module includes:
and a third sending unit, configured to carry the data of the application in a first response message, and send the data to the service requesting the data through the first plug-in.
Here, it should be noted that: the above description of the embodiment of the information processing apparatus is similar to the above description of the method, and has the same advantageous effects as the embodiment of the method. For technical details not disclosed in the embodiments of the information processing apparatus of the present invention, those skilled in the art should understand with reference to the description of the embodiments of the method of the present invention.
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present invention. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. It should be understood that, in various embodiments of the present invention, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention. The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
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.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of the unit is only a logical functional division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units; can be located in one place or distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all the functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
Those of ordinary skill in the art will understand that: all or part of the steps for realizing the method embodiments can be completed by hardware related to program instructions, the program can be stored in a computer readable storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned storage medium includes: various media that can store program codes, such as a removable Memory device, a Read Only Memory (ROM), a magnetic disk, or an optical disk.
Alternatively, the integrated unit of the present invention may be stored in a computer-readable storage medium if it is implemented in the form of a software functional module and sold or used as a separate product. Based on such understanding, the technical solutions of the embodiments of the present invention may be essentially implemented or a part contributing to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a removable storage device, a ROM, a magnetic or optical disk, or other various media that can store program code.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (9)

1. An information processing method applied to an electronic device, the method comprising:
when a first instruction for starting an application is received by a starting service, acquiring a first container based on the first instruction, wherein the first container is a container corresponding to the application;
the starting service starts the first container based on the first instruction, wherein the first container is internally provided with a proxy service;
the agent service acquires data generated in the running process of the application through a first plug-in, wherein the first plug-in is a plug-in capable of acquiring the data generated in the running process of the application in real time;
the proxy service sending the data to a routing service, wherein the routing service is not in the first container;
when a service requesting data receives a second instruction for acquiring data of an application, a first request message for acquiring the data of the application is sent to the routing service based on the second instruction;
and the service requesting the data receives and analyzes the first response message to obtain the data of the application carried in the first response message.
2. The method of claim 1, wherein prior to sending the first request message to the routing service for obtaining data for the application, the method further comprises:
when the service requesting data receives a second instruction for acquiring the data of the application, a second request message for acquiring the data of the application is sent to the running service of the first container based on the second instruction;
if a second response message sent by the running service is received, analyzing the second response message to obtain the application data carried in the second response message;
and if the second response message is not received, sending a first request message for acquiring the data of the application to the routing service.
3. The method of claim 1, further comprising:
when a service requesting data receives a second instruction for acquiring data of an application, based on the second instruction, sending a first request message for acquiring the data of the application to the routing service, and sending a second request message for acquiring the data of the application to a running service of the first container;
and acquiring the data of the application based on the received first response message sent by the routing service and/or the second response message sent by the running service.
4. The method according to claim 3, wherein the obtaining the data of the application based on the received first response message sent by the routing service and/or the second response message sent by the running service comprises:
if the first response message is received within a preset waiting time and the second response message is not received, analyzing the first response message and acquiring the data of the application; alternatively, the first and second electrodes may be,
if the second response message is received within a preset waiting time and the first response message is not received, analyzing the second response message and acquiring the data of the application; alternatively, the first and second electrodes may be,
if the first response message and the second response message are received within a preset waiting time, acquiring first data carried in the first response message and first attribute information of the first data;
acquiring second data carried in the second response message and second attribute information of the second data;
determining data of the application to be saved from the first data and the second data based on the first attribute information and the second attribute information.
5. The method according to claim 4, wherein the first attribute information includes at least a first start time, a first end time and a first space size, and the second attribute information includes at least a second start time, a second end time and a second space size, and correspondingly, the determining the data of the application to be saved from the first data and the second data based on the first attribute information and the second attribute information includes:
determining the second data as the data of the application to be saved if the first termination time is earlier than the second termination time and the first space size is smaller than the second space size;
determining the first data and the second data as the saved data of the application if the first termination time is earlier than the second start time or if the second termination time is earlier than the first start time;
and if the second termination time is earlier than the first termination time and the second space size is smaller than the first space size, determining the first data as the data of the application to be saved.
6. The method according to any one of claims 1 to 3, further comprising:
the routing service analyzes the received first request message and acquires the identifier of the application;
the routing service acquires the data of the application according to the identifier of the application;
and the routing service carries the data of the application in a first response message and sends the data to the service requesting the data.
7. The method of any of claims 1 to 3, wherein the proxy service sends the data to a routing service, comprising: the proxy service sends the data to the routing service in a socket mode after a preset interval duration; or when the space occupied by the data acquired by the proxy service is larger than a preset threshold value, the data is sent to the routing service in a socket mode;
alternatively, the first and second electrodes may be,
the routing service carries the data of the application in a first response message and sends the data to a service requesting data, and the routing service comprises the following steps: and the routing service carries the data of the application in a first response message and sends the data to the service requesting the data through the first plug-in.
8. An electronic device, characterized in that the electronic device comprises at least: a memory, a communication bus, and a processor, wherein:
the memory is used for storing an information processing program;
the communication bus is used for realizing connection communication between the processor and the memory;
the processor is configured to execute an information processing program stored in the memory to implement the steps of the information processing method recited in any one of claims 1 to 7.
9. An information processing apparatus characterized by comprising: first acquisition module, first start module, collection module and first sending module, wherein:
the first obtaining module is used for obtaining a first container based on a first instruction when the first instruction for starting an application is received, wherein the first container is a container corresponding to the application;
the first starting module is configured to start the first container based on the first instruction, where the first container is built-in with a proxy service;
the acquisition module is used for acquiring data generated in the running process of the application through a first plug-in, wherein the first plug-in is a plug-in capable of acquiring the data generated in the running process of the application in real time;
a first sending module, configured to send the data to a routing service, wherein the routing service is not in the first container;
the second sending module is used for sending a first request message for acquiring the data of the application to the routing service based on a second instruction when the second instruction for acquiring the data of the application is received;
and the first receiving module is used for receiving and analyzing the first response message to obtain the application data carried in the first response message.
CN201810587160.9A 2018-06-08 2018-06-08 Information processing method, equipment and device Active CN108959046B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810587160.9A CN108959046B (en) 2018-06-08 2018-06-08 Information processing method, equipment and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810587160.9A CN108959046B (en) 2018-06-08 2018-06-08 Information processing method, equipment and device

Publications (2)

Publication Number Publication Date
CN108959046A CN108959046A (en) 2018-12-07
CN108959046B true CN108959046B (en) 2020-10-30

Family

ID=64493513

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810587160.9A Active CN108959046B (en) 2018-06-08 2018-06-08 Information processing method, equipment and device

Country Status (1)

Country Link
CN (1) CN108959046B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109600380B (en) * 2018-12-19 2020-11-10 北京创鑫旅程网络技术有限公司 Data transmission method and device
CN109918099A (en) * 2019-01-08 2019-06-21 平安科技(深圳)有限公司 Service routine dissemination method, device, computer equipment and storage medium
CN112242933A (en) * 2019-07-16 2021-01-19 贵州白山云科技股份有限公司 TCPCOPY test method, device, medium and equipment
CN112532715B (en) * 2020-11-25 2023-05-09 京东方科技集团股份有限公司 Deployment method, access method, device, system and computer readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106776064A (en) * 2016-11-29 2017-05-31 北京元心科技有限公司 Method and device for managing logs in multiple systems
CN107463450A (en) * 2017-07-26 2017-12-12 中国联合网络通信集团有限公司 The data processing method and device of container
CN107506258A (en) * 2016-06-14 2017-12-22 伊姆西公司 Method and apparatus for data backup

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10162714B2 (en) * 2015-08-27 2018-12-25 Netapp, Inc. Methods and systems for restoring data containers in a storage system
CN107844539A (en) * 2017-10-19 2018-03-27 广州阿里巴巴文学信息技术有限公司 Isolated data management method, device, system, computing device and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107506258A (en) * 2016-06-14 2017-12-22 伊姆西公司 Method and apparatus for data backup
CN106776064A (en) * 2016-11-29 2017-05-31 北京元心科技有限公司 Method and device for managing logs in multiple systems
CN107463450A (en) * 2017-07-26 2017-12-12 中国联合网络通信集团有限公司 The data processing method and device of container

Also Published As

Publication number Publication date
CN108959046A (en) 2018-12-07

Similar Documents

Publication Publication Date Title
CN108959046B (en) Information processing method, equipment and device
KR102245025B1 (en) Memory return method and device
CN110908879B (en) Reporting method, reporting device, reporting terminal and recording medium of buried point data
CN103098033A (en) System and method for managing resources of a portable computing device
CN111190673B (en) Page display method and device based on operation monitoring and electronic equipment
CN113407383B (en) Main and standby system switching method and device, server and main and standby system
CN111597065B (en) Method and device for collecting equipment information
CN105847446B (en) Method, device and system for acquiring network data
CN113849294B (en) Kubernetes pod expansion and contraction system and method
CN112230847B (en) Method, system, terminal and storage medium for monitoring K8s storage volume
CN112506755A (en) Log collection method and device, computer equipment and storage medium
CN111625419A (en) Log acquisition method, system, equipment and computer readable storage medium
CN110457132B (en) Method and device for creating functional object and terminal equipment
CN113220403B (en) Method and device for h5 intercepting Android return event and electronic equipment
CN114416508A (en) Application performance monitoring method and device, storage medium and electronic equipment
CN111930565B (en) Process fault self-healing method, device and equipment for components in distributed management system
CN115145806A (en) Data acquisition method and device and computer readable storage medium
US7778660B2 (en) Mobile communications terminal, information transmitting system and information receiving method
CN109286532B (en) Management method and device for alarm information in cloud computing system
CN112651212A (en) Method and terminal for remotely acquiring word stock
CN112732568B (en) System log acquisition method and device, storage medium and terminal
CN116088955B (en) Process processing method and terminal equipment
CN113836405B (en) Information query method, device and computer readable storage medium
US20170126721A1 (en) System and method for managing terminal
CN112416698B (en) Expansion method and device of monitoring system, storage medium and electronic equipment

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