By STEPHEN BRAUNWASHINGTON (AP) a¿¿ The U.S. government is looking at ways to prevent anyone from spying on its own surveillance of Americans' phone records. As the Obama administration considers shifting the collection of those records from the National Security Agency to requiring that they be stored at phone companies or elsewhere, it's quietly funding research to prevent phone company employees or eavesdroppers from seeing whom the U.S. is spying on, The Associated Press has learned. The Office of the Director of National Intelligence has paid at least five research teams across the country to develop a system for high-volume, encrypted searches of electronic records kept outside the government's possession. The project is among several ideas that would allow the government to discontinue storing Americans' phone records, but still search them as needed. Under the research, U.S. data mining would be shielded by secret coding that could conceal identifying details from outsiders and even the owners of the targeted databases, according to public documents obtained by The Associated Press and AP interviews with researchers, corporate executives and government officials. In other developments Monday: a¿¿The Justice Department and leading Internet companies agreed to a compromise with the government that would allow the firms to reveal how often they are ordered to turn over information about their customers in national security investigations. The deal with Google Inc., Microsoft Corp., Yahoo Inc., Facebook Inc. and LinkedIn Corp. would provide public information in general terms. Other technology companies were also expected to participate. a¿¿Published reports said new documents leaked by former NSA contactor Edward Snowden suggest that popular mapping, gaming and social networking apps on smartphones can feed the NSA and Britain's GCHQ eavesdropping agency with personal data, including location information and details such as political affiliation or sexual orientation. The reports, published by The New York Times, the Guardian and ProPublica, said the intelligence agencies get routine access to data generated by apps such as the Angry Birds game franchise or the Google Maps navigation service.