# US 2019/0294796 A1 · Resolving anomalies for network applications using code injection

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2019/0294796 A1
- Document ID: US20190294796A1
- Status: Published application
- Kind: A1
- Application number: 15/934,756
- Filed: 2018-03-23
- Published: 2019-09-26
- Earliest claimed: 2018-03-23
- Assignees: Microsoft Technology Licensing, LLC
- Applicants: Microsoft Technology Licensing, LLC
- Inventors: Kuralmani Elango; Palaniraj Kaliyaperumal; Senthilkumar Manickavelu
- Web page: https://patentgrep.com/patent/US20190294796A1

## CPC

- G06F 21/568: {eliminating virus, restoring damaged files}
- G06F 8/70: Software maintenance or management
- G06F 21/554: {involving event detection and direct action}
- H04L 63/1425: {Traffic logging, e.g. anomaly detection}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

Methods for resolving anomalies for network applications using code injection are performed by network services systems. Notifications for electronic communications incoming to executing applications are received and monitored on the network services system. The notifications are analyzed to identify anomalies in the electronic communications for executing applications. Application contexts associated with executing applications are determined, and code solutions are selected from a set of code solutions to correspondingly apply against the anomalies. Code solutions include code blocks, scripts, or code assemblies to resolve specific anomalies for executing applications. Code solutions are selected based on the application contexts and the one or more anomalies. Selected code solutions are injected into the first executing application to resolve or mitigate the anomalies. Injected code solutions may be permanent, or executing applications may be subsequently rolled back to pre-injection states based on rollback criteria.

## Claims

### Claim 1

A network services system comprising:
at least one memory configured to store program instructions; and
at least one processor configured to execute the program instructions, the program instructions including:
first instructions configured to:
monitor notifications for electronic communications incoming to executing applications on the network services system;
second instructions configured to:
analyze the notifications; and
identify one or more anomalies in the electronic communications for a first executing application of the executing applications based on the analysis; and
third instructions configured to:
determine an application context associated with the first executing application;
select one or more code solutions from a set of code solutions to correspondingly apply against the one or more anomalies based on the application context associated with the first executing application and the one or more anomalies, each code solution in the set of code solutions comprising at least one of a code block or a code assembly and being configured to resolve a specific anomaly for executing applications; and
inject the selected one or more code solutions into the first executing application.

### Claim 2 (depends on 1)

The network services system of claim 1, wherein the set of code solutions is stored in the at least one memory;
the program instructions further comprising fourth instructions configured to:
receive a generated code solution for an anomaly of the one or more anomalies; and
store the generated code solution as part of the set of code solutions in the at least one memory.

### Claim 3 (depends on 1)

The network services system of claim 1, wherein the second instructions are configured to identify an anomaly of the one or more anomalies for a second executing application of the applications based on a separate notifications analysis for the second executing application; and
wherein the third instructions are configured to:
determine an application context associated with the second executing application;
select the code solution from the set of code solutions to apply against the anomaly of the one or more anomalies for the second executing application based on the application context associated with the second executing application and the anomaly of the one or more anomalies for the second executing application; and
inject the selected code solution into the second executing application.

### Claim 4 (depends on 1)

The network services system of claim 1, wherein the program instructions further comprise fifth instructions configured to:
track a state of the first executing application;
capture the state prior to the selected one or more code solutions being injected into the first executing application;
store the state in the at least one memory; and
return the first executing application to the stored state, or cause an injected code solution to become dormant, based on a rollback condition.

### Claim 5 (depends on 4)

The network services system of claim 4, wherein the rollback condition includes one or more of:
an expiration of a timer;
a result of monitoring and analyzing subsequent notifications for additional or continued instances of the one or more anomalies;
a result of monitoring and analyzing notifications for another executing application executed by the network services system; or
a change in the application context associated with the first executing application.

### Claim 6 (depends on 1)

The network services system of claim 1, wherein at least one of the code solutions is configured to cause one or more of:
limiting a number of requests from clients to the first executing application;
ignoring one or more requests from clients to the first executing application;
deferring one or more requests from clients to the first executing application;
servicing requests from clients to the first executing application in an order of priority;
reallocating a resource for the first executing application from another application;
scaling a channel for the first executing application; or
creating a new channel for a subservice related to the first executing application.

### Claim 7 (depends on 1)

The network services system of claim 1, wherein the third instructions are configured to determine the application context associated with the first executing application based on application information, the application information including one or more of:
information related to a user associated with the electronic communications;
an expected number for the electronic communications based on the first executing application;
an actual number of the electronic communications for the first executing application; or
a type of request associated with the electronic communications; and
wherein the third instructions are configured to select the one or more code solutions from the set of code solutions by comparing the application context associated with the first executing application with context metadata of the one or more code solutions.

### Claim 8

A method for a network services system, the method comprising:
identifying one or more anomalies in incoming electronic communications for a first executing application of one or more executing applications on the network services system;
determining an application context associated with the first executing application;
selecting one or more code solutions from a set of code solutions to correspondingly apply against the one or more anomalies based on the application context associated with the first executing application and the one or more anomalies, each code solution in the set of code solutions comprising at least one of a code block or a code assembly and being configured to resolve a specific anomaly for executing applications; and
injecting the selected one or more code solutions into the first executing application.

### Claim 9 (depends on 8)

The method claim 8, further comprising:
receiving a generated code solution for an anomaly of the one or more anomalies; and
storing the generated code solution as part of the set of code solutions in a memory.

### Claim 10 (depends on 8)

The method of claim 8, further comprising:
identifying an anomaly of the one or more anomalies for a second executing application of the one or more executing applications based on a separate notifications analysis for the second executing application;
determining an application context associated with the second executing application;
selecting the code solution from the set of code solutions to apply against the anomaly of the one or more anomalies based on that the application context associated with the second executing application the anomaly of the one or more anomalies for the second executing application; and
injecting the selected code solution into the second executing application.

### Claim 11 (depends on 8)

The method of claim 8, further comprising:
tracking a state of the first executing application;
capturing the state prior to the selected one or more code solutions being injected into the first executing application;
storing the state in at least one memory; and
returning the first executing application to the stored state, or causing an injected code solution to become dormant, based on a rollback condition.

### Claim 12 (depends on 11)

The method of claim 11, wherein the rollback condition includes one or more of:
an expiration of a timer;
a result of monitoring and analyzing subsequent notifications for additional or continued instances of the one or more anomalies;
a result of monitoring and analyzing notifications for a second executing application executed by the network services system; or
a change in the application context associated with the first executing application.

### Claim 13 (depends on 8)

The method of claim 8, further comprising performing one or more of the following subsequent to the code solution being injected:
limiting a number of requests from clients to the first executing application;
ignoring one or more requests from clients to the first executing application;
deferring one or more requests from clients to the first executing application;
servicing requests from clients to the first executing application in an order of priority;
reallocating a resource for the first executing application from another application;
scaling a channel for the first executing application; or
creating a new channel for a subservice related to the first executing application.

### Claim 14 (depends on 8)

The method of claim 8, wherein the application context associated with the first executing application is based on one or more of:
information related to a user associated with the electronic communications;
an expected number for the electronic communications based on the first executing application;
an actual number of the electronic communications for the first executing application; or
a type of request associated with the electronic communications; and
wherein the method further comprises: comparing the application context associated with the first executing application with context metadata of the one or more code solutions.

### Claim 15 (depends on 8)

The method of claim 8, further comprising:
providing interceptor program code instructions for the first executing application, the interceptor program code instructions configured to transmit notifications for electronic communications incoming to the first executing application; and
receiving and analyzing the notifications prior to the identifying the one or more anomalies.

### Claim 16

A computer-readable storage medium having program instructions recorded thereon that, when executed by a processing device, perform a method for a network services system, the method comprising:
monitoring notifications for electronic communications incoming to executing applications on the network services system;
analyzing the notifications;
identifying one or more anomalies in the electronic communications for a first executing application of the executing applications based on the analysis;
determining an application context associated with the first executing application;
selecting one or more code solutions from a set of code solutions to correspondingly apply against the one or more anomalies based on the application context associated with the first executing application and the one or more anomalies, each code solution in the set of code solutions comprising at least one of a code block or a code assembly and being configured to resolve a specific anomaly for executing applications; and
injecting the selected one or more code solutions into the first executing application.

### Claim 17 (depends on 16)

The computer-readable storage medium of claim 16, wherein the method further comprises:
receiving a code solution for an anomaly of the one or more anomalies;
storing the code solution as part of the set of code solutions in a first memory prior to the selecting the one or more code solutions from the set of code solutions;
identifying the anomaly of the one or more anomalies for a second executing application of the executing applications based on a subsequent notifications analysis after the injecting the selected one or more code solutions into the first executing application;
selecting the code solution from the set of code solutions to apply against the anomaly of the one or more anomalies for the second executing application based on the application context associated with the second executing application and the anomaly of the one or more anomalies for the second executing application; and
injecting the selected code solution into the second executing application.

### Claim 18 (depends on 16)

The computer-readable storage medium of claim 16, wherein the method further comprises:
tracking a state of the first executing application;
capturing the state prior to the selected one or more code solutions being injected into the first executing application;
storing the state in a second memory; and
returning the first executing application to the stored state, or causing an injected code solution to become dormant, based on a rollback condition;
the rollback condition including one or more of:
an expiration of a timer;
a result of monitoring and analyzing subsequent notifications for additional or continued instances of the one or more anomalies;
a result of monitoring and analyzing notifications for another executing application executed by the network services system; or
a change in the application context associated with the first executing application.

### Claim 19 (depends on 16)

The computer-readable storage medium of claim 16, wherein the code solution is configured to cause one or more of:
limiting a number of requests from clients to the first executing application;
ignoring one or more requests from clients to the first executing application;
deferring one or more requests from clients to the first executing application;
servicing requests from clients to the first executing application in an order of priority;
reallocating a resource for the application from another first executing application;
scaling a channel for the first executing application; or
creating a new channel for a subservice related to the first executing application.

### Claim 20 (depends on 16)

The computer-readable storage medium of claim 16, wherein the determining the application context associated with the first executing application includes determining the application context associated with the first executing application based on application information;
the application information including one or more of:
information related to a user associated with the electronic communications;
an expected number for the electronic communications based on the first executing application;
an actual number of the electronic communications for the first executing application; or
a type of request associated with the electronic communications.
