Storing and Retrieving Data in a Data Store
A machine learning system with a hierarchical state data store configuration addresses real-time transaction processing challenges, ensuring low latency and high throughput while enhancing fraud detection accuracy and security in digital transactions.
Patent Information
- Application Number
- JP2024525455
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2021-10-29
- Publication Date
- 2024-11-13
- Estimated Expiration
- 2041-10-29
AI Technical Summary
Existing transaction processing systems face challenges in real-time processing of large volumes of digital transactions due to high latency, data siloing, unpredictable load changes, and the need for secure, real-time fraud detection, which traditional and machine learning-based methods struggle to address effectively.
Implementing a machine learning system that processes transactions in real-time by dynamically updating models, handling multiple data sources securely, and using a hierarchical state data store configuration to reduce latency and increase throughput, allowing for atomic data changes without duplication.
The system achieves low latency (1 second or less) and high throughput (billions of transactions per year) with improved fraud detection accuracy, reducing the risk of unwanted data changes and enhancing security in digital transactions.
Smart Images

Figure 2024542000000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to a strategy for storing and searching data in a data store. Such data may be machine learning system model data, i.e., data for a machine learning model used by a machine learning system. Examples of such data include, but are not limited to, parameter data and / or state data for the machine learning model. The machine learning system may be a real-time transaction processing system. [Background technology]
[0002] Digital payments have exploded over the last two decades, with more than three-quarters of global payments using some form of payment card or electronic wallet. Point-of-sale systems are increasingly becoming digital rather than cash-based. Simply put, the global commercial system now relies heavily on electronic data processing platforms. This presents many engineering challenges that are largely hidden from non-expert users. For example, digital transactions need to be completed in real-time, i.e., with the lowest level of delay encountered by a computing device at the point of purchase. Digital transactions also need to be secure and resistant to attacks and expropriation. Digital transaction processing is also constrained by the historical development of global electronic systems for payments. For example, most infrastructure is still structured around a model designed for mainframe architectures that are in use more than 50 years ago.
[0003] As digital transactions grow, new security risks are also becoming apparent. Digital transactions present new opportunities for fraud and malicious activity. In 2015, it was estimated that 7% of digital transactions were fraudulent, and that number is only growing as more economic activity moves online. Fraud losses are growing.
[0004] While risks such as fraud are an economic issue for businesses involved in commerce, implementing technical systems to process transactions is an engineering challenge. Traditionally, banks, retailers, and card issuers developed "written on paper" rules or procedures that were manually implemented by personnel to flag or block some transactions. As transactions became digital, one approach to building technical systems to process transactions became to feed these sets of developed criteria to computer engineers and ask them to implement them using a digital representation of the transaction, i.e., converting the handwritten rules into coded logic statements that can be applied to electronic transaction data. This traditional approach has run into several problems as digital transaction volumes grow. First, any processing applied needs to be done "in real time," e.g., with millisecond latency. Second, thousands of transactions need to be processed per second (e.g., a typical "load" may be 1000-2000 per second), and the load varies unpredictably over time (e.g., the launch of a new product or set of tickets can easily increase the average load level several fold). Third, transaction processors and bank digital storage systems are often siloed or compartmentalized for security reasons, and digital transactions often involve an interconnected web of merchant systems. Fourth, large-scale analysis of actual reported and predicted fraud is now possible. This shows that traditional approaches to fraud detection are found to be inadequate, i.e., low accuracy and high false positives. This, in turn, has physical implications in digital transaction processing, with more genuine point-of-sale and online purchases being rejected, and those seeking to take advantage of new digital systems often moving away from them.
[0005] In the last few years, more and more machine learning approaches have been taken to the processing of transactional data. As machine learning models mature in academia, engineers have begun to try to apply them to the processing of transactional data. However, this again hits a problem. Even when an engineer is provided with an academic or theoretical machine learning model and asked to implement it, this is not easy. For example, the problem of large-scale transaction processing systems comes into play. Machine learning models do not have the luxury of unlimited inference time as in a laboratory. This means that some models are simply not practical to implement in a real-time setting, or they require significant adaptation to enable real-time processing at the volume levels encountered by real-world servers. Moreover, engineers must contend with the problem of implementing machine learning models on data that is siloed or partitioned based on access security, and in a context where the rate of data updates is extreme. The problems faced by engineers building transaction processing systems may be viewed as being akin to those faced by network engineers or database engineers, where machine learning models need to be applied but meet the system throughput and query response time constraints set by the processing infrastructure. There are no easy solutions to these problems. Indeed, the fact that many transaction processing systems are confidential, proprietary, and based on old technology means that engineers lack the body of knowledge developed in these adjacent fields and often face challenges unique to the domain of transaction processing. Moreover, the field of large-scale practical machine learning is still young, with only a small number of established design patterns or textbooks on which engineers can rely.
[0006] As indicated above, engineers building transaction processing systems may face problems similar to those faced by database engineers. Examples of such database-related problems include, but are not limited to, creation, configuration, management, maintenance, use, structuring, optimization, security, and organization. However, the demands of databases for use in transaction processing systems, particularly those for implementing machine learning systems and providing real-time processing, may differ significantly from database demands in other technical fields. For example, such transaction processing systems may need to provide one or more of: (i) real-time database read capabilities; (ii) high availability for "online" transaction processing capabilities with limited or no downtime for database management; (iii) the ability to process significant amounts of state data that may accumulate quickly; (iv) high stability and reliability; (v) data security; and (vi) the ability to handle access from multiple different clients.
[0007] Copy-on-write snapshots are a standard feature of most existing database systems. In addition, in existing database systems, a new set of data can be copied on top of an existing set of data. However, the latter scales linearly with the size of the new set of data. Additionally, in existing database systems, large modifications cannot be made atomically or in parallel with other clients accessing the same set of data. Summary of the Invention [Means for solving the problem]
[0008] Aspects of the invention are set out in the accompanying independent claims. Some variations of the invention are then set out in the accompanying dependent claims. Further aspects, variations and examples are set out in the following detailed description.
[0009] Examples of the present invention will now be described, by way of example only, with reference to the accompanying drawings, in which: [Brief description of the drawings]
[0010] [Figure 1A] FIG. 1 is a schematic diagram illustrating various exemplary electronic infrastructures for transaction processing. [Figure 1B] FIG. 1 is a schematic diagram illustrating various exemplary electronic infrastructures for transaction processing. [Figure 1C] FIG. 1 is a schematic diagram illustrating various exemplary electronic infrastructures for transaction processing. [Figure 2A] 1A-1D are schematic diagrams illustrating various examples of data storage systems for use by a machine learning transaction processing system. [Figure 2B] 1A-1D are schematic diagrams illustrating various examples of data storage systems for use by a machine learning transaction processing system. [Figure 3A] 2 is a schematic diagram showing various examples of transaction data; [Figure 3B] 2 is a schematic diagram showing various examples of transaction data; [Figure 4] FIG. 1 is a schematic diagram illustrating example components of a machine learning transaction processing system. [Figure 5A] FIG. 2 is a sequence diagram illustrating an example set of processes performed by various computing entities on transaction data. [Figure 5B] FIG. 2 is a sequence diagram illustrating an example set of processes performed by various computing entities on transaction data. [Figure 6A] 1 is a state graph representing an example data store. [Figure 6B] 1 is a state graph representing an example data store. [Figure 6C] 1 is a state graph representing an example data store. [Figure 6D] 1 is a state graph representing an example data store. [Figure 6E] 1 is a state graph representing an example data store. [Figure 7] 1 is a state graph representing another example data store. [Figure 8A] FIG. 2 is a schematic diagram illustrating various examples of data and information stored in a data store. [Figure 8B] FIG. 2 is a schematic diagram illustrating various examples of data and information stored in a data store. [Figure 9] 1 is a state graph representing another example data store. [Figure 10] 1 is a state graph representing another example data store. [Figure 11] 1 is a state graph representing another example data store. [Figure 12A] 1 is a state graph representing another exemplary data store. [Figure 12B] 1 is a state graph representing another exemplary data store. [Figure 13A] 1 is a state graph representing another exemplary data store. [Figure 13B] 1 is a state graph representing another exemplary data store. [Figure 14] 1 is a state graph representing another example data store. [Figure 15] 1 is a state graph representing another example data store. [Figure 16A] 1 is a graph depicting an example data queue. [Figure 16B] 1 is a graph depicting an example data queue. [Figure 16C] 1 is a graph depicting an example data queue. [Figure 16D] 1 is a graph depicting an example data queue. [Figure 16E] 1 is a graph depicting an example data queue. [Figure 17A] 11 is a graph illustrating another exemplary data queue. [Figure 17B] 11 is a graph illustrating another exemplary data queue. [Figure 18] 1 is a state graph representing another example data store. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0011] introduction Some examples described herein relate to strategies for use in machine learning systems for use in transaction processing. In some examples, machine learning systems are applied in real time to high volume transaction processing pipelines to provide an indication of whether a transaction or entity conforms to a previously observed and / or predicted pattern of activity or action, e.g., whether the transaction or entity is "normal" or "anomalous". The term "behavioral" is used herein to refer to this pattern of activity or action. The indication may comprise a normalized scalar value within a predefined range (e.g., 0 to 1) that can then be used to prevent fraud and other misuse of the payment system. The machine learning system may apply machine learning models that are updated as more transaction data is acquired, e.g., continually trained on new data, to reduce false positives and maintain accuracy of output metrics. Examples described herein relate to improved processing of such data, e.g., in terms of searching for and storing such data in one or more data stores. This example may be particularly useful to prevent fraud where the physical presence of a payment card cannot be confirmed (e.g., online transactions known as "card-not-present"), or for commercial transactions where high-value transactions may be routine and patterns of behavior may be difficult to categorize as "unexpected." Thus, this example facilitates the processing of transactions when these transactions are primarily "online," i.e., conducted digitally over one or more public communications networks.
[0012] Some examples described herein allow machine learning models to be tailored to be specific to some entities, such as account holders and merchants. For example, the machine learning models may model entity-specific patterns of behavior rather than overall group or aggregate behavior that would result in poor accuracy. The approaches and machine learning systems described herein are capable of dynamically updating machine learning models despite large transaction flows and / or the need for isolation of different data sources. Again, the examples described herein provide improved approaches for reading and storing machine learning model data to be used in such machine learning models.
[0013] This example may be applied to a wide variety of digital transactions, including but not limited to card payments, so-called "wire" transfers, peer-to-peer payments, Bankers' Automated Clearing System (BACS) payments, and Automated Clearing House (ACH) payments. The output of the machine learning system may be used to prevent a wide variety of fraudulent criminal behavior, such as card fraud, application fraud, payment fraud, retail fraud, gambling fraud, and money laundering.
[0014] This exemplary machine learning system, for example as configured and / or trained according to Figures 1A-18 below, enables fast inference that can be easily parallelized to provide one-second or sub-second processing latency and to manage large-scale processing volumes (e.g., billions of transactions per year).
[0015] More specifically, the examples described herein allow multiple divergent sets of data to be stored in a data store (such as a database) based on a common historical set of data without historical data being duplicated. The examples allow one set of data to be logically replaced with another set of data without all data from one set being copied on top of the data in another set. The examples allow new sets of data to be made accessible to clients as a single atomic operation without requiring data to be copied within the data store. When such data comprises machine learning model data, machine learning system processing latency can be reduced and throughput can be increased. As described in more detail below, various strategies are provided that make most data changes recognizable as part of a single atomic change to "state ID" metadata. For example, rather than being copied into a "live" dataset, a large set of data can be copied into a dataset that is separate from the live dataset used by the running process. The separate dataset can have a state ID that is different from and independent of the live state ID used by the live dataset. The new state ID of the new dataset can be made atomically visible to existing processes by setting the new dataset as an overlay of the live dataset and notifying clients of the state metadata change. Clients can then read data from a mixture of the live and new datasets, rather than requiring a manual copy operation to be performed before data can be read from a combined single dataset. Maintaining separate datasets in this manner also reduces the risk of inadvertent and undesired changes to the live dataset, which may, for example, adversely affect transaction processing.
[0016] Some term definitions The term "data" is used in various contexts herein to refer to digital information, such as, but not limited to, that represented by known bit structures in one or more programming languages. As used, data may refer to digital information stored as bit sequences in computer memory. Some machine learning models may operate on structured arrays of data in a predefined bit format. Using the terminology of the art, these may be referred to as multidimensional arrays or "tensors." Note that for machine learning methods, for example, multidimensional arrays having defined ranges in multiple dimensions may be "flattened" to be represented (e.g., in memory) as arrays or vectors of values stored according to a predefined format (e.g., n-bit integers or floating-point numbers, signed or unsigned). Thus, the term "tensor" as used herein covers multidimensional arrays (e.g., vectors, matrices, volumetric arrays, etc.) having one or more dimensions. However, data may take other forms.
[0017] The term "structured numeric representation" is used to refer to numerical data in a structured form, such as a one- or multi-dimensional array that stores numerical values having a common data type, such as integer or floating-point values. A structured numeric representation may comprise a tensor (as used in machine learning terminology). A structured numeric representation is typically stored as an indexed and / or contiguous set of memory locations, e.g., a one-dimensional array of 64-bit floating point numbers may be represented in computer memory as a contiguous array of 64-bit memory locations in a 64-bit computing system.
[0018] The term "transaction data" is used herein to refer to electronic data associated with a transaction. A transaction comprises a series of communications between different electronic systems to effect a payment or exchange. In general, transaction data may comprise data indicative of events (e.g., actions undertaken in time) that relate to and may inform transaction processing. Transaction data may comprise structured, unstructured, and semi-structured data. In some cases, transaction data may be used broadly to refer to actions taken with respect to one or more electronic devices. Transaction data may take a variety of forms depending on the exact implementation. However, different data types and formats may be transformed by pre- or post-processing as appropriate.
[0019] The term "interface" is used herein to refer to any physical and / or logical interface that allows one or more of data input and data output. An interface may be implemented by a network interface adapted to send and / or receive data, or by retrieving data from one or more memory locations, such as implemented by a processor executing a set of instructions. An interface may also comprise a physical (network) coupling through which data is received, such as hardware to enable wired or wireless communication over a particular medium. An interface may comprise an application programming interface and / or a method call or return. For example, in a software implementation, an interface may comprise passing data to a function initiated via a method call and / or a memory reference to such a function, where the function comprises computer program code executed by one or more processors, and in a hardware implementation, an interface may comprise a wired interconnect between different chips, chipsets, or portions of chips. In the drawings, an interface may be indicated by a processing block boundary with inward and / or outward arrows representing data transfer.
[0020] The terms "component" and "module" are used interchangeably to refer to either a hardware structure having a specific functionality (e.g., in the form of mapping input data to output data), or a combination of general-purpose hardware and specific software (e.g., specific computer program code running on one or more general-purpose processors). A component or module may be implemented as a specific packaged chipset, e.g., an application specific integrated circuit (ASIC) or programmed field programmable gate array (FPGA), and / or as software objects, classes, class instances, scripts, code, etc., that are executed when used by a processor.
[0021] The term "machine learning model" is used herein to refer to at least a hardware-implemented implementation of a machine learning model or function. Known models within the field of machine learning include logistic regression models, naive Bayes models, random forests, support vector machines, and artificial neural networks. Implementation of the classifier may be performed within one or more machine learning programming libraries, including, but not limited to, scikit-learn, TensorFlow, and PyTorch.
[0022] The term "map" is used herein to refer to the transformation or conversion of a first set of data values to a second set of data values. The two sets of data values may be arrays of different sizes, with the output array being of a smaller dimensionality than the input array. The input array and the output array may have a common or different data type. In some examples, the mapping is a one-way mapping to a scalar value.
[0023] The term "data store" is used herein to refer to a repository for storing data. One example of a data store is a database. However, a data store may take different forms depending on, for example, implementation details. Another exemplary type of data store is a file storage system.
[0024] The term "dataset" is used herein to refer to a collection of data. A dataset may, for example, be empty when it is created.
[0025] The term "data item" is used herein to refer to information being searched for in a data store. A data item may uniquely identify a record in the data store. The terms "key" and "search key" may be used interchangeably herein with the term "data item." Data may be stored in association with a data item in a data store.
[0026] The term "data element" is used herein to relate to all or a portion of a given piece of data stored in a data store. The data in this regard may comprise one or more data elements.
[0027] The term "metadata" is used herein to refer to information that provides information about other data. The metadata may be stored in the same data store as the state data or in a different data store.
[0028] Exemplary Transaction Processing System 1A-1C show a set of exemplary transaction processing systems 100, 102, 104. These exemplary transaction processing systems are described to provide a context for the invention described herein, but should not be viewed as limiting, and the configuration of any one implementation may vary based on the particular requirements of that implementation. However, the exemplary transaction processing systems described will enable one of ordinary skill in the art to identify several high-level technical features that are important to the following description. The three exemplary transaction processing systems 100, 102, 104 show various areas where variations may occur.
[0029] 1A-1C illustrate a set of client devices 110 configured to initiate a transaction. In this example, the set of client devices 110 includes a smartphone 110-A, a computer 110-B, a point-of-sale (POS) system 110-C, and a portable merchant device 110-D. These client devices 110 provide a set of non-exhaustive examples. In general, any electronic device or set of devices may be used to undertake a transaction. In some cases, the transaction comprises a purchase or payment. For example, the purchase or payment may be an online or mobile purchase or payment made via smartphone 110-A or computer 110-B, or may be a purchase or payment made at a merchant premises, such as via POS system 110-C or portable merchant device 110-D. The purchase or payment may be for goods and / or services.
[0030] In Figures 1A-1C, the client device 110 is communicatively coupled to one or more computer networks 120. The client device 110 may be communicatively coupled in a variety of ways, including by one or more wired and / or wireless networks, including telecommunications networks. In a preferred example, all communications across the one or more computer networks are secured using, for example, the Transport Layer Security (TLS) protocol. In Figure 1A, two computer networks are shown as 120-A and 120-B. These may be separate networks or different parts of a common network. The first computer network 120-A communicatively couples the client device 110 to a merchant server 130. The merchant server 130 may execute computer processes that implement process flows for transactions. For example, the merchant server 130 may be a back-end server that may be used by an online merchant to process transaction requests received from the POS system 110-C or the portable merchant device 110-D, or to implement a website where purchases may be made. It will be appreciated that the examples of Figures 1A-1C are necessary simplifications of actual architectures and that there may be several interacting server devices implementing an online retailer, including, for example, separate server devices for providing HyperText Markup Language (HTML) pages detailing products and / or services and for handling payment processes.
[0031] In FIG. 1A, the merchant server 130 is communicatively coupled to a further set of backend server devices for processing transactions. In FIG. 1A, the merchant server 130 is communicatively coupled to a payment processor server 140 via a second network 120-B. The payment processor server 140 is communicatively coupled to a first data storage device 142 that stores transaction data 146 and a second data storage device 144 that stores auxiliary data 148. The transaction data 146 may comprise batches of transaction data relating to different transactions undertaken over a period of time. The auxiliary data 148 may comprise data associated with the transactions, such as records that store merchant data and / or end user data. In FIG. 1A, the payment processor server 140 is communicatively coupled to a machine learning server 150 via a second network 120-B. The machine learning server 150 implements a machine learning system 160 for processing the transaction data. The machine learning system 160 is configured to receive input data 162 and map it to output data 164 used by the payment processor server 140 to process a particular transaction, such as a transaction originating from a client device 110. In some cases, the machine learning system 160 receives at least transaction data associated with a particular transaction and provides an alert or numerical output used by the payment processor server 140 to determine whether the transaction will be authorized (i.e., approved) or rejected. Thus, the output of the machine learning system 160 may comprise a label, alert, or other indication of fraud or general malicious or anomalous activity. The output may comprise a probability indication, such as a score or probability. In some cases, the output data 164 may comprise a scalar numerical value. The input data 162 may further comprise data derived from one or more of the transaction data 146 and the auxiliary data 148.In some cases, the output data 164 indicates a level of deviation from a particular expected pattern of behavior based on past observations or measurements. For example, this may indicate fraudulent or criminal behavior, often when significantly different from the observed pattern of behavior, especially at large scale. The output data 164 may form a measure of the behavior. The expected pattern of behavior may be prescribed, either explicitly or implicitly, based on observed interactions between different entities in the transaction process flow, such as end users or customers, merchants (including point-of-sale and back-end locations or entities, if these may be different), and banks.
[0032] The machine learning system 160 may be implemented as part of a transaction processing pipeline. An exemplary transaction processing pipeline is described later with respect to Figures 5A and 5B. The transaction processing pipeline may comprise electronic communications between the client device 110, the merchant server 130, the payment processor server 140, and the machine learning server 150. Other server devices may also be involved, such as a banking server that provides authorization from an issuing bank. In some cases, the client device 110 may communicate directly with the payment processor server 140. In use, the transaction processing pipeline typically needs to be completed within 100 or 200 milliseconds. Generally, processing times of less than one second may be considered real time (e.g., humans typically perceive events in a time span of 400 ms). Furthermore, the desired maximum latency of the complete round-trip time for transaction processing may be 100-200 ms, and within this time span, the time allocated for machine learning system 160 may be a small fraction of this total amount, such as 10 ms (i.e., less than 5-10% of the target processing time), since most of that time may be reserved for other operations in the transaction processing flow. This presents technical constraints on the implementation of machine learning system 160. Furthermore, in real-world implementations, the average processing volume may be on the order of 1000-2000 per second. This means that most "off-the-shelf" machine learning systems are not suitable for implementing machine learning system 160. It further means that most machine learning techniques described in academic papers cannot be implemented within the above-mentioned transaction processing pipeline without non-trivial adaptations. There is also the problem that anomalies are by their very nature rare events, and therefore accurate machine learning systems are difficult to train.
[0033] FIG. 1B illustrates a variation 102 of the exemplary transaction processing system 100 of FIG. 1A. In this variation 102, the machine learning system 160 is implemented in a payment processor computer infrastructure, for example, executed by the payment processor server 140 and / or on a locally coupled server in the same local network as the payment processor server 140. The variation 102 of FIG. 1B may be preferred for larger payment processors, as it allows faster response times, greater control, and improved security. However, functionally, the transaction processing pipeline may be similar to that of FIG. 1A. For example, in the example of FIG. 1A, the machine learning system 160 may be initiated by a secure external application programming interface (API) call, such as a Representation State Transfer (REST) API call using Hypertext Transfer Protocol Secure (HTTPS), while in FIG. 1B, the machine learning system 160 may be initiated by an internal API call, but where a common end API can handle both requests (e.g., a REST HTTPS API may provide an external wrapper for the internal API).
[0034] FIG. 1C illustrates another variation 104 of the exemplary transaction processing system 100 of FIG. 1A. In this variation 104, the machine learning system 160 is communicatively coupled to a local data storage device 170. For example, the data storage device 170 may be on the same local network as the machine learning server 150 or may comprise a local storage network accessible to the machine learning server 150. In this case, there are multiple local data storage devices 170-A to 170-N, where each data storage device stores partitioned auxiliary data 172. The partitioned auxiliary data 172 may comprise parameters for one or more machine learning models. In some cases, the auxiliary data 172 may comprise state for the machine learning models, where the state may relate to one or more particular entities, such as a user or a merchant. The partitioning of the auxiliary data 172 may need to be applied to meet security requirements set by third parties, such as a payment processor, one or more banks, and / or one or more merchants. In use, the machine learning system 160 accesses auxiliary data 172-A-N via a number of local data storage devices 170-A-N based on input data 162. For example, the input data 162 may be received via an API request from a particular source and / or may comprise data identifying that a particular partition should be used to process the API request. More details of different storage systems that may be applied to meet security requirements are presented in Figures 2A and 2B.
[0035] Exemplary Data Storage Configurations 2A and 2B show two exemplary data storage configurations 200 and 202 that may be used by an exemplary machine learning system 210 for processing transaction data. The examples of FIG. 2A and FIG. 2B are two non-limiting examples showing different options available for implementation, and a particular configuration may be selected according to individual circumstances. The machine learning system 210 may comprise an implementation of the machine learning system 160 described in the previous examples of FIG. 1A-FIG. 1C. The examples of FIG. 2A and FIG. 2B enable, for example, the machine learning system 210 to process transaction data secured using heterogeneous cryptographic parameters to securely process transaction data for heterogeneous entities. It will be appreciated that the configurations of FIG. 2A and FIG. 2B may not be used if the machine learning system 160 is implemented for a single set of secured transactions and auxiliary data, for example, within an internal transaction processing system or as a hosted system for use by a single payment processor.
[0036] FIG. 2A illustrates a machine learning system 210 communicatively coupled to a data bus 220. The data bus 220 may comprise an internal data bus of the machine learning server 150 or may form part of a storage area network. The data bus 220 communicatively couples the machine learning system 210 to a plurality of data storage devices 230, 232. The data storage devices 230, 232 may comprise any known data storage devices, such as magnetic hard disks and solid state devices. Although the data storage devices 230, 232 are shown in FIG. 2A as different devices, they may alternatively form different physical areas or portions of storage within a common data storage device. In FIG. 2A, the plurality of data storage devices 230, 232 store historical transaction data 240 and auxiliary data 242. In FIG. 2A, a first set of data storage devices 230 stores historical transaction data 240 and a second set of data storage devices 232 stores auxiliary data 242. The auxiliary data 242 may comprise one or more of model parameters for a set of machine learning models (such as trained parameters for a neural network architecture and / or configuration parameters for a random forest model) and state data for those models. In some cases, different sets of historical transaction data 240-A-N and auxiliary data 242-A-N are associated with different entities that collectively use the services provided by the machine learning system 210 securely, and may represent data for different banks that need to be kept separate as part of the terms of providing the machine learning services to those entities.
[0037] FIG. 2B illustrates another way in which different sets of historical transaction data 240-A-N and auxiliary data 242-A-N may be stored. In FIG. 2B, the machine learning system 210 is communicatively coupled to at least one data storage device 260 via a data transfer channel 250. The data transfer channel 250 may comprise a local storage bus, a local storage area network, and / or a remote secure storage coupling (e.g., located on an insecure network such as the Internet). In FIG. 2B, the physical data storage device 260 is used to provide a secure logical storage layer 270. The secure logical storage layer 270 may be a virtualized system that appears to the machine learning system 210 as a separate physical storage device, but is actually implemented independently on at least one data storage device 260. Logical storage layer 270 may provide separate encrypted partitions 280 for data relating to groups of entities (e.g., relating to different issuing banks, etc.), and different sets of historical transaction data 240-A-N and auxiliary data 242-A-N may be stored in corresponding partitions 280-A-N. In some cases, entities may be dynamically created as transactions are received for processing based on data stored by one or more of the server systems shown in Figures 1A-1C.
[0038] Example Transaction Data 3A and 3B show examples of transaction data that may be processed by a machine learning system such as 160 or 210. FIG. 3A shows how the transaction data may comprise a set of records 300, where each record has a timestamp and comprises multiple transaction fields. The records 300 may be time-ordered or may be strictly ordered in another manner. In some examples, the transaction data may be optionally grouped and / or filtered based on the timestamp. For example, FIG. 3A shows partitioning of the transaction data into current transaction data 310 associated with the current transaction and "older" or historical transaction data 320 that is within a predefined time range of the current transaction. The time range may be set as a hyperparameter of any machine learning system. Alternatively, the "older" or historical transaction data 320 may be set as some number of transactions. A mixture of the two approaches is also possible.
[0039] FIG. 3B illustrates how transaction data 330 for a particular transaction may be stored in a numeric format for processing by one or more machine learning models. For example, in FIG. 3B, the transaction data has at least the fields: transaction amount, timestamp (e.g., as a Unix epoch), transaction type (e.g., card payment or direct debit), product description or identifier (i.e., relating to the item being purchased), merchant identifier, issuing bank identifier, set of characters (e.g., Unicode characters in a field of a predefined character length), country identifier, etc. It should be noted that a wide variety of data types and formats may be received and preprocessed into an appropriate numeric representation. In some cases, outgoing transaction data, such as that generated by a client device and sent to the merchant server 130, is preprocessed to convert alphanumeric data types into numeric data types for application of one or more machine learning models. Other fields present in the transaction data may include, but are not limited to, an account number (e.g., credit card number), the location of where the transaction is taking place, and the manner in which the transaction is performed (e.g., in person, over the phone, on a website).
[0040] An exemplary machine learning system FIG. 4 illustrates an example 400 of a machine learning system 402 that may be used to process transaction data. The machine learning system 402 may implement one or more of the machine learning systems 160 and 210. The machine learning system 402 receives input data 410. The format of the input data 410 may depend on which machine learning model is being applied by the machine learning system 402. If the machine learning system 402 is configured to perform fraud detection or anomaly detection on a transaction, e.g., an ongoing transaction as described above, the input data 410 may comprise transaction data (i.e., data that forms part of a data package for the transaction), such as 330, as well as data derived from historical transaction data (such as 300 in FIG. 3A) and / or auxiliary data (such as 148 in FIG. 1A-1C or 242 in FIG. 2A-2B). The auxiliary data may comprise secondary data linked to one or more entities identified in the primary data associated with the transaction. For example, if the transaction data for an ongoing transaction identifies a user, a merchant, and one or more banks associated with that transaction (such as an issuing bank for the user and a merchant bank), such as via a unique identifier present in the transaction data, the auxiliary data may comprise data related to these transaction entities. The auxiliary data may also comprise data derived from records of activity, such as interaction logs and / or authentication records. In some cases, the auxiliary data is stored in one or more static data records and is retrieved from these records based on the received transaction data. Additionally or alternatively, the auxiliary data may comprise machine learning model parameters that are retrieved based on the content of the transaction data. For example, the machine learning model may have parameters specific to one or more of the user, the merchant, and the issuing bank, and these parameters may be retrieved based on which of these are identified in the transaction data.For example, one or more of the users, merchants, and issuing banks may have corresponding embeddings that may comprise retrievable or mappable tensor representations for the entities. For example, each user or merchant may have a tensor representation (e.g., a floating point vector of size 128-1024) that may either be retrieved from a database or other data storage, or may be generated by an embedding layer, for example, based on a user or merchant index.
[0041] Input data 410 is received at an input data interface 412. The input data interface 412 may comprise an API interface, such as an internal or external API interface as described above. In some cases, a payment processor server 140, as shown in FIGS. 1A-1C, makes a request to this interface, where the request payload includes transaction data. The API interface may be defined to be agnostic with respect to the format of the transaction data or its source. The input data interface 412 is communicatively coupled to a machine learning model platform 414. In some cases, a request made to the input data interface 412 triggers execution of the machine learning model platform 414 using the transaction data provided to the interface. The machine learning model platform 414 is configured as an execution environment for the application of one or more machine learning models to the input data 410. In some cases, the machine learning model platform 414 is configured as an execution wrapper for a number of different selectable machine learning models. For example, the machine learning models may be specified using a model definition language (e.g., similar to or using a markup language such as Extensible Markup Language - XML). The model definition language may include (independently or in combination) SQL, TensorFlow, Caffe, Thinc, and PyTorch, among others. In some cases, the model definition language comprises computer program code executable to perform one or more of training and inference of the defined machine learning model. The machine learning model may comprise, for example, artificial neural network architectures, ensemble models, regression models, decision trees such as random forests, graph models, and Bayesian networks, among others. The machine learning model platform 414 may define common (i.e., shared) input and output definitions such that different machine learning models are applied in a common (i.e., shared) manner.
[0042] In this example, the machine learning model platform 414 is configured to provide at least a single scalar output 416, which may be normalized within a predefined range, such as 0 to 1. Once normalized, the scalar output 416 may be viewed as a probability that a transaction associated with the input data 410 is fraudulent or anomalous. In this case, a value of "0" may represent a transaction that matches a normal pattern of activity for one or more of the user, merchant, and issuing bank, and a value of "1" may indicate that the transaction is fraudulent or anomalous, i.e., does not match an expected pattern of activity (although one skilled in the art will appreciate that the normalized range may be different, such as inverted or within different bounds, and have the same functional effect). It should be noted that while the range of values may be defined as 0 to 1, the output values may not be uniformly distributed within this range, e.g., a value of "0.2" may be a common output for a "normal" event, and a value of "0.8" may be viewed as exceeding a threshold for a typical "anomalous" or fraudulent event. The machine learning models implemented by the machine learning platform 414 may thus implement some form of mapping between the highly dimensional input data (e.g., transaction data and any retrieved auxiliary data) and single-value output. In some cases, for example, the machine learning platform 414 may be configured to receive input data for the machine learning models in a numeric format, and each defined machine learning model is configured to map the defined input data in a similar manner. The exact machine learning model applied by the machine learning model platform 414, and parameters for that model, may be determined based on configuration data. The configuration data may be included in and / or identified using the input data 410, and / or set based on one or more configuration files parsed by the machine learning platform 414.
[0043] In some cases, the machine learning model platform 414 may provide additional outputs depending on the context. In some implementations, the machine learning model platform 414 may be configured to return a "reason code" that captures a human-friendly explanation of the machine learning model's output with respect to the suspicious input attribute. For example, the machine learning model platform 414 may indicate which of one or more input elements or input units in the input representation influenced the model output, e.g., the combination of the "amount" channel exceeding a learned threshold and a set of "retailer" elements or units (such as embeddings or indexes) being outside a given cluster. In the case where the machine learning model platform 414 implements decision trees, these additional outputs may comprise paths through the decision tree or aggregated feature importances based on an ensemble of trees. In the case of a neural network architecture, this may comprise layer output activations and / or layer filters with positive activations.
[0044] In FIG. 4, some implementations may include an optional alert system 418 that receives the scalar output 416. In other implementations, the scalar output 416 may be passed directly to the output data interface 420 without post-processing. In this latter case, the scalar output 416 may be packaged in a response to the original request to the input data interface 412. In either case, output data 422 derived from the scalar output 416 is provided as an output of the machine learning system 402. The output data 422 is returned to enable final processing of the transaction data. For example, the output data 422 may be returned to the payment processor server 140 and used as the basis for a decision to approve or reject the transaction. Depending on the implementation requirements, in some cases, the alert system 418 may process the scalar output 416 to return a binary value (e.g., "1" equals reject) indicating whether the transaction should be approved or rejected. In some cases, the decision may be made by applying a threshold to the scalar output 416. This threshold may be context-dependent. In some cases, the alarm system 418 and / or the output data interface 420 may also receive additional inputs, such as explanatory data (e.g., the "reason code" discussed above) and / or the original input data. The output data interface 420 may generate an output data package for the output data 422 that combines these inputs with the scalar output 416 (e.g., at least for logging and / or further review). Similarly, an alarm generated by the alarm system 418 may include and / or additionally be based on the additional inputs discussed above, in addition to the scalar output 416, for example.
[0045] In a preferred implementation, the machine learning system 402 is used in an “online” mode to process a high volume of transactions within a narrowly defined time range. For example, under normal processing conditions, the machine learning system 402 may process requests within 7-12 ms and may be able to manage 1000-2000 requests per second (these are median constraints from real-world operating conditions). However, the machine learning system 402 may also be used in an “offline” mode, for example, by providing selected historical transactions to the input data interface 412. In the offline mode, input data may be passed to the input data interface in batches (i.e., groups). The machine learning system 402 may also be capable of implementing machine learning models that provide scalar outputs for entities similar to or in lieu of transactions. For example, the machine learning system 402 may receive requests associated with an identified user (e.g., cardholder or payment account holder) or an identified merchant and may be configured to provide a scalar output 416 indicative of the likelihood that the user or merchant is fraudulent, malicious, or anomalous (i.e., a common threat or risk). For example, this may form part of a continuous or periodic monitoring process, or a one-off request (e.g., as part of an application for a service). The provision of a scalar output to a particular entity may be based on a set of transaction data up to and including the last approved transaction in a sequence of transaction data (e.g., transaction data for an entity similar to that to be in FIG. 3A).
[0046] Exemplary Transaction Process Flow 5A and 5B show two possible exemplary transaction process flows 500 and 550. These process flows may take place in the context of the exemplary transaction process systems 100, 102, 104 shown in FIGS. 1A-1C as well as other systems. The process flows 500 and 550 are provided as an example of a context in which a machine learning transaction processing system may be applied, but not all transaction process flows necessarily follow the process shown in FIGS. 5A and 5B, and process flows may vary between implementations, between systems, and over time. The exemplary transaction process flows 500 and 550 reflect two possible cases: a first case represented by transaction process flow 500 in which the transaction is approved, and a second case represented by transaction process flow 550 in which the transaction is rejected. Each transaction process flow 500, 550 involves the same set of five interacting systems and devices: a POS or user device 502, a merchant system 504, a payment processor (PP) system 506, a machine learning (ML) system 508, and an issuing bank system 510. The POS or user device 502 may comprise one of the client devices 110, the merchant system 504 may comprise a merchant server 130, the payment processor system 506 may comprise a payment processor server 140, and the machine learning system 508 may comprise an implementation of the machine learning systems 160, 210, and / or 402. The issuing bank system 510 may comprise one or more server devices that perform transaction functions on behalf of the issuing bank. The five interacting systems and devices 502-510 may be communicatively coupled by one or more internal or external communication channels, such as the network 120.In some cases, some of these systems may be combined, e.g., an issuing bank may also act as a payment processor, so that systems 506 and 510 may be implemented using a common system. In other cases, a similar process flow may be performed specifically for the merchant (e.g., without involving a payment processor or issuing bank), in which case the machine learning system 508 may communicate directly with the merchant system 504. In these variations, the general functional transaction process flow may remain similar to that described below.
[0047] The transaction process flows in both Figures 5A and 5B comprise several common (i.e., shared) processes 512-528. At block 512, the POS or user device 502 initiates the transaction. In the case of a POS device, this may comprise a cashier attempting to receive an electronic payment using a front-end device, and in the case of a user device 502, this may comprise a user making an online purchase (e.g., clicking "Done" in an online basket) using a credit or debit card or online payment account. At block 514, payment details are received as electronic data by the merchant system 504. At block 516, the transaction is processed by the merchant system 504 and a request is made to the payment processor system 506 to authorize the payment. At block 518, the payment processor system 506 receives a request from the merchant system 504. The request may be made over a proprietary communication channel or as a secure request over a public network (e.g., an HTTPS request over the Internet). The payment processor system 506 then makes a request to the machine learning system 508 for a score or probability for use in processing the transaction. Block 518 may additionally comprise retrieving auxiliary data for combining with the transaction data sent to the machine learning system 508 as part of the request. In other cases, the machine learning system 508 may have access to a data storage device that stores auxiliary data (e.g., similar to the configuration of Figures 2A and 2B) and therefore may retrieve this data as part of its internal operations (e.g., based on an identifier provided in the transaction data and / or as defined as part of the machine learning model being implemented).
[0048] Block 520 illustrates a model initialization operation that occurs prior to any request from the payment processor system 506. For example, the model initialization operation may comprise loading a defined machine learning model and parameters that instantiate the defined machine learning model. In block 522, the machine learning system 508 receives a request from the payment processor system 506 (e.g., via a data input interface such as 412 in FIG. 4). In block 522, the machine learning system 508 may perform any pre-processing defined prior to application of the machine learning model initialized in block 520. For example, if the transaction data still holds character data, such as a merchant identified by a string or character transaction description, this may be converted to suitable structured numeric data (e.g., by converting string categorical data to an identifier via a lookup operation or other mapping and / or by mapping characters or groups of characters to vector embeddings). Then, in block 524, the machine learning system 506 applies the instantiated machine learning model by feeding the input data derived from the received request to the model. This may comprise applying the machine learning model platform 414 as described with reference to FIG. 4. At block 526, a scalar output is generated by the instantiated machine learning model, which may be processed in the machine learning system 508 to determine a binary decision of "approve" or "reject", or, if preferred, returned to the payment processor system 506 as a response to the request made at block 518.
[0049] In block 528, the output of the machine learning system 508 is received by the payment processor system 506 and used to approve or reject the transaction. FIG. 5A illustrates a process in which a transaction is approved based on the output of the machine learning system 508, and FIG. 5B illustrates a process in which a transaction is rejected based on the output of the machine learning system 508. In FIG. 5A, the transaction is approved in block 528. Then, in block 530, a request is made to the issuing bank system 510. In block 534, the issuing bank system 510 approves or rejects the request. For example, if the end user or cardholder has sufficient funds and approvals to cover the transaction costs, the issuing bank system 510 may approve the request. In some cases, the issuing bank system 510 may apply a second level of security, although this may not be required if the issuing bank relies on anomaly detection performed by the payment processor using the machine learning system 508. In block 536, authorization from the issuing bank system 510 is returned to the payment processor system 506, which sends a response in block 538 to the retailer system 504, which then responds to the POS or user device 502 in block 540. If the issuing bank system 510 approves the transaction in block 534, the transaction may be completed and a positive response may be returned to the POS or user device 502 via the retailer system 504. The end user may encounter this as an "Authorized" message on the screen of the POS or user device 502. The retailer system 504 may then complete the purchase (e.g., initiate internal processing to fulfill the purchase).
[0050] At a later point in time, one or more of the merchant system 504 and the machine learning system 508 may save data relating to the transaction, for example, as part of the transaction data 146, 240, or 300 in the previous examples. This is indicated in dashed blocks 542 and 544. The transaction data may be saved along with one or more of the output of the machine learning system 508 (e.g., a scalar fraud probability or anomaly probability) and the final outcome of the transaction (e.g., whether it was approved or rejected). The saved data may be stored for use as training data for the machine learning model implemented by the machine learning system 508. The saved data may also be accessed as part of a future iteration of block 524, for example, and may form part of future auxiliary data. In some cases, the final outcome or outcome of the transaction may not be known at the time of the transaction. For example, the transaction may only be labeled as anomalous via later review by analysts and / or automated systems, or based on feedback from the user (e.g., when the user reports fraudulent activity or indicates that a payment card or account has been compromised since some date). In these cases, ground truth labels for purposes of training the machine learning system 508 may be collected over time following the transaction itself.
[0051] Referring now to the alternative process flow of FIG. 5B, in this case, one or more of the machine learning system 508 and the payment processor system 506 reject the transaction based on the output of the machine learning system 508. For example, if the scalar output of the machine learning system 508 exceeds a retrieved threshold, the transaction may be rejected. At block 552, the payment processor system 506 issues a response to the merchant system 504, which is received at block 554. At block 554, the merchant system 504 undertakes steps to prevent the transaction from completing and returns an appropriate response to the POS or user device 502. This response is received at block 556, and the end user or customer may be informed that their payment has been rejected, for example, via an on-screen "rejected" message. The end user or customer may be prompted to use a different payment method. Although not illustrated in FIG. 5B, in some cases, the issuing bank system 510 may be informed that a transaction relating to a particular account holder has been rejected. The issuing bank system 510 may be informed as part of the process shown in Figure 5B, or may be informed as part of a periodic (e.g., daily) update. However, the transaction may not become part of the transaction data 146, 240, or 300 (because it was not approved) and may still be logged by at least the machine learning system 508, as indicated by block 544. For example, as in Figure 5A, the transaction data may be saved along with the output of the machine learning system 508 (e.g., a scalar fraud probability or anomaly probability) and the final outcome of the transaction (e.g., that it was rejected).
[0052] Example Data Store Structure As explained above, the exemplary machine learning system described herein stores and retrieves data in one or more data stores in one or more data storage devices. The next described examples relate to how such data stores are created, maintained, and used, as well as the structure and contents of such data stores. Such examples address or at least improve certain database-related problems in the context of machine learning systems, and particularly machine learning systems that facilitate real-time transaction processing. More particularly, the next described examples relate to a "hierarchical state" data store configuration in which multiple different "tiers" of state data (also referred to herein as "data") are stored in the data store. Each tier comprises one or more state datasets (also referred to herein as "datasets" or "state") that store state data. Such a hierarchical state configuration may be used in a variety of different types of state implementations, i.e., implementations in which state is to be stored and retrieved, for example, for use by the exemplary machine learning system described herein. In the examples, the data stored in the data store comprises historical transaction data and / or auxiliary data as explained above. However, the techniques described herein may be applied to other types of data.
[0053] A hierarchical state allows a "valid state" to be dynamically constructed using state data from several different state data sources, such as different state datasets, without the need to modify each individual state data one by one. In effect, a hierarchical state fuses state data from multiple different state datasets, rather than requiring that the state data be in a single state dataset. This may be particularly useful, without limitation, when there is a large amount of state data in different datasets, and when combining separate datasets into a single dataset in a single procedure would involve a significant amount of resources, such as time. Such datasets may be separate for various reasons, such as to provide a data maturation environment, to allow different machine learning models to be tested, etc. However, the state data in those separate datasets may nevertheless be relevant, and the exemplary machine learning systems described herein may benefit from using state data from separate datasets, rather than being constrained to using a single dataset, for example, in terms of providing more accurate results. Some exemplary implementations described herein may be used for database-based state types. Other exemplary implementations are described for data queues in which the stored data is ordered in time, rather than being random-access as in a database. One such exemplary implementation is on Apache Kafka (sometimes referred to herein simply as "Kafka"), although such an exemplary implementation may take other forms.
[0054] Hierarchical states, as described herein, use various concepts including parent and overlay, which are described next. Broadly speaking, a parent dataset of a child dataset is a dataset to which the child dataset is linked through parent metadata that is created before the child dataset is created. Broadly speaking, an overlay dataset of a given dataset is a dataset to which the given dataset is linked through overlay metadata that is applied to the given dataset after the overlay dataset and the given dataset are created.
[0055] FIG. 6A illustrates a state graph (sometimes referred to herein simply as a "graph") 600 representing an exemplary data store. The exemplary data store comprises a first dataset 611 that stores state data. The first dataset 611 is identified using identification data in the form of a state ID "state1". Although the exemplary data store represented in the graph 600 contains only one dataset, as will become apparent below, the state ID is used in the exemplary state implementation to extract different sets of states within the same collection, i.e., different datasets within the same data store. In this example, "state1" is the "current" state ID, sometimes referred to as the "root" or "live" state ID. When writing into a data store, all data is written into the specified live dataset. In this example, the first dataset 611 is the root dataset of the data store, as indicated by item 620. In this example, all data is read from the first dataset 611, as the first dataset 611 is the only dataset in the exemplary data store.
[0056] 6B shows another state graph 602 representing another exemplary data store. The data store represented by graph 602 may correspond to the data store represented by graph 600, but at a later time. The exemplary graph 602 demonstrates a parent state. In this example, the data store comprises a first dataset 611 and a second dataset 612, where the first dataset 611 is a parent dataset (or simply "parent") of the second dataset 612, and the second dataset 612 is a child dataset (or simply "child") of the first dataset 611. Thus, the parent dataset 611 and the child dataset 612 have a hierarchical relationship in the state graph 602, as shown at 630. In this example, the parent dataset 611 and the child dataset 612 are identified using identification data in the form of state IDs "state1" and "state2", respectively. As previously described, new data is written into the root (child) dataset 612, which has state ID "state2". No new data is written into the parent dataset 611 with state ID "state1", but (historical) data may be read from the parent dataset 611. In the example, the new dataset with the new state ID starts out as an empty dataset. In this specific example, the child dataset 612 would have been assigned a new state ID ("state2") and would have been initially empty upon its creation. Thus, the new dataset with the new state ID becomes filled with (modified) data as new data becomes written into the new dataset. The parent link, indicated by item 630, comes into play upon reading data from the data store. When performing a read operation, if the data item being searched for (sometimes called a "key") is not found in the current dataset, the data item is searched for in the parent dataset. In the example, the parent link is via parent metadata stored in the data store. However, in this example, the metadata is stored in the data store, and the metadata is not necessarily stored in the same data store as the state data.The metadata may be stored in a different type of data store than the state data is stored in. For example, the state data may be stored in a database and the metadata may be stored in files, Apache Kafka queues, etc. Alternatively, the metadata and state data may be stored in the same type of data store as each other.
[0057] 6C shows another state graph 604 representing another exemplary data store. The data store represented by graph 604 may correspond to the data store represented by graph 602, but at a later time. The exemplary graph 604 demonstrates a multi-parent state. In this example, the data store comprises a first dataset 611, a second dataset 612 that is a child of the first dataset 611, and a third dataset 613 that is a child of the second dataset 612 (and thus a grandchild of the first dataset 611). Thus, the first dataset 611, the second dataset 612, and the third dataset 613 are referred to as the grandparent dataset 611, the parent dataset 612, and the child dataset 613, respectively. In this example, the grandparent dataset 611, the parent dataset 612, and the child dataset 613 are identified using identification data in the form of state IDs "state1", "state2", and "state3", respectively. In this example, the child dataset 613 is the root of the data store, as indicated by item 620. Parent links 630, 631 exist between the grandparent dataset 611 and the parent dataset 612, and between the parent dataset 612 and the child dataset 613, respectively. A first parent metadata may define the link between the grandparent dataset 611 and the parent dataset 612, and a second parent metadata may define the link between the parent dataset 612 and the child dataset 613. This is in contrast to metadata that would only define the link between the grandparent dataset 611 and the child dataset 613, and would not perform a search of the datasets as inclusive, as described below. When performing a read operation, if the data item being searched for is not found in the current dataset (in this example, the child dataset 613), then the parent dataset 612 is searched for the data item, up the state graph, up to the grandparent dataset 611, and so on. Effectively, this means that each dataset is a copy-on-write state snapshot at the point away from the root where the new dataset is branched off.A parent dataset is no longer modified once a child dataset is created from it, i.e., a parent dataset becomes immutable once a child dataset is created from it.
[0058] 6D shows another state graph 606 representing another exemplary data store. The exemplary graph 606 demonstrates a multi-root state. In this example, the data store comprises a first dataset 611, a second dataset 612 that is a child of the first dataset 611, a third dataset 613 that is a child of the second dataset 612 (and thus a grandchild of the first dataset 611), and a fourth dataset 614 that is also a child of the second dataset 612 (and thus a grandchild of the first dataset 611). Thus, the first dataset 611, the second dataset 612, the third dataset 613, and the fourth dataset 614 are referred to as the grandparent dataset 611, the parent dataset 612, the first child dataset 613, and the second child dataset 614, respectively. In this example, the grandparent dataset 611, the parent dataset 612, the first child dataset 613, and the second child dataset 614 are identified using identification data in the form of state IDs "state1", "state2", "state3", and "state4", respectively. In this example, both child datasets 613, 614 are root datasets of the data store, as indicated by items 620, 621. Thus, new data may be written to one or both of the child datasets 613, 614. In particular, the state ID "state3" may be used to write data to the first child dataset 613, and the state ID "state4" may be used to write data to the second child dataset 614. Similarly, read access to the data store using state ID "state3" will begin first in the first child dataset 613, while read access to the data store using state ID "state4" will begin first in the second child dataset 614. Different clients may have and use different state IDs, for example, for data security purposes.Parent links 630, 631, 632 exist respectively between the grandparent dataset 611 and the parent dataset 612, between the parent dataset 612 and the first child dataset 613, and between the parent dataset 612 and the second child dataset 614. As can be seen in this multi-root example, multiple child state IDs, i.e., "state3" and "state4," can point to a single parent state ID, i.e., "state2."
[0059] 6E shows another state graph 608 representing another exemplary data store. The exemplary graph 608 corresponds to the exemplary graph 606 shown in FIG. 6D, but with exemplary state data values shown to demonstrate state divergence. In this example, the parent dataset 612 stores data 640 comprising a single data element having an exemplary value of "10" stored for a given data item (not shown in FIG. 6E), the first child dataset 613 stores data 641 comprising a single data element having an exemplary value of "15" stored for the same given data item, and the second child dataset 614 stores data 642 comprising a single data element having an exemplary value of "13" again stored for the same given data item. The two child datasets 613, 614 both start out equal since both are empty at creation and both share the same parent dataset 612. However, they then slowly diverge over time as different data 641, 642 is written into each root 620, 621 and therefore into each child dataset 613, 614.
[0060] When a data store is searched according to the example, the search is looking for data items, and data associated with the data items is returned. For example, depending on the implementation details, the data items can take a variety of forms. However, in one possible form, the data item is a tuple based on bankID (which identifies a particular bank), entityType (which indicates a particular type of entity), and entityId (which identifies a particular entity).
[0061] 7 shows another state graph 700 representing another exemplary data store. The exemplary graph 700 demonstrates overlays and overlay states.
[0062] In this example, state graph 700 comprises a grandparent state 711 and a parent data set 712 that was created at timestamp "50" (as indicated by timestamp data 740) and data was stored in association with data item "E1" at timestamp "100" (as indicated by item 750). State graph 700 also comprises a first child data set 713 and a second child data set 714 that were created at timestamp "150" as indicated by timestamp data 741, 742, respectively. Data was stored in the first child data set 713 and the second child data set 714 in association with data item "E2" at timestamp "160" as indicated by items 751, 752, and data was stored in the first child data set 713 in association with data item "E3" at timestamp "210". Unlike in FIG. 6E, values of the stored data are not shown in FIG. 7. The values of data stored in each of the first child data set 713 and the second child data set 714 associated with data item "E2" at timestamp "160" may differ from one another. In this example, the second child data set 714 became an overlay of the first child data set 713 at timestamp "180", as indicated by item 760. As explained above, a data element represents all or a portion of a given piece of data stored in a data store, and in this respect the data may comprise one or more data elements. In this example, the overlay data element selection metadata indicates that the overlay data elements "m1" and "m2" from the second child data set 714 should be applied to the first child data set 713, as indicated by item 760. The overlay data elements "m1" and "m2" may relate to different machine learning models and may comprise different machine learning model data. The overlay data element selection metadata indicates the particular data elements that are to be used from the second child data set 714 as the overlay data set. The second child data set 714 can include data elements that are not applied via an overlay.For example, the second child data set 714 may include an additional data element "m3" that is not overlaid. This may be true even if the first child data set 713 also includes a corresponding "m3" data element. In an example, certain data elements from the overlay data set that improve the machine learning system operation may be selected for application, while other data elements that may not improve the machine learning system operation may be suppressed from being applied.
[0063] Thus, according to an example, an overlay dataset is used to update data in one dataset with data in another dataset without actually copying any data from the one dataset to the other dataset. This is accomplished, in an example, by modifying metadata for the overlay target dataset (the dataset to which the overlay dataset is applied) to indicate that data will potentially be read from the overlay dataset and not from the dataset to which the overlay dataset is applied. Data may be read in this manner between two given timestamps associated with the overlay datasets. The timestamps may include a lower timestamp corresponding to when the overlay dataset was created (before it was overlaid). The timestamps include a higher timestamp corresponding to when the overlay dataset was overlaid.
[0064] In this example, every piece of data of the hierarchical state type stores a timestamp. In the example, the timestamp is a strictly increasing integer that represents when the data was updated. However, the timestamp may take a variety of different forms while still indicating the order in which the updates were made. The timestamp may be a last modified timestamp that indicates when the data was last updated, although the timestamp may not necessarily indicate the most recent update in all examples.
[0065] When reading a state data item from a given dataset to which an overlay dataset has been applied, if the data read from the given dataset was (last) modified between the time the overlay dataset was created and the time the overlay dataset was applied to the given dataset (also called "promoted"), the overlaid data is read from the overlay dataset and applied on top of the data read from the given dataset. As explained above, the overlaid data may be limited to certain overlay data elements, for example, depending on the state type.
[0066] An exemplary sequence of operations for generating the exemplary state graph 700 is described next. Initially, a first dataset 711 with state ID "state1" is created empty and with no parent. At timestamp "50", a second dataset 712 with state ID "state2" is created as a child of the first dataset 711. The second dataset 712 is empty at its creation, and the first dataset 711 becomes immutable at the creation of the second dataset 712. At timestamp "100", the second dataset 712 is the root state, and at timestamp "100", a data item "E1" is written into the second dataset 712. A third dataset 713 and a fourth dataset 714 with state IDs "state3" and "state4", respectively, are created as children of the second dataset 712 at timestamp "150". The third data set 713 and the fourth data set 714 are empty at their creation, and the second data set 712 becomes immutable at the creation of the third data set 713 and the fourth data set 714. At timestamp "160", the third data set 713 and the fourth data set 714 are both root, and at timestamp "160", data item "E2" is written into the third data set 713 and the fourth data set 714. At timestamp "180", overlay data elements "m1" and "m2" are selected for overlay application onto the third data set 713, and the fourth data set 714 is overlaid onto the third data set 713. The fourth data set 714 becomes immutable when it becomes an overlay of the third data set 713. At timestamp "210", the third dataset 713 is the only root dataset (and therefore not immutable), and at timestamp "210", a data item "E3" is written into the third dataset 713.
[0067] An example data store represented by state graph 700 may store the following data: { stateId: state2, key: E1, data: {[m1(E1)2, m2(E1)2, m3(E1)2]}, timestamp: 100}, { stateId: state3, key: E2, data: {[m1(E2)3, m2(E2)3, m3(E2)3]}, timestamp: 160}, { stateId: state4, key: E2, data: {[m1(E2)4, m2(E2)4, m3(E2)4]}, timestamp: 160}, and { stateId: state3, key: E3, data: {[m1(E3)3, m2(E3)3, m3(E3)3]}, timestamp: 210}.
[0068] In such exemplary data, "mi(Ej) k " indicates a data element in the kth dataset that has another value related to the ith machine learning model, stored in association with the key Ej.
[0069] An example data store represented by state graph 700 may store the following metadata: { stateId: state1, startTime: 0, endTime: 50}, { stateId: state2, startTime: 50, endTime: 150, parent: state1}, { stateId: state3, startTime: 150, parent: state2, overlay: { state4, [m1, m2], (150, 180)}}, and { stateId: state4, startTime: 150, endTime: 180, parent: state2}.
[0070] In this example, the third dataset 713 is a child of the second dataset 712, but does not itself comprise the data item "E1" of the second dataset 712. Also, even though the fourth dataset 714 is an overlay of the third dataset 713, the data associated with data item "E2" in the fourth dataset 714 has not actually been copied into the third dataset 713. Instead, metadata links the second dataset 712, the third dataset 713, and the fourth dataset 714, so that, as described below, data may be read from a mixture of these datasets without the data being copied from one such dataset to another.
[0071] Thus, metadata is separate from and provides information about the data stored in the data store. In examples, metadata provides information at a dataset level, rather than at a data level or data element level. In examples, metadata is modifiable independently from other data. Small changes to metadata, which can be quick to make, can result in significant changes to the effective data that can be read from the data store without significant amounts of data having to be copied.
[0072] In this example, the first dataset 711 was the root between timestamps "0" and "50", the second dataset 712 was the root between timestamps "50" and "150", and the fourth dataset 714 was the root between timestamps "150" and "180". The third dataset 713 was the root at timestamp "150" and is the current root.
[0073] Exemplary (simplified) read logic for reading from state graph 700 is described next. Exemplary write logic is also described below. Although read and write operations are sometimes described together herein, a read does not necessarily imply that a write occurs immediately. The same data item may be read multiple times before a write is performed into the root data set.
[0074] The current dataset, i.e., the third dataset 713, is searched (also referred to as "queried") to read the "E1" data item. "E1" is not found in the third dataset 713. The second dataset 712 is identified via the parent metadata and queried as the parent dataset of the third dataset 713, and "E1" is found with a modification timestamp of "100". At this point, overlay is not applicable, so the data associated with "E1" is returned. Referring to the above example, the data returned would be [m1(E1)2, m2(E1)2, m3(E1)2]. The data returned may be written directly to the root dataset, i.e., the third dataset 713, in association with the data item "E1". When written back into the third dataset 713, the data item "E1" has a timestamp greater than "180". Subsequent read requests to "E1" will retrieve the returned data from the third data set 713 rather than retrieving the data from the second data set 712 again.
[0075] To read the "E2" data item, the current dataset, i.e., the third dataset 713, is searched and "E2" is found with a modification timestamp of "160". The modification timestamp of "160" read from the third dataset 713 is within the active overlay period for the fourth dataset 714, i.e., from "150" to "180". Thus, the fourth dataset 714 is identified via the overlay metadata and data elements "m1(E2)4" and "m2(E2)4" are read from the fourth dataset 714. In this example, data element "m3(E2)4" is not read from the fourth dataset 714 in view of the overlay data element selection metadata. In this example, "m1(E2)4" and "m2(E2)4" as read from the fourth data set 714 replace the data elements "m1(E2)3" and "m2(E2)3" as read from the third data set 713, but the data element "m3(E2)3" as read from the third data set 713 is not replaced by data from the fourth data set 714. The data associated with "E2" as modified, i.e., [m1(E2)4, m2(E2)4, m3(E2)3], is returned. The "E2" data read from the fourth data set 714, i.e., "m1(E2)4" and "m2(E2)4", or such data modified, i.e., "m1(E2) 4_mod " and "m2(E2) 4_mod" is then written back directly to the root dataset, i.e., the third dataset 713, together with "m3(E2)3" and with a modification timestamp greater than the overlay application timestamp of "180". The data read from the third dataset 713 and / or the fourth dataset 714 may be modified by the machine learning system before being written back to the root dataset. In general, the write is performed after the data read from the data store is modified by the machine learning system. Thus, the data written to the root dataset may be the data as read, or a modified version of the data as read. When an overlay dataset is applied to another dataset, no new state IDs are created, whether applied for the overlaid dataset or the dataset to which the overlay dataset is applied. Only the metadata of the existing root dataset is modified to redirect reads to the overlay dataset, if applicable. From that point on, the overlay dataset effectively becomes an immutable part of the root dataset's content.
[0076] To read the "E3" data item, the current dataset, i.e., the third dataset 713, is searched and "E3" is found with a modification timestamp of "210". Since "E3" was written into the third dataset 713 (at timestamp "210") after the fourth dataset 714 was overlaid on the third dataset 713 (at timestamp "180"), no overlay is applicable at this point. Therefore, "E3" in the third dataset 713 would already include any changes made to "E3" in the fourth dataset 714, if they were to exist. The data associated with "E3", i.e., [m1(E3)3, m2(E3)3, m3(E3)3], is returned from the third dataset 713 without modification.
[0077] Overlays can also be applied over changes to child states: state reads take into account all applicable overlays and reconstruct the effective state accordingly.
[0078] When searching for (also called "reading") a data item, overlays that were added after the data item was last processed may still be checked against the data item. This will be the case if the overlay end time is greater than the data item's (last) modified timestamp, even if the overlay start time is after the data item's (last) modified timestamp. Because, for example, if an overlay has changed the way a data item is resolved, the data item may be in an overlay but not in any of the main parent datasets. Thereby, even if a data item's (last) modified timestamp is outside the overlay's time range, that information can still be included when returning the data item.
[0079] More specifically, consider a state store comprising a first dataset, a second dataset that is a root dataset, created as a child of the first dataset at timestamp "150", and a third dataset that was also created as a child of the first dataset at timestamp "150", but became an overlay of the second dataset at timestamp "180". Consider also that the first dataset includes an "E1" data item with a data element "m1" having a value "15", that the third dataset includes an "E1" data item with a data element "m1" having a value "20", and that the overlay data element selection metadata indicates that data elements "m1" and "m2" should be applied to the second dataset. In this example, "E1" was written into the first dataset several times before timestamp "150", and then "E1" was written into the third dataset only between timestamps "150" and "180", i.e. "E1" was not written into the second dataset either. If the read logic finds, for example, "E1" with timestamp "75" in the first dataset, it will also look for the third dataset (added as an overlay at timestamp "180") and apply that overlay to the data read from the first dataset. This also applies when a data item only exists in an overlay, for example, when "E1" was never written to the first dataset. When such a data item is not found in any parent dataset of the root dataset, the data item has a valid read timestamp of "0" (or a possible different minimum timestamp value) when checking for overlays.
[0080] 8A and 8B show how data and metadata may be stored in a data store according to an example.
[0081] In this example, entity 800, sometimes referred to as a "record," represents exemplary information stored in a data store. In this example, entity 800 includes a stateId field 801 with a value "state1," indicating that the information represented in entity 800 is associated with a data set that is assigned a state ID "state1." In this example, entity 800 also includes a data item field 802 with a value "E1," indicating that entity 800 stores data related to data item "E1." In this example, entity 800 also includes a data field 803 with data elements [m1, m2, m3]. In this example, "m1," "m2," and "m3" each comprise one or more respective values associated with a respective machine learning model. In this example, entity 800 also includes a timestamp field 804 with a value "100," indicating that "E1" was updated at timestamp "100."
[0082] In this example, entity 810 represents exemplary metadata. In this example, entity 810 includes a stateId field 811 with a value "state3", indicating that the metadata represented in entity 810 is associated with a dataset that is assigned a state ID "state3". In this example, entity 810 also includes a startTime field 812 with a value "150", indicating that the dataset with state ID "state3" was created at timestamp "150". In this example, entity 810 also includes a parent field 813 with a value "state2", indicating that the dataset with state ID "state2" is the parent of the dataset with state ID "state3". In this example, entity 810 also includes an overlay field 814 with values "state4, [m1, m2], (150, 180)" indicating that (i) the dataset with state ID "state4" is an overlay of the dataset with state ID "state3", (ii) only data elements "m1" and "m2" from the overlay dataset (with state ID "state4") should be applied, and (iii) the overlay dataset (with state ID "state4") has upper and lower timestamps of "150" and "180", respectively, with an upper timestamp of "180" indicating when the overlay dataset (with state ID "state4") became an overlay of the dataset with state ID "state3". Although not shown in FIG. 8B, entity 810 may include, for example, an endTime field indicating when the given dataset became immutable and / or one or more additional overlay fields associated with one or more additional overlays of the given dataset.
[0083] FIG. 9 illustrates another state graph 900 representing another exemplary dataset. The exemplary graph 900 demonstrates non-associated states. In this example, the data store comprises a great-grandparent dataset 911, a grandparent dataset 912, a parent dataset 913, a parent overlay dataset 914, a child dataset 915, and a child overlay dataset 916. In this example, the datasets 911-916 are identified using identification data in the form of state IDs "state1"-"state6", respectively. In this example, the parent overlay dataset 914 is a child of the grandparent dataset 912 and is also an overlay of the parent dataset 913. In this example, the child overlay dataset 916 is an overlay of the child dataset 915 but is not a child of the parent dataset 913. In particular, in this example, the parent dataset 913 itself has an overlay dataset in the form of the parent overlay dataset 914. In the configuration illustrated in FIG. 9, both the parent dataset 913 and the parent overlay dataset 914 are still immutable.
[0084] Although overlays often share a parent dataset with the overlay target dataset (the dataset to which the overlay is applied), that is not necessarily the case. Non-associated datasets may be overlaid. In such instances, the overlay may use an overlay start time of "0". This feature may be used, for example, to insert mature new model data into an existing system without having to copy all the data from the mature new model into the existing system. In the example graph 900, the child overlay dataset 916 corresponds to an (initially) non-associated state.
[0085] Thus, the relevance of parent state relationships to the definition of a state can be seen: State relationship metadata for a state ID cannot be changed without significantly changing the data accessible in that state, since the valid data associated with that state is the result of a mixture of states from parent datasets and overlays.
[0086] 10 illustrates another state graph 1000 representing another exemplary dataset. The exemplary dataset represented by state graph 1000 is similar to the exemplary dataset represented by state graph 900. However, instead of being an overlay of the third dataset 1013, the fourth dataset 1014 is an overlay of the fifth dataset 1015. Thus, in this example, the fifth dataset 1015 has two overlays, namely the fourth dataset 1014 and the sixth dataset 1016. Additionally, in this example, the sixth dataset 1016 is a child of the third dataset 1013. As a specific example, consider (i) a fourth dataset 1014 comprising a data item "E1" having data elements "m14" and "m24", the fourth dataset 1014 becoming an overlay of a fifth dataset 1015 at a timestamp of "50", (ii) a sixth dataset 1016 also comprising a data item "E1" having data elements "m16" and "m26", the sixth dataset 1016 becoming an overlay of the fifth dataset 1015 at a later timestamp of "100", and (iii) the fifth dataset 1015 also comprising a data item "E1" having data elements "m15" and "m25" with a modified timestamp of "75".Further assuming that all overlay data elements are to be read from the fourth data set 1014 and the sixth data set 1016, the read logic will (i) first find data item “E1” in the fifth data set 1015 with a modified timestamp of “75”, and (ii) identify the fourth data set 1014 as an overlay of the fifth data set 1015 based on the overlay metadata, but will not find the data item “E1” in the fourth data set 1014 because the overlay timestamp of “50” for the fourth data set 1014 is earlier than the modified timestamp of “75”. (iii) would identify the sixth dataset 1016 as an overlay of the fifth dataset 1015 based on the overlay metadata and would search for data item "E1" in the sixth dataset 1016 because the overlay timestamp of "100" for the sixth dataset 1016 is later than the corrected timestamp of "75", and (iv) would return data elements "m16" and "m26" from the sixth dataset 1016 for data item "E1" instead of returning data elements "m15" and "m25" from the fifth dataset 1015. 6_mod " and "m2 6_mod ", i.e., "m16" and "m26" as modified, will be written in the fifth dataset 1015 in association with data item "E1". As explained above, such a write does not have to occur immediately after such a read.
[0087] In terms of execution, each read into the separate datasets and overlays is a separate read operation to the data store. The parent logic and overlay logic can be relatively complex and difficult to execute as a single query on the data store. Thus, depending on how many datasets are involved, several read operations may be executed before a given piece of data is returned. However, all writes are made into the root dataset. Thus, the next time data is read, the data is read directly from the root dataset as a single read. However, when a new dataset is created (as an empty dataset), all reads are from the parent with at least two read operations. In some implementations, the new dataset may become populated relatively quickly with the most frequently modified data. Additionally, the number of read operations may decrease over time and tend to be biased towards previous operation rates. Nonetheless, determining that a particular data item is not present in the effective dataset (the mixture of applicable datasets in the graph) involves reading from all relevant datasets until the earliest dataset has been read. This increases read operations whenever a new dataset is created from the current root. To mitigate this, a cleanup operation can be configured to perform consolidating old datasets together to reduce the number of datasets in the hierarchy. This can put an upper limit on the number of read operations required. The cleanup operation may be performed periodically or otherwise.
[0088] 11 shows another state graph 1100 representing an exemplary data store. The exemplary graph 1100 demonstrates eligible states.
[0089] The hierarchical state cleanup operation addresses both the potential performance degradation and data store size caused by an ever-growing number of hierarchical states. As shown, performance potentially degrades as more state layers are created and linked together. Finding a data item can take an increasing amount of time because an increasing number of parent datasets may need to be searched. This is especially true if the data item does not exist in any of the dataset layers, since this forces the lookup to go through the entire dataset history. The number of queries grows linearly with the number of datasets. This problem grows as datasets are promoted, creating more and more overlays. When a data item is not found in the main branch of the state tree, it may still be found in an overlay, so overlays are also checked.
[0090] To manage such potential performance degradation, older datasets may be cleaned up as part of a hierarchical state cleanup operation to reduce the number of queries to be executed when looking for a particular data item. This operation also saves space in the data store. In an example, non-hierarchical datasets are not cleaned up. This does not significantly affect performance when the non-hierarchical datasets are small. With respect to the hierarchical state cleanup operation procedure, dataset tiers eligible for cleanup are collapsed into a single dataset tier, referred to herein as the "target state," thus preventing extra reads. The target state is the lowest common ancestor of the dataset tiers pointed to by the root with parents that are locked (in other words, immutable) before a configurable cutoff. The datasets eligible for cleanup are (i) exact ancestors of the target dataset, (ii) overlays of exact ancestors of the target dataset, and (iii) overlays of the target dataset.
[0091] In the example graph 1100, the second dataset 1112 is the lowest common ancestor of the datasets pointed to by the root dataset (fourth dataset 1114 and fifth dataset 1115) with the parent (dataset 1111) locked before the cutoff 1170. Therefore, dataset 1112 is in the target state. It is not necessarily eligible for cleanup itself. Datasets 1113, 1114, and 1115 are descendants of the target dataset, i.e., dataset 1112. Therefore, they are also not eligible for cleanup. Dataset 1111 is a strict ancestor of the target dataset, i.e., dataset 1112. Therefore, dataset 1111 is eligible for cleanup.
[0092] In this example, the cleanup procedure begins with identifying a target dataset. Datasets eligible for cleanup are identified. All of the relevant data from the datasets eligible for cleanup are merged into the target dataset. Overlays are applied when relevant, so that no data is lost. Parent references of the target dataset are removed, making the target dataset the new furthest ancestor of the dataset pointed to by the root. Any overlays applied on the target dataset are also removed. Datasets eligible for cleanup are removed entirely.
[0093] 12A shows another state graph 1200 representing another exemplary data store. The exemplary graph 1200 demonstrates hierarchical state cleanup. The exemplary graph 1200 represents the data store before cleanup is performed.
[0094] In this example, the data store comprises a great-grandparent dataset 1211, a grandparent dataset 1212, a parent dataset 1213, and a child dataset 1214. In this example with four successive state tiers, datasets 1211 and 1212 are eligible datasets for cleanup. Dataset 1213 is the target dataset. Data from datasets 1211, 1212, and 1213 are merged and written to dataset 1213. The order in which the various steps are performed results in data consistency throughout the cleanup procedure. To merge data into the target dataset, valid data in the target is determined by reading data from the target dataset as a "virtual root". For each data item present in the datasets eligible for cleanup and in the target dataset, the data item is read from the virtual root by the hierarchy state reading logic described above. The resulting data is then written to the target dataset. The target dataset is not necessarily locked. In such a case, the target dataset is also the live root dataset. In this special case, the data it contains is still subject to modification. In such instances, the cleanup operation is replaced by a parallel write, which ensures that the most up-to-date data is written to the target live root dataset. In such cases, the merge step for that particular data item is pasted and aborted. Because the write is atomic, there is no risk of getting corrupted data that would result from mixing cleanup and data written by an external source. In general, if the data item to be moved already exists in the target dataset with a modified timestamp that is greater than the timestamp of the data item to be moved, the data item in the target dataset is not overwritten. This would still happen if the target dataset is locked.More specifically, the write is performed atomically, provided that the data item does not already exist in the target dataset or the modified timestamp of the data item already in the target is less than or equal to the modified timestamp of the data being written to the target dataset. The cut-off line is indicated by dashed line 1270.
[0095] In the example, the timestamp written back to the consolidated data item is the maximum timestamp of all the data items that were merged into the consolidated data item, even if the latest data item in the example is from an overlay data set that only has a subset of the final data in the consolidated data item.
[0096] Figure 12B illustrates another state graph 1202 representing another exemplary data store. The exemplary graph 1202 illustrated in Figure 12B corresponds to the exemplary graph 1200 illustrated in Figure 12A after a cleanup operation has been performed.
[0097] 13A shows another state graph 1300 representing another exemplary data store. The exemplary graph 1300 uses a concrete example to demonstrate hierarchical state cleanup.
[0098] An exemplary sequence of operations for generating state graph 1300 before cleanup is as follows: Dataset 1311 is created, empty and with no parent state. At timestamp "30", data item "E1" is written into dataset 1311. At timestamp "40", data item "E2" is written into dataset 1311. At timestamp "50", datasets 1312 and 1313 are created as children of dataset 1311 (empty), and dataset 1311 is made immutable at timestamp "50". At timestamp "60", data item "E3" is written into datasets 1312 and 1313. At timestamp "65", data item "E4" is written into dataset 1312. Overlay data elements "m1" and "m2" are selected to overlay dataset 1312 onto dataset 1313 at timestamp "70". The now overlaid dataset 1312 is made immutable at timestamp "70". At timestamp "80" data item "E2" is written into dataset 1313. At timestamp "100" dataset 1314 is created (empty) as a child of dataset 1313. At timestamp "100" dataset 1313 becomes immutable.
[0099] In this example, the target dataset is dataset 1313, and the datasets eligible for cleanup are datasets 1311 and 1312. For each data item present in datasets 1311, 1312, and 1313, valid data is read from a virtual root that points to dataset 1313 and then written to dataset 1313. Overlay dataset 1312 is valid for data saved at timestamps up to "70".
[0100] The simplified cleanup logic is as follows: For merging "E1", "E1" is not found in dataset 1313. "E1" is found in dataset 1311 as no data is found in the applicable overlay dataset 1312. "E1" as found in dataset 1311 is copied into dataset 1313. For merging "E2", "E2" is found in dataset 1313. "E2" as found in dataset 1313 is not modified as it is already in dataset 1313 without an applicable overlay. For merging "E3", "E3" is found in dataset 1313. However, the data found in dataset 1313 is updated with data related to overlay data elements "m1" and "m2" found in the applicable overlay dataset 1312. Valid data is written to dataset 1313. For merging "E4", "E4" is not found in dataset 1313. "E4" is not found in dataset 1311. "E4" is found in dataset 1312. The valid data only contains data related to "m1" and "m2". The valid data is written to dataset 1313. Once the data items have been merged into dataset 1313, datasets 1311 and 1312 are deleted.
[0101] Figure 13B illustrates another state graph 1302 representing another exemplary data store. The exemplary graph 1302 illustrated in Figure 13B corresponds to the exemplary graph 1300 illustrated in Figure 13A after a cleanup operation has been performed. In effect, the "E1" data in dataset 1311 has been moved in its entirety to dataset 1313. The "E2" data in dataset 1313 is unmodified. The "E3" data in dataset 1313 has been updated with data found in dataset 1312 relating to "m1" and "m2". The "E4" data in dataset 1312 relating to "m1" and "m2" has been moved to dataset 1313.
[0102] The frequency with which the hierarchical state cleanup operation runs may be set, for example, by an operator. The length of the history of state snapshots to keep before cleaning them up may also be set, for example, by an operator.
[0103] While the data is being merged, which may be a relatively long time (e.g., several hours), additional changes may still be made to the data store, so long as any modifications are made after the cutoff for the active cleanup operation. In the example, the hierarchical state cleanup operation always preempts the concurrent writes, since the concurrent writes will necessarily be providing the most up-to-date data.
[0104] In some examples, the source of the timestamp described herein may be reset. Examples provide a timestamp era technique in this regard where the timestamp comprises multiple parts. One of the parts may be incremented while the other part remains constant. In response to a trigger, e.g., the timestamp source resetting, the part that was constant may be incremented and the part that was being incremented may be reset. For example, a multi-part timestamp may initially increment as (0,0), (0,1), (0,2), and (0,3), and in response to a trigger, may increment as (1,0), (1,1), (1,2), etc. In response to a further trigger, the timestamp may increment as (2,0), (2,1), (2,2), etc.
[0105] As described above, the data storage and / or data store may be partitioned into different partitions, e.g., for security reasons. Different partitions may be identified based on different partitionIds. The timestamp may be partition-based in that it increments at a partition level rather than at an overall system level. In an example, an entity or data item deterministically hashes to a particular partition for which the timestamp is strictly incrementing for that entity or data item.
[0106] With respect to data deletion, data may be deleted from the hierarchical state. If the data only exists in the current root, the data may simply be removed from the data store. However, if the data exists in the parent and / or overlay states, the data cannot be directly removed because all states other than the root are immutable. Instead, a marker is inserted into the current root state indicating the data to be considered deleted and when such deletion occurred. Subsequent reads then stop reading at that point when they encounter the deletion marker and do not return the data. However, the old data to be considered deleted still exists in the parent and / or overlay states. Thus, when a new root is created from the snapshot state, the data to be considered deleted still exists in the snapshot state. The deletion marker additionally serves as an indicator to not insert another marker in a future root if the data item in question is deleted again, provided it is up-to-date. In an example, a deletion marker is not inserted only if the data item in question exists only in an overlay to a non-promoted data element, e.g., a model. An overlay can effectively undo a deletion made with respect to another dataset by overlaying data (from the overlay) over data that had a deletion marker in the other dataset.
[0107] When a data item is cleaned up with a delete marker, the delete marker effectively causes the cleanup operation to ignore all state for that data item prior to that point. In a first example, consider a data store for a cleanup operation, including a target dataset, a parent dataset of the target dataset, and a grandparent dataset of the target dataset. Consider also that the parent dataset comprises a data item "E1" with a delete marker, and that the grandparent dataset also comprises a data item "E1" but with a data element "m1" having a value "30" (which may be shown as "E1: {m1: 30}"). After the cleanup, the target dataset will not have any data for "E1" at all in light of the delete marker, and the parent dataset and the grandparent dataset will be removed from the data store including any delete markers in them. In a second example, consider that the data store of the first example included an additional dataset between the parent dataset and the target dataset, and that the additional dataset also had a data item "E1" but with a data element "m1" having a value "10", which may be denoted as "E1: {m1: 10}". In the second example, the cleanup operation would be to place "E1: {m1: 10}" copied from the additional dataset into the target dataset, and then the additional dataset, the parent dataset, and the grandparent dataset would be removed from the data store.
[0108] It is also possible for an overlay to revert a delete marker. For example, consider a data store with a data item "E1" having a data element "m1" with value "15" and a data element "m2" with value "20" and a parent dataset with an updated timestamp of "75" (which may be denoted as "E1: {m1: 15, m2: 20}, timestamp 75"). Consider also that a first child dataset of the parent dataset was created at timestamp "150", is the root of the data store, and has a data item "E1" with a delete marker and an updated timestamp of "160" (which may be denoted as "E1: delete, timestamp 160"). Consider further that a second child dataset of the parent dataset was created at timestamp "150" and comprises a data element "m1" with value "20", a data element "m2" with value "25", and a data item "E1" with an updated timestamp of "170", which may be shown as "E1: {m1: 20, m2: 25}, timestamp 170". Additionally, consider that the second child dataset became an overlay of the first child dataset at timestamp "180", with overlay data element selection metadata indicating that only data element "m1" should be applied to the first child dataset. In such an example, the read logic finds a delete marker for "E1" in the first child dataset and responsively stops searching the ancestors of the first child dataset. The read logic then checks for overlays, identifies an overlay from the second child dataset covering "150" to "180", and reads "m1" from the second child dataset. Thus, the data returned is "E1: {m1: 20}". The same logic may be used in cleanup operations as described herein. Such logic would also be applied if the delete marker is in the second child dataset but not in the first child dataset, and would remove the overlaid data elements from the data items before returning them.If a deletion marker is in the first data set with "E1", and if a second child set is applied as an overlay with no data for "E1" for the applicable time period, the read logic will read whatever (if anything) is in "E1" in any ancestor of the first child data set, and the deletion for "E1" may effectively be undone. However, in other instances, the deletion marker will continue to be used.
[0109] 14 shows another example of a state graph 1400 representing a data store. The example graph 1400 demonstrates recursive overlay. In this example, a first dataset 1411 is a grandparent dataset. A second dataset 1412 and a third dataset 1413 are both child datasets of the grandparent dataset. A fourth dataset 1414 is a child of the second dataset 1412, and therefore the second dataset is the parent of the fourth dataset 1413. The third dataset 1413 has two child datasets, namely a fifth dataset 1415 and a sixth dataset 1416. The fifth dataset 1415 is an overlay of the fourth dataset 1414. The sixth dataset 1416 is an overlay of the fifth dataset 1415. In this example, the fifth dataset 1415 (i) is an overlay of the fourth dataset 1414, (ii) has the third dataset 1413 as a parent dataset, (iii) has the first dataset 1411 as a grandparent dataset, and (iv) has the sixth dataset 1416 as an overlay, even though the fifth dataset 1415 is itself an overlay. When the fifth dataset 1415 is searched for data items, the third dataset 1413, the first dataset 1411, and / or the sixth dataset 1416 may be searched in a similar manner as a search is performed with respect to the fourth dataset 1413.
[0110] 15 illustrates another example of a state graph 1500 representing a data store. The exemplary data store represented by state graph 1500 corresponds to the exemplary data store represented by state graph 1400, except that in the former, a sixth data set 1516 is an overlay of a fourth data set 1514 and not an overlay of a fifth data set 1515. Thus, the fourth data set 1514 has two overlays, namely, a fifth data set 1515 and a sixth data set 1516.
[0111] The example described above relates to a data store in the form of a database. An example is now described relating to a data queue. In the example, such a data queue stores feature vectors from a machine learning model. However, such a data queue may store other data to be output by the machine learning model.
[0112] As part of the processing of an event, the model may output data onto one or more model-specific data queues that can then be read. As part of defining the queue, the model also defines the minimum duration during which the data should be kept in the queue. In a live system, the data queue may be stored in a persistent message queue. In this specific example, the data queue is stored in Apache Kafka. However, in other examples the data may be stored in another manner. More specifically, there are other ways to implement the state layer, for example using message queues. In the case of Apache Kafka topics that store the data, the data retention period maps onto the queue retention period. Topics are created as needed by the controller when a model is uploaded into the engine. However, topics are not deleted when a model is deleted, because the model may be regenerated immediately afterwards and would expect the data to still be there. If a model is permanently deleted, all data in the topic will time out over time, leaving an empty topic in Apache Kafka that occupies minimal disk space. In terms of hierarchical queue state, data queues follow the state layering principle described above. This is accomplished on Apache Kafka by maintaining a separate topic for each active queue in each state, and stitching the queues together into one logical queue to read the complete contents. With specific reference to Apache Kafka, data cannot be deleted from Apache Kafka queues, and as such there are no data cleanup operations to be performed. Instead, queues are removed when they time out. Separate operations may be performed to remove any unused empty queues, and generally to remove any unused and unlinked state from the data store or metadata.
[0113] FIG. 16A illustrates an example queue 1600 in a single Apache Kafka topic, i.e., in a single state, represented as “queue1-state1: [ topic1: 0 ].”
[0114] Figure 16B shows an example queue 1602, where when a child state is created, a new topic is created for that state and the metadata for the queue as a whole is updated to link the queues together. The new message is placed at the end of the most recent topic, i.e., "queue1-state2: [topic1: 0, topic2: 23]". As part of the queue metadata, each topic has an "offset" that specifies the offset of the topic content within the overall queue. This offset is added to the offset of the message within each topic to get the message offset within the queue as a whole.
[0115] 16C illustrates another example queue 1604. Similar to hierarchical states, there can be multiple child topics based on the same parent topic, i.e., "queue1-state2: [ topic1: 0, topic2: 23 ]" and "queue1-state3: [ topic1: 0, topic3: 23 ]."
[0116] 16D shows another example queue 1606. When a state becomes overlaid, the root pointer changes to point directly to the overlaid topic and the obsolete topic is removed, i.e., "queue1-state2: [ topic1: 0, topic3: 23 ]."
[0117] Figure 16E shows another example queue 1608. There is a special case in all of these state operations when the current topic is empty, so that the "parent" link of the new topic points directly to the parent of the current topic, bypassing the empty topic entirely. For example, "queue1-state3: [topic1: 0, topic3: 23]". This will ensure that there are no topics in the middle of the queue that have no data in them.
[0118] Data in data queues has a different state implementation than other state types. Therefore, cleanup operations work differently for this state type. With data retention guarantees, the engine provides the model queues and the way the data is stored (Apache Kafka, not a database), and state is only cleaned up when the model queue is found to be empty. When that is the case, metadata corresponding to the obsolete model queues may be deleted, as well as the corresponding topics themselves. Message queues become empty when all messages they contain eventually time out. In a specific example, a model data queue is eligible for cleanup if it meets the following conditions: (i) all of its ancestors, including itself, are empty, (ii) it is an ancestor of a queue pointed to by the root, and (ii) it is not directly pointed to by the root. However, other states may be used in other examples.
[0119] FIG. 17A shows an example model queue 1700 that is eligible for cleanup. "topic1" is empty and all items it contained have timed out. "topic1" has no ancestors and therefore all of its ancestors may be considered empty. "topic1" is a strict ancestor of "topic8", which is pointed to by the root. Therefore, "topic1" is eligible for cleanup. "topic2" is also empty. All of "topic2's" ancestors (i.e., "topic1") are also empty. "topic2" is a strict ancestor of "topic8". Therefore, "topic2" is eligible for cleanup. "topic3" is also empty. All of "topic3's" ancestors (i.e., "topic1") are also empty. "topic3" is also an ancestor of the topic pointed to by the root (i.e., "topic5"). Therefore, "topic3" is eligible for cleanup. "topic4" is empty. However, "topic4" is not an ancestor of any topic pointed to by the root. Therefore, "topic4" is not eligible for cleanup. "topic5" is not empty. Moreover, "topic5" is pointed to by the root. Therefore, "topic5" is not eligible for cleanup. "topic6" is empty and all of its ancestors (i.e., "topic1" and "topic2") are also empty, and "topic6" is a strict ancestor of "topic8" which is pointed to by the root. Therefore, "topic6" is eligible for cleanup. "topic7" is not empty. Therefore, "topic7" is not eligible for cleanup. "topic8" is empty. However, one of "topic8's" ancestors (i.e., "topic7") is not empty and "topic8" is pointed to directly by the root. Therefore, "topic8" is not eligible for cleanup. "topic9" is empty. "topic9" has no ancestors and therefore the ancestors of "topic9" are considered to be empty. However, "topic9" is pointed to directly by the root.Therefore, "topic9" is not eligible for cleanup.
[0120] 17B shows an example model queue graph 1702 after the cleanup procedure is complete. When a topic is completely empty (in other words, it never contained any messages), such as "topic4" from the example above, its children bypass it in favor of directly referencing its parent (if any). In this example, and according to the example conditions presented above, such empty topics are not cleaned up. However, such topics should remain relatively rare. More generally, in this example, topics that are not reachable from the root are not cleaned up. However, in other examples, empty topics such as "topic4" may be cleaned up.
[0121] Thus, the examples described herein provide the ability to store multiple independent sets of data in a data store (such as a database) using hierarchical relationships.
[0122] A particular set of data is accessed using a state ID. In some examples, metadata is stored in the data store along with information about the relationships between different state IDs. However, as noted above, the metadata is not necessarily stored in the same data store as the state data. The relationships can be parent or overlay relationships. A single state ID can have 0 or 1 parent, and 0 to "N" overlays. External clients accessing the data store do so using a particular root state ID.
[0123] When saving data for data item "E" with data elements "m1", "m2", and "m3", the data is simply written into the root state, potentially overwriting anything else stored in the root state for "E", if it exists. A timestamp or other strictly incrementing number is also stored that indicates when the data was modified relative to other changes in the data store.
[0124] When reading, the client is looking for a particular data item, say "E". If "E" is present in the root state, the data stored in the root state associated with "E" is returned to the client. If not, the parent states are searched up the parent hierarchy, etc., until "E" is found, or states at the end (i.e., top) of the tree are searched, and "E" is determined not to exist.
[0125] Additionally, during the search, applicable overlays may be searched for. When a state is applied as an overlay to another state, it is applied with at least one timestamp. In some examples, the overlay may be applied with a first ("upper") timestamp "u" indicating when the overlay was applied to the other state, and optionally with a second ("lower") timestamp "t" indicating when the overlay was created. Data indicating the set of data elements to be applied from the overlay is also stored.
[0126] Once "E" is found, its timestamp "t E " is checked. Chronological order based on top timestamps. <t E For all overlays with u ≤ u, the data elements m n " is applied. Such data elements may be copied over data that is read from elsewhere in the parent state hierarchy. The resulting data is then returned to the querying application. EIf "E" is greater than the upper timestamp of all existing overlays, then "E" has already been saved with the applied overlay and so may be returned as-is. However, in the example, later overlays are still checked in case such overlays changed the way the data item was resolved.
[0127] The cleanup operation may be performed in parallel with client reads and writes. It copies forward any data that is not present in the target state, e.g., the root state, and collapses the old state together. It uses an atomic insert operation such that it does not overwrite any data that was saved in parallel in the root state by the operating client.
[0128] The techniques described herein may be implemented on top of Mongo, SQL, and Apache Kafka. Different implementation details may be involved.
[0129] The entire contents of a dataset may be identified by enumerating all of the data items present in all datasets in the data store, or at least all data items in the hierarchy from a particular root, and then querying for each data item through the root dataset to see its valid data from that root.
[0130] 18 illustrates another state graph 1800 representing another exemplary data store. Reference is made to the exemplary state graph 1800 to summarize various functions and effects of features described herein.
[0131] Various approaches (e.g., methods, devices, systems, computer programs, and computer readable media) are provided for searching data in a data store. The data store comprises a first dataset 1811 and a second dataset 1812. A data item is searched for in the first dataset 1811 and / or the second dataset 1812. In response to the searching finding the data item, data stored in association with the data item is returned. If the data item is found in the first dataset 1811, and if the data item was updated in the first dataset 1811 after the second dataset 1812 became an overlay of the first dataset 1811, the returning comprises returning the first data stored in association with the data item in the first dataset 1811. If the data item is found in the first dataset 1811 and the second dataset 1812, and if the second dataset 1812 becomes an overlay of the first dataset 1811 after the data item is updated in the first dataset 1811, the returning comprises returning second data stored in association with the data item in the second dataset 1812. The second dataset 1812 is identified based on the overlay metadata. The overlay metadata indicates that the second dataset 1812 is an overlay of the first dataset 1811.
[0132] Various approaches (e.g., methods, apparatus, systems, computer programs, and computer readable media) are also provided for storing data in a data store. The data store comprises a first dataset 1811 and a second dataset 1812. Data is stored in association with data items in the first dataset 1811 and / or the second dataset 1812. The second dataset 1812 is applied as an overlay on the first dataset 1811. Overlay metadata is stored. The overlay metadata indicates that the second dataset 1812 is an overlay of the first dataset 1811.
[0133] Such an approach uses overlays and overlay metadata to facilitate searching or retrieving data items in a data store, where the data items may be in one or both of a first dataset 1811 and a second dataset 1812. The first dataset 1811 and the second dataset 1812 are separate datasets in that their data are not merged into a single dataset, but they are related through the overlay metadata. The mixture of the first dataset 1811 and the second dataset 1812 thus allows valid data to be identified and returned from one or both of the first dataset 1811 and the second dataset 1812 without the first dataset 1811 and the second dataset 1812 being merged. Thus, overlay metadata is a data structure that controls how search operations are performed in a data store.
[0134] Such an approach may improve query response times by allowing responses to be constructed using data from different (potentially very large) datasets, as compared to query responses that must be delayed while the different (potentially very large) datasets are merged.
[0135] Such approaches execute structured queries based on the data items to be searched. Such queries may comprise or otherwise identify the data items to be searched. The data items may uniquely identify the data to be retrieved from the data store.
[0136] Such approaches, particularly in combination with, but not limited to, other features described herein, may provide improved computational efficiency with respect to reducing memory read operations, may provide improved security, may provide improved scalability, may provide improved throughput, and / or may provide improved data retention.
[0137] The first dataset 1811 and the second dataset 1812 may have different technical characteristics. For example, the first dataset 1811 may be a root dataset and the second dataset 1812 may be a non-root dataset. In such an example, data may be written to and read from the first dataset 1811, but data may only be read from the second dataset 1812.
[0138] According to an example, live data may be stored separately from other data, such as test data. Test data may be applied to the live data as an overlay, without the test data having to be copied over the live data in a single copy operation. In the case of real-time transaction processing, transaction processing may continue based on the live data, while test data may be created and applied in parallel, where appropriate, without the downtime associated with copying. Live data and test data may be created and written independently, for example, until the test data is applied as an overlay.
[0139] By way of example, copy-on-write history snapshots may be provided. Child states may be created from the old state. Events may be replayed with different machine learning configurations, assuming they are available. The impact that the changes would have had compared to what happened may then be seen. Those changes may be merged into the current live system without the need to re-maturate all the data again.
[0140] In some examples, the data item being searched for is associated with an entity for which real-time anomaly detection is being performed. As explained above, the approaches provided herein can reduce query response times, which can be particularly useful in the context of real-time anomaly detection.
[0141] In some examples, the data in the data store comprises parameter data and / or state data for a machine learning model.
[0142] In some examples, if the second data is returned, the second data is stored in association with the data item in the first dataset 1811. A search for data may initially begin in the first dataset 1811. In such a case, in future searches for the data item, the second data may be retrieved from the first dataset 1811. This may reduce search and response times compared to searching both the first dataset 1811 and the second dataset 1812 for the data item, since an additional read operation may not be required to read data from the second dataset 1812.
[0143] In some examples, in addition to the first data being stored in association with the data items in the first dataset 1811, the second data is stored in association with the data items in the first dataset 1811. Such examples allow for selective retention of the first data as opposed to the first data being overwritten by the second data. This may be particularly useful in examples where the data comprises machine learning model data, as the machine learning model data may be used in a live dataset (e.g., the first dataset 1811) and the machine learning model data may be tested in a test dataset (e.g., the second dataset 1812), and valid machine learning model data in the live dataset may be selectively retained, but machine learning model data in the test dataset that is found to be valid in the test setting may be applied in combination with the machine learning model data in the live setting.
[0144] In some examples, timestamp data is stored in the data store. The timestamp data may indicate when the second data was stored in association with the data item in the first dataset 1811. The timestamp data may indicate whether future searches for the data item should include other datasets in addition to the first dataset 1811. For example, if the timestamp data indicates that the second data was stored in association with the data item in the first dataset 1811 after any overlay datasets were applied to the first dataset 1811, future searches for the data item may not need to include any such other overlay datasets. This, in turn, may improve query response times and reduce the number of read operations involved in returning valid data associated with a data item.
[0145] In some examples, the second dataset 1812 comprises additional data. The additional data may not be stored in the first dataset 1811 in parallel with the second data items being stored in association with the data items in the first dataset 1811. In contrast to techniques in which all data in the second dataset 1812 would be copied into the first dataset 1811 in parallel, such examples allow data to be stored in the dataset 1811 as needed.
[0146] In some such examples, the additional data is stored in association with the data item in the second set 1812. The overlay data element selection metadata may indicate that the second data should be stored in association with the data item in the first data set 1811, and that the additional data should not be stored in association with the data item in the first data set 1811. Based on the overlay data element selection data, the additional data may be suppressed from being stored in association with the data item in the first data set 1811. Such examples provide a well-defined and reliable indication of the valid data that will be constructed in the first data set 1811 at the data element level.
[0147] In such other examples, the further data is stored in association with the further data item in the second dataset 1812. Again, in contrast to techniques where all data in the second dataset 1812 would be copied in parallel into the first dataset 1811, such examples allow data to be stored in the dataset 1811 as needed at the data item level.
[0148] In some examples, the first dataset 1811 is a child dataset. The data store may further comprise a third dataset 1813. The third dataset 1813 may be a parent of the first dataset 1811. Such examples allow for separation of data over time. For example, the third (parent) dataset 1813 may comprise historical data, while the first (child) dataset 1811 may comprise newer, e.g., current, data.
[0149] In some examples, the first dataset 1811 potentially comprises data that is not comprised in the third dataset 1813. Thus, the third (parent) dataset 1813 may comprise historical data, while the first (child) dataset 1811 may comprise newer, e.g., current, data that is not in the historical data. This differs from other data store configurations where the child dataset comprises a subset of the data of the parent dataset.
[0150] In some examples, in response to the searching not finding the data item in the first dataset 1811, the data item is searched for in a third dataset 1813. The third dataset 1813 may be identified using parent metadata. The parent metadata may indicate that the third dataset 1813 is a parent of the first dataset 1811. The parent metadata allows the third dataset 1813 to be searched without potentially large amounts of data in the third dataset 1813 being copied into the first dataset 1811.
[0151] In some examples, the data store further comprises a dataset 1814 that is an overlay of the third dataset 1813. Data items may be searched for in the dataset 1814 that is an overlay of the third dataset 1813. This may improve accuracy in the system in that multiple different test datasets may be applied to the first dataset 1811 as an overlay, for example, with particularly useful data from the different test datasets being selectively applied.
[0152] 18, the third dataset 1813 is also a parent of the second dataset 1812. Thus, multiple different, potentially divergent datasets can be derived from and can share a common parent dataset.
[0153] In other examples not shown in Figure 18, the third dataset 1813 is not a parent of the second dataset 1812. Thus, for example, for data maturation, an independent dataset may be used. The fifth dataset 1815 shown in Figure 18 is an example of an overlay of the first dataset 1811 that does not share a common parent with the first dataset 1811.
[0154] In some examples, the third data set 1813 became immutable upon the creation of the first data set 1811 and / or the second data set 1812. Thus, a historical record of the data may be maintained.
[0155] In some examples, the second data set 1812 has become immutable as it becomes an overlay of the first data set 1811. Additionally, new data writing may be limited to the live data set.
[0156] In some examples, a cleanup operation is performed on a given dataset in a data store. The cleanup operation may comprise causing data from another dataset to be written into the given dataset. The cleanup operation may comprise causing metadata indicating a link between the other dataset and the given dataset to be removed. The cleanup operation may comprise causing other datasets to be removed from the data store. Such examples may reduce search query time by reducing the number of read operations to return positive or negative search results.
[0157] In some examples, the first dataset 1811 was empty at the time of the creation of the first dataset 1811. In some examples, the second dataset 1812 was empty at the time of the creation of the second dataset 1812. In examples where the first dataset 1811 and / or the second dataset 1812 are children of another dataset, the first dataset 1811 and / or the second dataset 1812 may be quickly created as empty sets, with the mixture of the first dataset 1811 and / or the second dataset 1812 with its parent dataset still effectively providing access to the (potentially historical) data of the parent dataset.
[0158] In some examples, the data store further comprises a dataset 1815 that became an overlay of the first dataset 1811 before the second dataset 1812 became an overlay of the first dataset 1811. The second data may be returned in preference to returning data stored in association with a data item in the dataset 1815 that became an overlay of the first dataset 1811 before the second dataset 1812 became an overlay of the first dataset 1811. Thus, the most recently updated data may be used.
[0159] In some examples, the data store further comprises a dataset 1816 that is an overlay of the second dataset 1812. Data items may be searched for in the dataset 1816 that is an overlay of the second dataset 1812. Thus, a recursive overlay may be searched.
[0160] In some examples, if the data item is not found in the first dataset 1811, and if the data item is found in the second dataset 1812, the returning comprises returning second data stored in association with the data item in the second dataset 1812. Thus, processing may be performed if the overlay adds a data item that was not present in the live dataset, e.g., if the data item is only present in the overlay and not in the first dataset 1811.
[0161] In some examples, a delete marker associated with given data stored in the data store is identified. Returning the given data may be inhibited based on the delete marker. Thus, an effective technique may be provided for data to be considered deleted, while such data may still be retained with the data store for other purposes.
[0162] Various approaches (e.g., methods, devices, systems, computer programs, and computer-readable media) are also provided for searching machine learning model data in a database. The database comprises a live state 1811 and an overlay state 1812. A key is searched for in the live state 1811 and / or the overlay state 1812. The key is associated with one or more entities for which real-time anomaly detection is being performed. In response to the searching finding a key, machine learning model data stored in association with the key is returned. The machine learning model data comprises parameter data and / or state data for a machine learning model to be used to perform the real-time anomaly detection. If a key is found in the live state 1811 and if the key was updated in the live state 1811 after the overlay state 1812 became an overlay of the live state 1811, the returning comprises returning a first machine learning model data stored in association with the key in the live state 1811. If the key is found in the live state 1811 and the overlay state 1812, and if the overlay state 1812 becomes an overlay of the live state 1811 after the key is updated in the live state 1811, the returning comprises returning the second machine learning model data stored in association with the key in the overlay state 1812. The overlay state 1812 is identified based on the overlay metadata. The overlay metadata indicates that the overlay state 1812 is an overlay of the live state 1811.
[0163] In the examples described above, the root dataset is searched for the data item, and if (and only if) the data item is not found in the root dataset, another dataset is then identified using metadata and searched for the data item. In such examples, the other dataset is read only if it should be searched. In other examples, the root dataset and the other dataset are read before it is determined whether the other dataset needs to be searched for the data item.
[0164] Some examples described herein may be implemented via instructions stored in a computer-readable storage medium, such as a non-transitory computer-readable medium. The computer-readable medium may comprise one or more of a rotating magnetic disk, a rotating optical disk, a flash random access memory (RAM) chip, and other mechanically moving or solid-state storage media. In use, the instructions are executed by one or more of the processors to cause the processors to perform the operations described above. The above embodiments, variations, and examples should be understood as exemplary. Further embodiments, variations, and examples are envisioned. Although some components of each example are described separately, it should be understood that the functionality described with reference to one example may be suitably implemented in another example, and some components may be omitted depending on the implementation. It should be understood that any feature described with respect to any example may be used alone or in combination with other features described, and may also be used in combination with one or more features of any other of the examples, or in any combination of any other of the examples. For example, features described with respect to system components may also be adapted to be performed as part of the described method. Additionally, equivalents and modifications not described above may be employed without departing from the scope of the invention as defined in the appended claims. [Explanation of symbols]
[0165] 100, 102, 104 Transaction processing system 110 Client Devices 120 Computer Networks 130 Retailer Server 140 Payment Processor Server 142 first data storage device 144 Second Data Storage Device 146 Transaction Data 148 Auxiliary Data 150 Machine Learning Server 160 Machine Learning Systems 162 Input Data 164 Output Data 170 Local Data Storage Device 172 Auxiliary Data 200, 202 Data storage configuration 210 Machine Learning Systems 220 Data Bus 230, 232 Data storage device 240 Historical Transaction Data 242 Auxiliary Data 250 Data Transfer Channels 260 Data Storage Device 270 Logical Memory Layer 280 Encrypted Partition 300 records 310 Current Transaction Data 320 Historical Transaction Data 330 Transaction Data 402 Machine Learning Systems 410 Input Data 412 Input Data Interface 414 Machine Learning Model Platform 416 Scalar Output 418 Alarm System 420 Output Data Interface 422 Output Data 502 POS or user device 504 Retailer System 506 Payment Processor System 508 Machine Learning Systems 510 Issuing Bank System 600, 602, 604, 606, 608 Status Graph 611 First Data Set 612 Second Data Set 613 Third Data Set 614 Fourth Data Set 640, 641, 642 Data 700 Status Graph 711 Grandparent Status 712 Parent Dataset 713 First child dataset 714 Second Child Dataset 740, 741, 742 Timestamp data 800 Entities 801 stateId field 802 Data Item Field 803 data field 804 timestamp field 810 Entities 811 stateId field 812 startTime field 813 Parent field 814 overlay field 900 Status Graph 911 Great-Grandparents Dataset 912 Grandparents Dataset 913 Parent Dataset 914 Parent Overlay Dataset 915 Child Datasets 916 Child Overlay Datasets 1000 Status Graph 1013 Third Data Set 1014 Fourth Data Set 1015 5th Data Set 1016 6th Data Set 1100 Status Graph 1111 Dataset 1112 Second Data Set 1113 Dataset 1114 Fourth Data Set 1115 Fifth Data Set 1170 Cutoff 1200, 1202 Status Graph 1211 Great-grandparents dataset 1212 Grandparents Dataset 1213 Parent Dataset 1214 Child Dataset 1300, 1302 Status Graph 1311, 1312, 1313, 1314 datasets 1400 Status Graph 1411 First Data Set 1412 Second Data Set 1413 Third Data Set 1414 Fourth Data Set 1415 Fifth Data Set 1416 6th Data Set 1500 Status Graph 1514 Fourth Data Set 1515 5th Data Set 1516 6th Data Set 1600, 1602, 1604, 1606, 1608 Queues 1700 Model Queue 1702 Model Queueing Graph 1800 Status Graph 1811 First Data Set 1811 Live Status 1812 Second Data Set 1812 Overlay Status 1813 Third Data Set 1814 Dataset 1815 Fifth Data Set 1816 Dataset
Claims
1. 1. A method for searching data in a data store, the data store comprising: A first data set, and Second Data Set Equipped with The method further comprising: searching for data items in said first data set and / or said second data set; in response to said searching step finding said data item, returning data stored in association with said data item; Equipped with if the data item is found in the first dataset and if the data item was updated in the first dataset after the second dataset became an overlay of the first dataset, the returning step comprises returning first data stored in association with the data item in the first dataset; if the data item is found in the first data set and in the second data set, and if the second data set becomes an overlay of the first data set after the data item is updated in the first data set, the returning step comprises returning second data stored in association with the data item in the second data set; the method comprising identifying the second data set based on overlay metadata, the overlay metadata indicating that the second data set is an overlay of the first data set. method.
2. The method of claim 1 , wherein the data item is associated with an entity for which real-time anomaly detection is being performed.
3. The method of claim 1 or 2, wherein the data comprises parameter data and / or state data for a machine learning model.
4. 4. A method according to claim 1, comprising, if the second data is returned, storing the second data in association with the data item in the first data set.
5. 5. The method of claim 4, wherein the storing step comprises storing the second data in association with the data item in the first data set in addition to the first data being stored in association with the data item in the first data set.
6. 6. A method according to claim 4 or 5, comprising storing timestamp data in the data store, the timestamp data indicating when the second data was stored in association with the data item in the first data set.
7. 7. A method according to any one of claims 1 to 6, wherein the second data set comprises further data, the further data not being stored in the first data set at the same time that a second data item is stored in association with the data item in the first data set.
8. 8. The method of claim 7, wherein the further data is stored in association with the data item in the second data set, and overlay data element selection metadata indicates that the second data should be stored in association with the data item in the first data set and that the further data should not be stored in association with the data item in the first data set, the method comprising the step of inhibiting the further data from being stored in association with the data item in the first data set based on the overlay data element selection metadata.
9. The method of claim 7 , wherein the further data is stored in association with a further data item in the second data set.
10. 10. The method of claim 1, wherein the first dataset is a child dataset, the data store further comprising a third dataset, the third dataset being a parent of the first dataset.
11. The method of claim 10 , wherein the first data set potentially comprises data not comprised in the third data set.
12. in response to the searching step not finding the data item in the first data set, the method comprises searching for the data item in a third data set; the third data set is an identified set using parent metadata; the parent metadata indicates that the third data set is a parent of the first data set; 12. The method according to claim 10 or 11.
13. 13. The method of claim 12, wherein the data store further comprises a dataset that is an overlay of the third dataset, the method comprising searching for the data item in the dataset that is an overlay of the third dataset.
14. 14. The method of claim 10, wherein the third dataset is also a parent of the second dataset.
15. 14. The method of claim 10, wherein the third dataset is not a parent of the second dataset.
16. 16. The method of any one of claims 10 to 15, wherein the third data set is immutable upon creation of the first data set and / or the second data set.
17. 17. The method of claim 1, wherein the second data set is made immutable when it becomes an overlay of the first data set.
18. performing a clean-up operation on a given data set in the data store, the clean-up operation comprising: causing data from another data set to be written into said given data set; causing metadata to indicate a link between said another dataset and said given dataset to be removed; causing the other data set to be removed from the data store; Equipped with 18. The method according to any one of claims 1 to 17.
19. 19. The method of any one of claims 1 to 18, wherein the first dataset was empty at the time of creation of the first dataset and / or the second dataset was empty at the time of creation of the second dataset.
20. The data store, a dataset that became an overlay of the first dataset before the second dataset became an overlay of the first dataset, the method comprising returning the second data in preference to returning data stored in association with the data items in the dataset that became an overlay of the first dataset before the second dataset became an overlay of the first dataset; and / or a dataset that is an overlay of the second dataset, the method comprising searching for the data item in the dataset that is an overlay of the second dataset. Further comprising:
20. The method according to any one of claims 1 to 19.
21. 21. The method of claim 1, wherein if the data item is not found in the first dataset and if the data item is found in the second dataset, the returning step comprises returning the second data stored in association with the data item in the second dataset.
22. identifying a deletion marker associated with a given datum stored in the data store; suppressing returning the given data based on the deletion marker; 22. The method of claim 1 , comprising:
23. 1. A method for storing data in a data store, the data store comprising: A first data set, and A second data set is provided; The method further comprising: storing data associated with data items in said first data set and / or said second data set; applying the second data set as an overlay on the first data set; storing the overlay metadata; Equipped with the overlay metadata indicates that the second data set is an overlay of the first data set; method.
24. 1. A method for searching machine learning model data in a database, the database comprising: Live status, and Equipped with overlay state, The method further comprising: searching for a key in the live state and / or the overlay state, the key being associated with one or more entities for which real-time anomaly detection is being performed; in response to the searching step finding the key, returning machine learning model data stored in association with the key, the machine learning model data comprising parameter data and / or state data for a machine learning model to be used to perform the real-time anomaly detection; Equipped with if the key is found in the live state and if the key was updated in the live state after the overlay state became an overlay of the live state, the returning step comprises returning first machine learning model data stored in association with the key in the live state; if the key is found in the live state and in the overlay state, and if the overlay state becomes an overlay of the live state after the key is updated in the live state, the returning step comprises returning second machine learning model data stored in association with the key in the overlay state; the method comprising identifying the overlay state based on overlay metadata, the overlay metadata indicating that the overlay state is an overlay of the live state; method.
25. 25. A system configured to carry out the method of any one of claims 1 to 24.
Citation Information
Patent Citations
Snapshot creation device, method and program
JP2007272675A
Optimization of Access to Production Data
JP2018530817A
Overlay Dataset
US20070282810A1
