# US 10,956,698 B2 · Systems and methods for using machine learning to determine an origin of a code

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

- Number: US 10,956,698 B2
- Document ID: US10956698B2
- Status: Granted
- Kind: B2
- Application number: 16/388,270
- Filed: 2019-04-18
- Published: 2020-10-22
- Granted: 2021-03-23
- Earliest claimed: 2019-04-18
- Assignees: Paypal, Inc.
- Applicants: Paypal, Inc.
- Inventors: Remo Antony Raymond; Yash Bansal
- Web page: https://patentgrep.com/patent/US10956698B2

## CPC

- G06K 7/1447: {extracting optical codes from image or text carrying said optical code}
- G06K 7/1413: {1D bar codes}
- G06K 7/1434: {Barcodes with supplemental or add-on codes}
- G06K 19/06018: {one-dimensional coding}
- G06K 19/06046: {Constructional details}
- G06N 3/0464: Convolutional networks [CNN, ConvNet]
- G06N 3/08: Learning methods
- G06N 3/09: Supervised learning
- G06N 20/00: Machine learning
- G06Q 10/0833: Tracking
- G06K 19/0614: {the marking being selective to wavelength, e.g. color barcode or barcodes only visible under UV or IR (methods or arrangements for sensing record carriers using a selected wavelength, see G06K7/12)}
- G06K: GRAPHICAL DATA READING (image or video recognition or understanding G06V); PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- 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

## Abstract

Methods and systems for using machine learning to determine an origin of an alphanumeric code are presented. The code is analyzed to determine a set of characteristics based on the values and the types of values within the code. The code and the set of characteristics may then be embedded into an image. To embed the code and the set of characteristics into an image, each of the code and the set of characteristics may be converted into a corresponding set of pixel values. The pixel values may then be combined to form the pixels in the image. The image is provided to a machine learning model as input. The machine learning model is configured to use the image to determine at least one entity that is associated with the code.

## Claims

### Claim 1

A system, comprising:
a non-transitory memory; and
one or more hardware processors coupled with the non-transitory memory and configured to read instructions from the non-transitory memory to cause the system to perform operations comprising:
receiving a tracking code and a particular courier identity associated with a shipment of an item, wherein the tracking code comprises a sequence of alphanumeric characters;
deriving statistical data representing a distribution of different alphanumeric characters in the tracking code;
embedding the tracking code in a first portion of an image comprising pixel values;
embedding the statistical data in a second portion of the image; and
using a machine learning model to determine a probability that the tracking code is associated with the particular courier identity among a plurality of courier identities based on the image.

### Claim 2 (depends on 1)

The system of claim 1, wherein the statistical data comprises at least one of a distribution of alphabetic letters and numerals in the sequence of alphanumeric characters, a ratio between alphabetic letters and numerals in the sequence of alphanumeric characters, or a length of the sequence of alphanumeric characters.

### Claim 3 (depends on 1)

The system of claim 1, wherein the operations further comprise embedding a country of origin of the shipment in the image as a pixel value.

### Claim 4 (depends on 1)

The system of claim 1, wherein the statistical data comprises a distribution of alphabetic letters and numerals in the sequence of alphanumeric characters, and wherein the embedding the statistical data in the second portion of the image comprises:
converting the sequence of alphanumeric characters into a sequence of pixel values by (i) converting each alphabetic letter in the sequence of alphanumeric characters into a first pixel value and (ii) converting each numeral in the sequence of alphanumeric characters into a second pixel value different from the first pixel value; and
embedding the sequence of first and second pixel values into the second portion of the image.

### Claim 5 (depends on 1)

The system of claim 1, wherein the statistical data comprises a ratio between alphabetic letters and numerals in the sequence of alphanumeric characters, and wherein the embedding the statistical data in the second portion of the image comprises:
converting the ratio into a pixel value based on a pixel value range; and
embedding the pixel value into the second portion of the image.

### Claim 6 (depends on 1)

The system of claim 1, wherein the statistical data comprises a length of the sequence of alphanumeric characters, and wherein the embedding the statistical data in the second portion of the image comprises:
converting the length into a pixel value based on a pixel value range; and
embedding the pixel value into the second portion of the image.

### Claim 7 (depends on 1)

The system of claim 1, wherein the operations further comprise:
using the machine learning model to determine, for each courier identity in the plurality of courier identities, a corresponding probability that the tracking code is associated with the courier identity based on the image; and
determining that the tracking code is invalid when each of the determined probabilities is below a predetermined threshold.

### Claim 8 (depends on 1)

The system of claim 1, wherein the operations further comprise:
in response to determining that the probability is above a predetermined threshold, obtaining a shipment status from a server associated with the particular courier identity.

### Claim 9

A method comprising:
obtaining, by one or more hardware processors, a set of training data for training a machine learning model for associating tracking codes with one of a plurality of shipping courier, wherein each training data comprises a tracking code including a sequence of alphanumeric characters and a courier identity associated with the code;
generating, by the one or more hardware processors for each training data in the set of training data, a corresponding image by:
deriving, by the one or more hardware processors, a set of statistical characteristics from a tracking code included in the training data, wherein the set of statistical characteristics represent a distribution of different alphanumeric characters in the tracking code;
embedding the tracking code in a first portion of the corresponding image; and
embedding the set of statistical characteristics in a second portion of the corresponding image;
and
training the machine learning model based on the images corresponding to the set of training data.

### Claim 10 (depends on 9)

The method of claim 9, wherein the set of statistical characteristics comprises at least one of a distribution of alphabetic letters and numerals in the sequence of alphanumeric characters, a ratio between alphabetic letters and numerals in the sequence of alphanumeric characters, or a length of the sequence of alphanumeric characters.

### Claim 11 (depends on 9)

The method of claim 9, wherein the set of statistical characteristics comprises a distribution of alphabetic letters and numerals in the sequence of alphanumeric characters, and wherein the generating the corresponding image for each training data in the set of training data further comprises:
converting the sequence of alphanumeric characters into a sequence of pixel values by converting each value in the sequence of alphanumeric characters into a first pixel value or a second pixel value based on whether the value is an alphabet or a numeral.

### Claim 12 (depends on 9)

The method of claim 9, wherein the generating the corresponding image for each training data in the set of training data further comprises embedding a corresponding country of origin of a shipment indicated in the training data in the corresponding image.

### Claim 13 (depends on 9)

The method of claim 9, wherein the set of statistical characteristics comprises a ratio between alphabetic letters and numerals in the sequence of alphanumeric characters, and wherein the generating the corresponding image for each training data in the set of training data further comprises:
computing the ratio based on a number of alphabetic letters in the sequence of alphanumeric characters and a number of numerals in the sequence of alphanumeric characters; and
converting the ratio into a pixel value along a channel within a color space.

### Claim 14 (depends on 9)

The method of claim 9, wherein the set of statistical characteristics comprises a length of the sequence of alphanumeric characters, and wherein the generating the corresponding image for each training data in the set of training data further comprises:
converting the length into a pixel value along a channel within a color space; and
embedding the pixel value into the corresponding image.

### Claim 15

A non-transitory machine-readable medium stored thereon machine-readable instructions executable to cause a machine to perform operations comprising:
obtaining a tracking code associated with a shipment of an item, the tracking code comprising a sequence of alphanumeric characters;
deriving statistical data representing a distribution of different alphanumeric characters in the sequence of alphanumeric characters;
embedding the tracking code in a first portion of an image comprising pixel values;
embedding the statistical data in a second portion of the image; and
using a machine learning model to determine, among a plurality of shipping couriers, a particular shipping courier that is associated with the tracking code based on the image.

### Claim 16 (depends on 15)

The non-transitory machine-readable medium of claim 15, wherein the operations further comprise:
using the machine learning model to determine, from the plurality of shipping couriers, a subset of shipping couriers based on the image, wherein the tracking code has a higher probability of being associated with the subset of shipping couriers than with any other shipping couriers from the plurality of shipping couriers not in the subset; and
displaying the subset of shipping couriers and their corresponding probabilities to a user.

### Claim 17 (depends on 15)

The non-transitory machine-readable medium of claim 15, wherein the operations further comprise:
using the machine learning model to determine, for each shipping courier in the plurality of shipping couriers, a corresponding probability that the tracking code is associated with the shipping courier based on the image; and
determining that the tracking code is invalid when each of the determined probabilities is below a predetermined threshold.

### Claim 18 (depends on 15)

The non-transitory machine-readable medium of claim 15, wherein the operations further comprise:
in response to determine that the tracking code is associated with the particular shipping courier, obtaining a shipment status from the particular shipping courier.

### Claim 19 (depends on 18)

The non-transitory machine-readable medium of claim 18, wherein the obtaining the shipment status comprises transmitting a shipment status request comprising the tracking code to a server associated with the particular shipping courier.

### Claim 20 (depends on 15)

The non-transitory machine-readable medium of claim 15, wherein the statistical data comprises at least one of a distribution of alphabetic letters and numerals in the sequence of alphanumeric characters, a ratio between alphabetic letters and numerals in the sequence of alphanumeric characters, or a length of the sequence of alphanumeric characters.
