TOKYO — Sony’s robot dog is getting a new lease on life. A decade after discontinuing Aibo, Sony said on Wednesday that it was bringing the mechanical canine back as an experiment in cuddly, consumer-friendly artificial intelligence.

Investors are giving Sony another chance, too.

Shares in the electronics and entertainment giant rose to their highest level in nearly a decade, a day after Sony projected what would be its largest-ever annual operating profit.

With its Trinitron televisions and Walkman portable tape players, Sony grabbed ahold of global consumers during Japan’s dizzying economic rise decades ago. But it has struggled more recently, losing ground to international competitors like Apple and Samsung.

Sony lost money for years on once-profitable products like televisions — which it could no longer make cheaply enough to keep up with plummeting prices — while failing to capitalize on the digital revolution that turned Apple and its ecosystem of connected products into a global powerhouse.