sense-networksSense Networks, a company that can track “tribes” of people — such as those who like the same bars and same movies — to better target them with instant advertising, has raised $6 million in new venture financing in a hotly contested deal.

Semiconductor giant Intel led the deal, after beating out Sequoia Capital, the well-known Silicon Valley venture capital firm, we’ve learned from a source very close to the deal. The negotiations got tense after Intel made its offer for investment. The following day, after hearing about Intel’s offer, Sequoia tried to make the company’s CEO take money exclusively from Sequoia. The company’s chief executive Greg Skibiski, we’re told, wasn’t impressed, and decided to take Intel’s money. One point we aren’t able to confirm is whether Intel offered better deal terms. Neither Sense Networks nor Intel nor Sequoia responded to requests for comment. An announcement about the deal is expected in about a week.

The New York company’s technology is based on Complex Events Processing (CEP), which allows state-of-the art real-time data reporting. It’s the same technology used by Tipco, the company that serves the trading floors at the New York Stock Exchange and Nasdaq. It’s much quicker than the XMPP protocol we’ve talked about in the past, which is used for real-time search products on the Web.

Sense doesn’t require a direct relationship with the consumer. Instead, it might partner with companies like mobile social networking company, Loopt, for example. After I’ve opted in to use Loopt’s service, that service gets updates from my GPS-enabled phone about where I am at any given time. Loopt then provides that data to Sense, which anonymizes the data (Sense isn’t interested in identifying your name or other specific information about you), and can help Loopt run more relevant advertising.

Basically, Sense crunches all the incoming data it gets from Loopt and other services it partners with to find insights about “tribes” and “clusters” of people, and their patterns of behavior (scroll down on this page to see an example). It then uses the real-time technology to serve ads to people in those tribes: So for example, if you travel from your home in LA to New York, Sense can help advertise to you in New York based on patterns they’ve seen in the habits of the tribe you belong to that Sense has detected while watching your patterns in LA.

The company’s platform is still young. Sense has built a mobile phone application called City Sense (available on the iPhone and Blackberry), which asks “Where is everybody going right now?” It shows the overall activity level of a city in real time, revealing top hotpots, and places with unexpectedly high levels of activity. It links to Yelp and Google to show which venues are at the center of that activity.

Core to Sense’s offering is its “machine learning” technology. It constantly updates what it knows about tribes based on the information it is getting. On the next release of City Sense, for example, the application will ask “Where is everyone like me right now?” Four friends at dinner discussing where to go next, for example, can see four different live maps — based on their own particular interests — showing them hotspots and unexpected activity relevant to them. And Sense can do this even if they’re having dinner in a city they’ve never visited before. That’s where the advertising can kick in. Sense can show the users a range of options, based on their interests, and advertisers can provide them special offers to lure them to those locations.

The City Sense application is designed merely to showcase Sense’s technology. Sense plans are to monetize the technology by working with providers such as Loopt, which have relationships with users, and then advertising networks such as Admob, which can deliver ads to those users via Sense’s platform. Sense takes a cut from the boost in revenue that Loopt gets as a result. (To be clear: Loopt is being used as a hypothetical example here; I haven’t confirmed that they are a partner).

Nobably, I’ve learned, Sequoia at one point invited the company in for a five-hour due diligence session, and invited in Rajeev Motwani, the respected Stanford professor who died two weeks ago, who reportedly spent about three hours reviewing it too. Motwani, an expert in machine learning, apparently greenlighted the investment for Sequoia, because Sequoia issued its initial termsheet the following week.

The funding is the company’s second round. Previously, Sense raised $3 million in a first round of funding from Passport Capital and some unnamed hedge funds and at first moved to apply its technology to the financial markets. The company was founded in 2003, incorporated in 2006, and is in the early stages of generating revenue.

[Are you an entrepreneur or executive active in mobile? Join us at MobileBeat 2009, our mobile conference for industry leaders. Sign up soon.]