A stylus-based data processing method, applied to a communication system, wherein the communication system comprises a stylus and an electronic device, and the method comprises: displaying, by the electronic device, a first interface; receiving, by the electronic device on the first interface, a first operation performed on a first target area by the stylus, wherein the first target area is some or all areas in the first interface; displaying, by the electronic device, a first control on the first interface in response to the first operation; receiving, by the electronic device, a second operation performed on the first control; determining, by the electronic device, first target content in the first target area in response to the second operation; obtaining, by the stylus, the first target content from the electronic device; obtaining, by the stylus, a first target result corresponding to the first target content; obtaining, by the electronic device, the first target result from the stylus; and displaying, by the electronic device, the first target result on the first interface; wherein the stylus is provided with an offline database, and the obtaining, by the stylus, a first target result corresponding to the first target content comprises: calling, by the stylus, the offline database, wherein the offline database stores a plurality of correspondences, and any one of the correspondences is used to indicate a relationship between target content and a target result; and when the stylus finds that the first target content matches any target content in the plurality of correspondences, obtaining, by the stylus from a correspondence in which the any target content is located, the first target result corresponding to the first target content; characterized in that the method further comprises: when the stylus does not match the first target content in the plurality of correspondences, calling, by the stylus, a cloud database; and querying, by the stylus, the cloud database for a result corresponding to the first target content, to obtain the first target result. displaying, by the electronic device, a first interface; receiving, by the electronic device on the first interface, a first operation performed on a first target area by the stylus, wherein the first target area is some or all areas in the first interface; displaying, by the electronic device, a first control on the first interface in response to the first operation; receiving, by the electronic device, a second operation performed on the first control; determining, by the electronic device, first target content in the first target area in response to the second operation; obtaining, by the stylus, the first target content from the electronic device; obtaining, by the stylus, a first target result corresponding to the first target content; obtaining, by the electronic device, the first target result from the stylus; and displaying, by the electronic device, the first target result on the first interface; wherein the stylus is provided with an offline database, and the obtaining, by the stylus, a first target result corresponding to the first target content comprises: calling, by the stylus, the offline database, wherein the offline database stores a plurality of correspondences, and any one of the correspondences is used to indicate a relationship between target content and a target result; and when the stylus finds that the first target content matches any target content in the plurality of correspondences, obtaining, by the stylus from a correspondence in which the any target content is located, the first target result corresponding to the first target content; characterized in that the method further comprises: when the stylus does not match the first target content in the plurality of correspondences, calling, by the stylus, a cloud database; and querying, by the stylus, the cloud database for a result corresponding to the first target content, to obtain the first target result. calling, by the stylus, the offline database, wherein the offline database stores a plurality of correspondences, and any one of the correspondences is used to indicate a relationship between target content and a target result; and when the stylus finds that the first target content matches any target content in the plurality of correspondences, obtaining, by the stylus from a correspondence in which the any target content is located, the first target result corresponding to the first target content; characterized in that the method further comprises: when the stylus does not match the first target content in the plurality of correspondences, calling, by the stylus, a cloud database; and querying, by the stylus, the cloud database for a result corresponding to the first target content, to obtain the first target result. when the stylus does not match the first target content in the plurality of correspondences, calling, by the stylus, a cloud database; and querying, by the stylus, the cloud database for a result corresponding to the first target content, to obtain the first target result.