The invention discloses a computer firewall device based on a cloud database and a use method, and the method comprises the following steps: S1, application protocol intelligent recognition control: automatically recognizing a DBA protocol, an operation and maintenance protocol, hacker access and application software, carrying out the comprehensive monitoring of all interface access of the database, and achieving the effective access control; S2, precise interception: performing blocking based on various conditions such as IP addresses, time, operations, keywords, database accounts, statementlengths, column names, table names, line numbers and injection feature libraries, and precise access control is realized; S3, APT attack prevention: according to the combination of access behaviors, the statistical model quickly verifies and blocks complex and continuous violation operation and malicious attack behaviors; S4, built-in AI: a built-in intelligent learning module, machine intelligentlearning, automatic modeling and automatic generation of a blocking rule base for actively defending unknown security threats; S5, bypass blocking.