# US 2021/0334263 A1 · Detecting and addressing clashing transactions in a service-based architecture

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

- Number: US 2021/0334263 A1
- Document ID: US20210334263A1
- Status: Published application
- Kind: A1
- Application number: 16/333,400
- Filed: 2019-01-07
- Published: 2021-10-28
- Earliest claimed: 2018-07-12
- Assignees: Telefonaktiebolaget LM Ericsson (publ)
- Applicants: Telefonaktiebolaget LM Ericsson (publ)
- Inventors: Dinand ROELAND; György MIKLÓS; Zoltán TURÁNYI; András ZAHEMSZKY
- Web page: https://patentgrep.com/patent/US20210334263A1

## CPC

- G06F 16/2308: {Concurrency control (transaction processing G06F9/466)}
- H04L 67/12: specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
- G06F 16/2291: {User-Defined Types; Storage management thereof}
- G06F 16/24575: {using context}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

A method of processing service requests in a service-based network architecture comprising a plurality of service instances includes receiving, at a service, a service request from a sender, the service request including a user identification, ID, associated with the request and a transaction ID associated with the request, obtaining a user context associated with the user ID from a user context database, the user context including a user context version and a transaction ongoing flag, determining based on the transaction ongoing flag whether a transaction involving the user ID is currently ongoing, in response to determining that a transaction involving the user ID is not currently ongoing, processing the service request to obtain an updated key value, and transmitting a store request to the user context database to store the updated key value, and an updated user context version in the user context database.

## Claims

### Claim 1

A method of processing service requests in a service-based network architecture comprising a plurality of service instances, the method comprising:
receiving, at a service, a service request from a sender, the service request including a user identification, ID, associated with the request and a transaction ID associated with the request;
obtaining a user context associated with the user ID from a user context database, the user context including a user context version and a transaction ongoing flag;
determining based on the transaction ongoing flag whether a transaction involving the user ID is currently ongoing;
in response to determining that a transaction involving the user ID is not currently ongoing, processing the service request to obtain an updated key value; and
transmitting a store request to the user context database to store the updated key value, and an updated user context version in the user context database.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
in response to determining based on the transaction ongoing flag that a transaction involving the user ID is currently ongoing, sending an error response to the sender in response to the service request.

### Claim 3 (depends on 1)

The method of claim 1, further comprising:
determining, based on the service request, whether a secondary request is needed to fulfill the service request;
in response to determining that a secondary request is needed to fulfill the service request, setting the transaction ongoing flag to the transaction ID;
determining a service name of a secondary service; and
transmitting a second request to the user context database to store the transaction ongoing flag and the service name of the secondary service in the user context.

### Claim 4 (depends on 3)

The method of claim 3, further comprising:
receiving a response message from the user context database indicating that the second request was not successfully fulfilled; and
in response to the response message from the user context database indicating that the second request was not successfully fulfilled, sending an error message to the sender in response to the service request.

### Claim 5 (depends on 3)

The method of claim 3, further comprising:
receiving a response message from the user context database indicating that the second request was successfully fulfilled; and
in response to the response message from the user context database indicating that the second request was successfully fulfilled, sending a secondary service request to the secondary service, the secondary service request including the transaction ID and the user ID.

### Claim 6 (depends on 5)

The method of claim 5, further comprising:
receiving, from the secondary service, a response to the secondary service request, wherein the response to the secondary service request comprises the transaction ID and the user ID;
obtaining the user context associated with the user ID from the user context database;
determining whether the user context indicates that a request message was sent to the secondary service; and
in response to determining that the user context indicates that a request message was sent to the secondary service, marking the user context to indicate that a response to the secondary service request was received.

### Claim 7 (depends on 6)

The method of claim 6, further comprising:
determining whether the user context indicates that an additional request message is outstanding; and
in response to determining that the user context indicates that no additional request message is outstanding, processing the user context based on the response to the secondary service request.

### Claim 8 (depends on 6)

The method of claim 6, further comprising:
determining whether the transaction ID in the response message matches a stored transaction ID in the user context; and
in response to determining that the transaction ID in the response message does not match the stored transaction ID in the user context, dropping the response message.

### Claim 9 (depends on 6)

The method of claim 6, further comprising:
determining whether the response message indicates that a transaction clash has occurred; and
in response to determining that the response message indicates that a transaction clash has occurred, restoring the user context to a prior state based on the transaction ID.

### Claim 10 (depends on 3)

The method of claim 3, further comprising:
in response to determining that a secondary request is needed to fulfill the service request, storing the service name of the secondary service in the user context prior to transmitting the second request to the user context database.

### Claim 11 (depends on 1)

The method of claim 1, further comprising:
determining, based on the service request, that a secondary request is not needed to fulfill the service request; and
in response to determining that a secondary request is not needed to fulfill the service request, clearing a transaction ongoing flag in the user context prior to storing the user context in the user context database.

### Claim 12 (depends on 1)

The method of claim 1, further comprising:
determining whether a re-try flag is set in the service request.

### Claim 13 (depends on 12)

The method of claim 12, further comprising:
in response to determining that the re-try flag is set in the service request, determining whether the transaction ongoing flag in the user context matches the transaction ID included in the service request; and
in response to determining that the transaction ongoing flag in the user context matches the transaction ID included in the service request, restoring the user context to a prior state based on the transaction ID included in the service request.

### Claim 14 (depends on 13)

The method of claim 13, further comprising:
in response to determining that the re-try flag is set in the service request, determining whether a reply to the service request has already been sent to the sender; and
in response to determining that a reply to the service request has already been sent, re-sending the reply to the sender.

### Claim 15 (depends on 1)

The method of claim 1, wherein the user context database comprises a versioned key-value store where the user ID is encoded in a key name and the user context is encoded in a value associated with the key name.

### Claim 16 (depends on 1)

A network node of a communication network, the network node comprising:
a network interface configured to provide network communication with other network nodes; and
a processor coupled with the transceiver, wherein the processor is configured to provide wireless network communications through the transceiver, and wherein the processor is configured to perform operations according to claim 1.

### Claim 17 (depends on 1)

A network node of a communication network, wherein the network node is adapted to perform according to claim 1.
