Baidu’s financial performance worsened in the second quarter as the company pushed deeper into its transition from a traditional internet search and advertising group toward an artificial-intelligence-focused business. The Beijing-based company has been increasing spending on AI, autonomous driving and chip design, but those efforts have yet to materially offset weakness in its main advertising operations. Net profit has fallen by more than half for a third straight quarter, while revenue has been declining for more than a year.