iTunes changing star ratings
After the most recent iTunes update (12.8.2.3 running on a 27"iMac operating on High Sierra 10.13.6 ) I found that iTunes had made two very bad changes to many of the songs in my library. First, it seems to have picked a bunch of songs at random and filled them with gray stars that I cannot remove. Second, it has taken a bunch of song that I rated manually (blue stars) and changed them up or down. For examples I've found about 50 songs so far that I had rated with 4 stars that it changed to 3 stars, and some down to 2 stars or 1 star. This includes songs I have not played in several months, so there is no chance I accidentally changed them myself. How do I fix these two scourges? I have a bunch of smart playlists based on star ratings so this is changing their content.
By the way, I have over 34,000 songs (over 572 GB of music) so trying to fix this manually is going to take a lot of time, and I don't want it being done all over again.
iMac 27", macOS 10.12