# US 10,956,918 B1 · Analytically generated micro-service consumer-driven contracts and automated tests

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

- Number: US 10,956,918 B1
- Document ID: US10956918B1
- Status: Granted
- Kind: B1
- Application number: 15/800,593
- Filed: 2017-11-01
- Granted: 2021-03-23
- Earliest claimed: 2017-11-01
- Assignees: EMC IP Holding Company LLC
- Applicants: EMC IP Holding Company LLC
- Inventors: Sean Creedon; Ian Gerard Roche
- Web page: https://patentgrep.com/patent/US10956918B1

## CPC

- G06Q 30/0201: Market modelling; Market analysis; Collecting market data
- G06F 16/285: {Clustering or classification}
- G06F 16/906: Clustering; Classification
- G06Q 10/067: Enterprise or organisation modelling
- G06Q 10/10: Office automation; Time management
- G06N 5/022: Knowledge engineering; Knowledge acquisition
- G06N 5/047: Pattern matching networks; Rete networks
- G06N 20/00: Machine learning
- G06Q: INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

Techniques are provided for analytically generating micro-service Consumer- Driven Contracts and automated tests. One method comprises obtaining a plurality of usage data records for consumers of a service from a run-time environment; extracting data features from the usage data records; applying a clustering algorithm to the usage data records to assign the usage data records to a given usage pattern cluster of a plurality of usage pattern clusters based on the extracted data features, wherein each of the plurality of usage pattern clusters comprises usage data records; and performing the following steps when the clustering algorithm creates a new usage pattern cluster: creating a new Consumer-Driven Contract that defines consumer expectations of the service, with respect to the new usage pattern associated with the new usage pattern cluster; and generating automated Consumer-Driven Contract tests to test the new Consumer-Driven Contract.

## Claims

### Claim 1

A method, comprising:
obtaining a plurality of usage data records for a plurality of consumers of a micro-service from a gateway of a run-time environment, wherein the plurality of usage data records comprises real-time function call information for said micro-service;
extracting one or more data features from each of the usage data records, the one or more data features comprising: a plurality of service function call names associated with said real-time function call information and one or more service function parameters of each of said plurality of service function call names;
applying, using at least one processing device, a clustering algorithm to said usage data records to assign said usage data records to one of a plurality of usage pattern clusters based on said one or more extracted data features, wherein each of said plurality of usage pattern clusters comprises usage data records, and wherein said plurality of usage pattern clusters comprises:
at least one existing usage pattern cluster associated with one or more existing Consumer-Driven Contracts that define consumer expectations of the micro-service, with respect to an existing usage pattern associated with the existing usage pattern cluster, and
a new usage pattern cluster not associated with said one or more existing Consumer-Driven Contracts;
performing the following steps when the clustering algorithm creates said new usage pattern cluster:
creating a new Consumer-Driven Contract that defines consumer expectations of the micro-service, with respect to a new usage pattern associated with the new usage pattern cluster, wherein the new Consumer-Driven Contract is indicative of one or more data structure formats of responses provided from said micro-service in response to corresponding consumer requests; and
generating one or more automated Consumer-Driven Contract tests to verify whether responses sent from said micro-service conform to the data structure format in the new Consumer-Driven Contract.

### Claim 2 (depends on 1)

The method of claim 1, further comprising the step of storing one or more of said new Consumer-Driven Contract, said automated Consumer-Driven Contract tests and results of said automated Consumer-Driven Contract tests in a data store.

### Claim 3 (depends on 1)

The method of claim 1, wherein said obtaining step further comprises obtaining run-time operations data from the run-time environment, wherein said steps of creating and generating are based at least in part on said run-time operations data.

### Claim 4 (depends on 1)

The method of claim 1, wherein the following steps further comprise the step of generating anonymous data to validate the new usage pattern.

### Claim 5 (depends on 1)

The method of claim 1, wherein the new usage pattern is validated using anonymous data in a closed system loop without human access.

### Claim 6 (depends on 1)

The method of claim 1, wherein the applying step is performed at a plurality of states of a software development life cycle of the micro-service.

### Claim 7 (depends on 1)

The method of claim 1, wherein the applying step further comprises the step of applying one or more of a machine learning algorithm and an anomaly detection algorithm to the usage data records to identify one or more patterns in the usage data records.

### Claim 8 (depends on 1)

The method of claim 1, further comprising the step of applying a Supervised Machine Learning Classification/Clustering technique to labeled usage data records to train an analytical model.

### Claim 9

A system, comprising:
a memory; and
at least one processing device, coupled to the memory, operative to implement the following steps:
obtaining a plurality of usage data records for a plurality of consumers of a micro-service from a gateway of a run-time environment, wherein the plurality of usage data records comprises real-time function call information for said micro-service;
extracting one or more data features from each of the usage data records, the one or more data features comprising: a plurality of service function call names associated with said real-time function call information and one or more service function parameters of each of said plurality of service function call names;
applying, using at least one processing device, a clustering algorithm to said usage data records to assign said usage data records to one of a plurality of usage pattern clusters based on said one or more extracted data features, wherein each of said plurality of usage pattern clusters comprises usage data records, and wherein said plurality of usage pattern clusters comprises:
at least one existing usage pattern cluster associated with one or more existing Consumer-Driven Contracts that define consumer expectations of the micro-service, with respect to an existing usage pattern associated with the existing usage pattern cluster, and
a new usage pattern cluster not associated with said one or more existing Consumer-Driven Contracts;
performing the following steps when the clustering algorithm creates said new usage pattern cluster:
creating a new Consumer-Driven Contract that defines consumer expectations of the micro-service, with respect to a new usage pattern associated with the new usage pattern cluster, wherein the new Consumer-Driven Contract is indicative of one or more data structure formats of responses provided from said micro-service in response to corresponding consumer requests; and
generating one or more automated Consumer-Driven Contract tests to verify whether responses sent from said micro-service conform to the data structure format in new Consumer-Driven Contract.

### Claim 10 (depends on 9)

The system of claim 9, further comprising the step of storing one or more of said new Consumer-Driven Contract, said automated Consumer-Driven Contract tests and results of said automated Consumer-Driven Contract tests in a data store.

### Claim 11 (depends on 9)

The system of claim 9, wherein said obtaining step further comprises obtaining run-time operations data from the run-time environment, wherein said steps of creating and generating is based at least in part on said run-time operations data.

### Claim 12 (depends on 9)

The system of claim 9, wherein the following steps further comprise the step of generating anonymous data to validate the new usage pattern.

### Claim 13 (depends on 9)

The system of claim 9, wherein the new usage pattern is validated using anonymous data in a closed system loop without human access.

### Claim 14 (depends on 9)

The system of claim 9, wherein the applying step is performed at a plurality of states of a software development life cycle of the micro-service.

### Claim 15 (depends on 9)

The system of claim 9, wherein the applying step further comprises the step of applying one or more of a machine learning algorithm and an anomaly detection algorithm to the usage data records to identify one or more patterns in the usage data records.

### Claim 16 (depends on 9)

The system of claim 9, further comprising the step of applying a Supervised Machine Learning Classification/Clustering technique to labeled usage data records to train an analytical model.

### Claim 17

A computer program product, comprising a non-transitory machine-readable storage medium having encoded therein executable code of one or more software programs, wherein the one or more software programs when executed by at least one processing device perform the following steps:
obtaining a plurality of usage data records for a plurality of consumers of a micro-service from a gateway of a run-time environment, wherein the plurality of usage data records comprises real-time function call information for said micro-service;
extracting one or more data features from each of the usage data records, the one or more data features comprising: a plurality of service function call names associated with said real-time function call information and one or more service function parameters of each of said plurality of service function call names;
applying, using at least one processing device, a clustering algorithm to said usage data records to assign said usage data records to one of a plurality of usage pattern clusters based on said one or more extracted data features, wherein each of said plurality of usage pattern clusters comprises usage data records, and wherein said plurality of usage pattern clusters comprises:
at least one existing usage pattern cluster associated with one or more existing Consumer-Driven Contracts that define consumer expectations of the micro-service, with respect to an existing usage pattern associated with the existing usage pattern cluster, and
a new usage pattern cluster not associated with said one or more existing Consumer-Driven Contracts;
performing the following steps when the clustering algorithm creates said new usage pattern cluster:
creating a new Consumer-Driven Contract that defines consumer expectations of the micro-service, with respect to a new usage pattern associated with the new usage pattern cluster, wherein the new Consumer-Driven Contract is indicative of one or more data structure formats of responses provided from said micro-service in response to corresponding consumer requests; and
generating one or more automated Consumer-Driven Contract tests to verify whether responses sent from said micro-service conform to the data structure format in new Consumer-Driven Contract.

### Claim 18 (depends on 17)

The computer program product of claim 17, wherein said obtaining step further comprises obtaining run-time operations data from the run-time environment, wherein said steps of creating and generating is based at least in part on said run-time operations data.

### Claim 19 (depends on 17)

The computer program product of claim 17, wherein the following steps further comprise the step of generating anonymous data to validate the new usage pattern.

### Claim 20 (depends on 17)

The computer program product of claim 17, wherein the new usage pattern is validated using anonymous data in a closed system loop without human access.
