Hiroki Sawai, who raises 2,200 cattle at his ranch in western Japan, received an alert on his phone one evening last year: a calf had fallen and wasn’t getting up.

He called on staff to check the barn immediately as fallen cows often require prompt aid and, if ill, treatment. The calf, which had tripped over some steps, was rescued, and Sawai was spared the loss of an animal that could be worth over ¥1 million ($7,820) when sold as wagyu, high-quality Japanese beef known for its distinctive fat marbling and loved by gourmands.

The technology behind the alert, sold by Tokyo-based startup Desamis, involves sensors which monitor the movements of livestock. Algorithms analyze the data to detect unusual behavior and possible illness. Even an accidental fall by a young calf or fattened cattle, which can weigh as much as a ton, could lead to death without quick attention.