Japanese vending machine operators have recently been seeking new ways to expand their sales under the pressure of competition from convenience stores that offer an increasing variety of products.

Japan has a staggeringly high density of vending machines on its streets -- about 4.9 million units nationwide, equivalent to more than one per person in countries such as Ireland or New Zealand. About half of these units sell beverages, and annual sales stood at nearly 5 trillion yen ($45 billion) at the end of 2016, according to the Japan Vending Machine Manufacturers Association.

But the spread of convenience stores throughout the country is posing a threat to sales by vending machines, prompting their operators to find unique or unconventional ways to expand their functions.

One such example is a vending machine installed in a nursery room at a shopping mall in Yokohama that sells drinks and diapers. Beverage producer Kirin Holdings Co. and household product maker Kao Corp. developed the machine in a tie-up with a nonprofit organization supporting childrearing.

They put the idea into practice after fathers who are actively involved in raising their children told the Yokohama-based NPO Comachiplus that it would be convenient for them to be able to buy diapers from a vending machine if they forget to take them when going out with their babies.

According to the mall run by Aeon Retail Co., the vending machine has sold about 30 diapers a month since being installed in March.

The Kirin group has already deployed vending machines that offer opportunities for users to make contributions to charities by buying items from the machines.

The group, which has supported activities advocating early detection and treatment of breast cancer for years, has installed "pink-ribbon" vending machines elsewhere. Part of their sales proceeds have been donated to a fund promoting pink ribbon movements aimed at raising awareness of cancer.

The beverage maker has also set up vending machines linked with support for the development of soccer in Japan, as well as others for local Japanese businesses.

Another beverage maker, Asahi Soft Drinks Co., has launched vending machines that offer "ice-cold" drinks, whose temperatures are kept around 1 C compared to around 5 C with conventional machines.

"As we are expecting a scorching summer this year, I hope more people will buy (from our machines)," said a company official.

JR East Water Business Co., meanwhile, has installed what it calls an "innovation vending machine." It is coupled with a smartphone application that allows buyers to pay for items beforehand and even gives a discount. They can get the products by holding their smartphones over the machine.

The machine is also compatible with other electronic payment systems for transportation. An official in charge of the business said the railway company plans to install more of such units in its business areas.