Data processing method, device, equipment and computer storage medium

By receiving user input in the electronic device, collecting data and using the server's classification model to determine the device model to obtain the script, QR code recognition is automatically performed, solving the problem of cumbersome QR code recognition operations and achieving the effect of simplifying operations and improving recognition efficiency.

CN114676715BActive Publication Date: 2025-09-05CHINA MOBILE COMM GRP SHAANXI CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210300513.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-25
Publication Date
2025-09-05
Estimated Expiration
2042-03-25

AI Technical Summary

Technical Problem

When using applications such as web browsers, the QR code recognition operation is too cumbersome, especially when the QR code photo quality is poor and needs to be re-photographed and uploaded, which makes the operation complicated.

Method used

By receiving user input in the electronic device, collecting target data and sending it to the server, using a pre-trained classification model to determine the device model, obtaining the script corresponding to the device model, and running the script to automatically perform QR code recognition.

Benefits of technology

It simplifies the QR code recognition operation process, improves recognition efficiency and user experience, avoids repeated uploading due to poor shooting quality, and improves recognition accuracy and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114676715B_ABST
    Figure CN114676715B_ABST
Patent Text Reader

Abstract

The present application discloses a data processing method, apparatus, device and computer storage medium. Among them, the data processing method applied to an electronic device includes: receiving a first input in a preset application when running a preset application, the first input being used to request QR code recognition; in response to the first input, collecting target data and sending the target data to a server; receiving a target script sent by the server, the target script being determined by the server based on the device model of the electronic device and a preset correspondence, the device model of the electronic device being obtained by the server using a pre-trained classification model to classify the target data, the preset correspondence including the correspondence between the device model of the electronic device and the target script; running the target script to perform QR code recognition. The embodiment of the present application greatly simplifies the operations required for QR code recognition when the electronic device runs a preset application, effectively improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of data processing technology, and in particular relates to a data processing method, device, equipment and computer storage medium. Background Art

[0002] As we all know, QR codes are now widely used. In related technologies, when users use applications such as web browsers to identify QR codes, they usually need to manually upload a photo of the QR code to a server for recognition. If the QR code photo is of poor quality, they may need to retake and upload the photo, making the QR code recognition process extremely cumbersome. Summary of the Invention

[0003] The embodiments of the present application provide a data processing method, apparatus, device, and computer storage medium to solve the problem that the operations required for QR code recognition are too complicated when an electronic device runs an application such as a web browser.

[0004] In a first aspect, an embodiment of the present application provides a data processing method, applied to an electronic device, the method comprising:

[0005] When a preset application is running, receiving a first input in the preset application, where the first input is used to request QR code recognition;

[0006] In response to the first input, collecting target data, and sending the target data to the server;

[0007] Receive a target script sent by the server, where the target script is determined by the server based on a device model of the electronic device and a preset correspondence relationship, where the device model of the electronic device is obtained by classifying target data using a pre-trained classification model, and the preset correspondence relationship includes a correspondence between the device model of the electronic device and the target script;

[0008] Run the target script to perform QR code recognition.

[0009] In a second aspect, an embodiment of the present application provides a data processing method, applied to a server, comprising:

[0010] receiving target data sent by the electronic device;

[0011] Use the pre-trained classification model to classify the target data and obtain the device model of the electronic device;

[0012] Determine the target script according to the device model of the electronic device and a preset correspondence relationship, where the preset correspondence relationship includes a correspondence relationship between the device model of the electronic device and the target script;

[0013] The target script is sent to the electronic device, and the target script is used by the electronic device to perform QR code recognition when the target script is running.

[0014] In a third aspect, an embodiment of the present application provides a data processing device, applied to an electronic device, comprising:

[0015] A first receiving module is configured to receive a first input in a preset application while the preset application is running, the first input being used to request QR code recognition;

[0016] an acquisition and sending module, configured to acquire target data in response to a first input and send the target data to a server;

[0017] a second receiving module, configured to receive a target script sent by the server, the target script being determined by the server based on a device model of the electronic device and a preset correspondence relationship, the device model of the electronic device being obtained by classifying target data using a pre-trained classification model by the server, and the preset correspondence relationship including a correspondence between the device model of the electronic device and the target script;

[0018] Run the recognition module, which is used to run the target script for QR code recognition.

[0019] In a fourth aspect, an embodiment of the present application provides a data processing device, applied to a server, comprising:

[0020] a third receiving module, configured to receive target data sent by an electronic device;

[0021] A classification module, configured to classify target data using a pre-trained classification model to obtain a device model of the electronic device;

[0022] A determination module, configured to determine a target script according to a device model of the electronic device and a preset correspondence relationship, wherein the preset correspondence relationship includes a correspondence relationship between the device model of the electronic device and the target script;

[0023] The first sending module is used to send the target script to the electronic device, and the target script is used by the electronic device to perform QR code recognition when the target script is running.

[0024] In a fifth aspect, an embodiment of the present application provides a terminal device, the device comprising: a processor and a memory storing computer program instructions;

[0025] When the processor executes the computer program instructions, it implements the data processing method of the first aspect, or implements the data processing method of the second aspect.

[0026] In a sixth aspect, an embodiment of the present application provides a computer storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the data processing method of the first aspect is implemented, or the data processing method of the second aspect is implemented.

[0027] In the seventh aspect, an embodiment of the present application provides a computer program product, characterized in that when the instructions in the computer program product are executed by the processor of an electronic device, the electronic device executes the data processing method as in the first aspect, or implements the data processing method as in the second aspect.

[0028] The data processing method applied to electronic devices provided in an embodiment of the present application receives a first input in the preset application when running a preset application, the first input being used to request QR code recognition; in response to the first input, the target data is collected and the target data is sent to the server; the target script sent by the server is received, and the target script is run to perform QR code recognition. The target script is determined by the server based on the device model of the electronic device and a preset correspondence relationship, the device model of the electronic device is obtained by the server using a pre-trained classification model to classify the target data, and the preset correspondence relationship includes the correspondence between the device model of the electronic device and the target script. In the embodiment of the present application, the electronic device can obtain the target script corresponding to the device model from the server, and automatically perform QR code recognition based on the running of the target script, which greatly simplifies the operations required for QR code recognition when the electronic device runs the preset application, and effectively improves the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0030] Figure 1 This is a schematic diagram of a framework structure that can implement the data processing method provided in the embodiment of the present application;

[0031] Figure 2 1 is a flow chart of a data processing method applied to an electronic device provided in an embodiment of the present application;

[0032] Figure 3 1 is a flow chart of a data processing method applied to a server provided in an embodiment of the present application;

[0033] Figure 4 This is a schematic diagram of the data interaction process between an electronic device and a server to realize QR code recognition in a specific application example;

[0034] Figure 5 is a structural diagram of a data processing device applied to an electronic device provided in an embodiment of the present application;

[0035] Figure 6 is a structural diagram of a data processing device applied to a server provided in an embodiment of the present application;

[0036] Figure 7 It is a structural diagram of the terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0037] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is merely to provide a better understanding of the present application by illustrating the examples of the present application.

[0038] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.

[0039] In order to solve the problems of the prior art, the embodiments of the present application provide a data processing method, apparatus, device and computer storage medium. The following first illustrates an example framework to which the data processing method provided by the embodiments of the present application can be applied.

[0040] like Figure 1 As shown, the framework may include a server 20 and an electronic device 10, wherein the electronic device 10 may be, for example, a mobile terminal, a personal computer, or a wearable device, etc., which is not specifically limited here.

[0041] The electronic device 10 may have a communication module and a camera module, wherein the communication module may be a 5G, 4G, or WiFi type communication module, which can be used to realize communication between the electronic device 10 and the server 20. The camera module may have a shooting function. For example, the electronic device 10 may use the camera module to shoot a QR code to facilitate subsequent further recognition of the QR code.

[0042] The electronic device 10 and the server 20 can communicate with each other. For example, the electronic device 10 can send its own software and hardware data to the server 20. Alternatively, the electronic device 10 can send a captured QR code video or photo to the server 20. Alternatively, the electronic device 10 can send collected data related to user operations to the server 20, such as the gestures or input trajectories used by the user when operating an application on the electronic device 10.

[0043] The server 20 can receive data sent by the electronic device 10 and process the data. For example, the server 20 can identify the model of the electronic device 10 based on the software and hardware data or user operation-related data sent by the electronic device 10. Alternatively, the electronic device 10 can receive a video or picture with a QR code sent by the electronic device 10 and identify the QR code. Alternatively, the server 20 can send a script file, such as a JavaScript script (hereinafter referred to as a JS script), to the electronic device 10.

[0044] The following first introduces the data processing method provided in the embodiment of the present application.

[0045] Figure 2 FIG1 shows a flow chart of a data processing method provided by an embodiment of the present application. The data processing method can be applied to electronic devices, such as Figure 2 As shown, the method includes:

[0046] Step 201: When a preset application is running, receiving a first input in the preset application, the first input being used to request QR code recognition;

[0047] Step 202, in response to the first input, collecting target data and sending the target data to the server;

[0048] Step 203: Receive a target script sent by the server. The target script is determined by the server based on the device model of the electronic device and a preset correspondence relationship. The device model of the electronic device is obtained by classifying target data using a pre-trained classification model. The preset correspondence relationship includes a correspondence between the device model of the electronic device and the target script.

[0049] Step 204: Run the target script to perform QR code recognition.

[0050] As shown above, the electronic device can be a mobile terminal, a personal computer, a wearable device, etc., which is not specifically limited here.

[0051] In step 201, the electronic device may accept a first input in the preset application while running the preset application.

[0052] For example, the preset application may be a system browser, such as a system browser based on HyperText Markup Language 5 (HTML5) technology, etc. Alternatively, the preset application may be some hybrid application, such as a web application built using HTML5 and JavaScript, etc.

[0053] In some application scenarios, users may need to use the QR code recognition function when using the system browser. At this time, the user can click and input the relevant controls on the system browser page.

[0054] In the above application scenario, the system browser can be the above-mentioned preset application, and the user's click input on the control can correspond to the above-mentioned first input. Of course, it is easy to understand that in other application scenarios, the first input can also be, for example, a double-click, a sliding input, or a preset gesture input, etc., and examples are not given here one by one.

[0055] The first input may be used to request QR code recognition. For example, upon receiving the first input, the electronic device may further perform steps related to QR code recognition. These steps will be described in detail below.

[0056] In step 202 , the electronic device may collect target data in response to the first input, and send the collected target data to the server.

[0057] The target data may be relevant data for determining the device model of the electronic device. The electronic device sends the target data to the server, so that the server can determine the device model of the electronic device according to the target data.

[0058] For example, the target data may be software data of the electronic device, such as the type of the operating system of the electronic device and version information of the browser.

[0059] For another example, the target data may be hardware data of the electronic device, such as information indicating whether the electronic device has a graphics processing unit (GPU), or the specific model of the GPU, etc. Alternatively, the hardware data may be screen resolution, etc.

[0060] For another example, the target data may also be user operation data. For example, the user's input method on the electronic device when using the back function or entering the background application interface. Alternatively, the user operation data may also include the user's input method on the electronic device when switching between the front camera and the rear camera.

[0061] It is easy to understand that there are usually differences in software data, hardware data or user operation data in electronic devices of different device models. When these types of data are used as target data, the server can determine the device type of the electronic device based on the target data.

[0062] For example, a server may have a trained classification model. This classification model may be trained based on training samples. The training samples may include sample data and annotations. The sample data and target data may have the same or similar data composition, and the annotations may be device types. In this way, the trained classification model can classify the target data and determine the device type of the electronic device.

[0063] The specific type of classification model used by the server can be a Gradient Boosting Decision Tree (GBDT)-based classification model or other Boosting-based classification models. In practical applications, the classification model used by the server can also be a Random Forest or Support Vector Machine classification model.

[0064] When the server determines the device type of the electronic device based on the target data and the trained classification model, it can further determine the target script corresponding to the device type of the electronic device according to a preset corresponding relationship.

[0065] The above-mentioned preset correspondence may be a correspondence between a device model and a script, including a correspondence between a device type of the electronic device and a target script.

[0066] In some examples, the preset correspondence relationship may be pre-stored in the server in a table or other form.

[0067] In step 203, the electronic device may receive the target script sent by the server. As for the manner in which the server determines the target script according to the target data, it has been illustrated above and will not be repeated here.

[0068] In the case where the default application is a system browser, the target script can be a script that can be opened by the system browser. At the same time, the target script can be a script corresponding to the device model of the electronic device, so that the target script can be opened normally when the electronic device runs the system browser.

[0069] In step 204, the electronic device may run a target script to perform QR code recognition.

[0070] In conjunction with the above example where the default application is the system browser, the target script can be opened and run by the default application.

[0071] In this embodiment, the target script may be a script related to QR code recognition. When the electronic device runs the target script, operations related to QR code recognition may be performed. For example, the electronic device may automatically turn on a camera and send a video or image captured by the camera to a server for recognition.

[0072] That is to say, when an electronic device obtains the target script corresponding to its device type, it can automatically perform operations related to QR code recognition by running the script, without the user having to manually open the camera application to take pictures, nor does the user have to manually upload the taken photos to the server, thereby simplifying the user's operations.

[0073] The data processing method applied to electronic devices provided in an embodiment of the present application receives a first input in the preset application when running a preset application, the first input being used to request QR code recognition; in response to the first input, the target data is collected and the target data is sent to the server; the target script sent by the server is received, and the target script is run to perform QR code recognition. The target script is determined by the server based on the device model of the electronic device and a preset correspondence relationship, the device model of the electronic device is obtained by the server using a pre-trained classification model to classify the target data, and the preset correspondence relationship includes the correspondence between the device model of the electronic device and the target script. In the embodiment of the present application, the electronic device can obtain the target script corresponding to the device model from the server, and automatically perform QR code recognition based on the running of the target script, which greatly simplifies the operations required for QR code recognition when the electronic device runs the preset application, and effectively improves the user experience.

[0074] In one embodiment, after receiving the target script sent by the server, the electronic device may store the target script, and read and execute the target script when receiving the first input again.

[0075] For example, if the default application is a browser, after receiving the target script, the browser can store it. When the user needs to scan a QR code on the browser page again, the browser can directly read and run the target script without sending the target data to the server or waiting to receive the target script from the server, thus improving the QR code recognition efficiency.

[0076] It is easy to understand that the user again needs to perform QR code recognition on the browser page, which can be specifically manifested as the electronic device receiving the above-mentioned first input again.

[0077] In actual applications, the browser page or page control targeted by the first input may be different, and accordingly, the input method of the first input may also be different. Therefore, the first input here can generally refer to the input used to request QR code recognition, and the specific input method is not specifically limited.

[0078] Optionally, the target script is used to control the electronic device to perform the following steps:

[0079] Turn on the camera of the electronic device to collect the video stream;

[0080] Send the video stream to the server, which is used to identify the QR code and generate the QR code recognition result;

[0081] When receiving the QR code recognition result sent by the server, turn off the camera.

[0082] Taking the preset application as a browser as an example, the browser can call and run the target script.

[0083] Generally speaking, a browser may have an Application Programming Interface (API). Among these APIs, there may be an API for programmatic access to a camera. For example, an HTML5-based browser may include a media capture interface that can be used to control the camera of an electronic device, such as turning the camera on or off.

[0084] Accordingly, by running the target script, the browser can control the camera to start and capture the video stream.

[0085] In combination with some application scenarios, when the camera is started, the electronic device can display a shooting preview interface. According to the shooting preset interface, the user can aim the camera at the QR code to be identified. At this time, the video frame of the video stream captured by the camera can include the QR code.

[0086] When the server receives a video frame including a QR code, it can identify the QR code and send the QR code recognition result to the electronic device.

[0087] As for the specific process of the server identifying the QR code, it can be achieved through existing technical means and will not be described in detail here.

[0088] Based on the running of the target script, when the electronic device receives the QR code recognition result, it can turn off the camera and end the QR code recognition related process.

[0089] As for the operation of the electronic device after receiving the QR code recognition result, it can be opening the link page corresponding to the QR code or starting the relevant application in the electronic device, etc., which is not specifically limited here.

[0090] In this embodiment, by running the target script, the electronic device can send a video stream to the server, so that the server can obtain a relatively clear QR code video frame in the video stream for recognition, thereby improving the accuracy and reliability of QR code recognition; avoiding the situation where users repeatedly upload QR code photos due to poor shooting quality, thereby helping to simplify user operations and improve user experience.

[0091] Optionally, when the preset application is a browser, sending the video stream to the server includes:

[0092] Obtain the video stream captured by the camera through the media capture interface and associate preset tags with the video stream;

[0093] Capture video streams associated with preset tags through the Canvas function and convert the video streams into multiple photos;

[0094] Send multiple photos to the server at a scheduled time;

[0095] Among them, the browser includes a media capture interface and Canvas function.

[0096] In conjunction with a specific application example, the above-mentioned browser may be a browser based on HTML5 technology.

[0097] Electronic devices can programmatically access the camera through HTML5's media capture interface. They then use the getUserMedia API to obtain the video stream captured by the camera and add HTML5 tags to the video stream. The HTML5 Canvas feature is then used to capture the tag content in real time. Using toDataURL, the obtained Canvas data is converted into a base64-encoded PNG image and stored in the imgData variable, thereby obtaining the photo stream. Finally, using setInterval, the photo stream is periodically uploaded to the server, allowing the server to parse the QR code contained in the photo stream.

[0098] The above-mentioned HTML5 tags may correspond to preset tags, and the process of adding HTML5 tags to the video stream corresponds to the process of associating the preset tags with the video stream.

[0099] The photo stream can correspond to multiple photos. The process of uploading the photo stream to the server at a scheduled time corresponds to the process of sending multiple photos to the server at a scheduled time.

[0100] This embodiment flexibly uses the API and various functions in the browser to enable the electronic device to send multiple photos to the server at a regular interval, which helps to improve the server's recognition rate of the QR code.

[0101] Optionally, in step 202, before collecting target data and sending the target data to the server, the method further includes:

[0102] Receiving a feature vector format sent by the server, the feature vector format including multiple target feature indicators, the multiple target feature indicators including feature indicators related to software and hardware data and feature indicators related to user operation data;

[0103] Accordingly, step 202, collecting target data and sending the target data to the server, includes:

[0104] Collect target data corresponding to multiple target characteristic indicators, including software and hardware data and user operation data;

[0105] Based on the feature vector format, the target data is processed into feature vectors;

[0106] Send the feature vector to the server.

[0107] In this embodiment, the server and the electronic device may agree on the content and format of the target data. Specifically, the server may send a feature vector format to the electronic device, and the feature vector format may include multiple target feature indicators.

[0108] Taking some examples, multiple target feature indicators may include the GPU model of the electronic device, the operating system type, the number of operations required for the user to switch between the front and rear cameras, and the frequency of clicks by the user in preset applications, etc.

[0109] It is easy to understand that the GPU model and operating system type can be feature indicators related to software and hardware data, while the number of operations required for the user to switch between the front and rear cameras and the frequency of clicks of the user in the preset application can be feature indicators related to user operation data.

[0110] In practical applications, the number and composition of target feature indicators in the feature vector format can be set as needed, and examples are not given here one by one.

[0111] When receiving the feature vector format, the electronic device can collect data according to the multiple target feature indicators therein to obtain target data corresponding to the multiple target feature indicators. The corresponding relationship can be specifically reflected in that the target data includes the data collected for each target feature indicator.

[0112] As shown above, the feature vector format may also specify the format of the target data. Accordingly, the electronic device may process the target data into a feature vector based on the feature vector format, and the electronic device may send the feature vector to the server.

[0113] As mentioned in the above embodiments, the server can classify the target data using a pre-trained classification model to obtain the device type of the electronic device. Generally speaking, for a classification model based on training, its input data usually has a preset format requirement, which can correspond to the feature vector format described above.

[0114] In this embodiment, the target data received by the server from the electronic device can be specifically a feature vector obtained through processing based on a feature vector format. This feature vector can match the format requirements of the input data of the classification model. Therefore, the server can directly input the received feature vector into the classification model to classify the device type of the electronic device, eliminating the need to pre-process the target data and thereby improving the server's efficiency in determining the device type of the electronic device.

[0115] In practical applications, when electronic devices collect target data, some data corresponding to target characteristic indicators may be missing. For example, if the electronic device does not have a GPU, the data corresponding to the target characteristic indicator, such as the GPU model, may be missing. Therefore, when target data corresponding to multiple target characteristic indicators is collected, it is not mandatory to include data corresponding to each target characteristic indicator.

[0116] like Figure 3As shown, the embodiment of the present application also provides a data processing method applied to a server, the method comprising:

[0117] Step 301, receiving target data sent by an electronic device;

[0118] Step 302: Use a pre-trained classification model to classify the target data to obtain the device model of the electronic device;

[0119] Step 303: determining a target script according to the device model of the electronic device and a preset correspondence relationship, where the preset correspondence relationship includes a correspondence relationship between the device model of the electronic device and the target script;

[0120] Step 304: Send the target script to the electronic device. The target script is used by the electronic device to perform QR code recognition when the target script is running.

[0121] The data processing method applied to a server provided in an embodiment of the present application receives target data sent by an electronic device; classifies the target data using a pre-trained classification model to obtain the device model of the electronic device; determines a target script based on the device model of the electronic device and a preset correspondence, and sends the target script to the electronic device, where the target script is used by the electronic device to perform QR code recognition when the target script is running. In an embodiment of the present application, the server can determine a target script corresponding to the device model of the electronic device based on the classification structure of the target data, and send the target script to the electronic device so that the electronic device can automatically perform QR code recognition based on the running of the target script, thereby helping to save the operations required for QR code recognition and improving the user experience.

[0122] Optionally, after sending the target script to the electronic device, the method further includes:

[0123] Receiving a video stream sent by an electronic device, where the video stream is collected by the electronic device while running a target script;

[0124] Perform QR code recognition based on the video stream to obtain the QR code recognition result;

[0125] The QR code recognition result is sent to the electronic device.

[0126] The electronic device can collect the video stream based on the execution of the target script and send it to the server. In this embodiment, the server can receive the video stream sent by the electronic device, perform QR code recognition based on the video stream, obtain a QR code recognition result, and send the QR code recognition result to the electronic device.

[0127] In conjunction with some specific application examples, the target script can be a script related to a browser. The electronic device can specifically run the target script through a browser. Accordingly, the browser can apply relevant APIs and functions (such as the media capture interface and Canvas function mentioned in the above embodiment) to convert the video stream into multiple photos and send them to the server at a regular interval. Accordingly, the video stream received by the server can be in the form of multiple photos.

[0128] In some implementations, the server may pre-process each received photo before recognizing the QR code.

[0129] Cameras output data in a variety of formats. Black and white cameras directly output grayscale images, while color cameras can output color images in formats such as YUV422, YUV410, RGB565, and RGB888. QR code recognition only requires a single-channel grayscale image, so the server can convert these color images (corresponding to the multiple photos sent to the server by the electronic device).

[0130] Taking the process of converting a color image in RGB888 format to a grayscale image as an example, the conversion formula can be as follows:

[0131] Gray=0.2989R+0.5870G+0.1140B

[0132] Where Gray is the grayscale value of any pixel in the grayscale image, and R, G, and B are the red, green, and blue channel values ​​of the pixel in the color image in RGB888 format, respectively.

[0133] In practical applications, the server can also enhance the contrast of the grayscale image by increasing the dynamic range between two grayscale values ​​in the photo, thereby increasing the contrast between different parts of the photo. At the same time, piecewise linear transformation can be used to highlight the grayscale range of the QR code, making QR code recognition more accurate and faster.

[0134] In some implementations, the server may use a zbar algorithm to identify a photo including a QR code and obtain information contained in the QR code.

[0135] Specifically, the Zbar algorithm scans the image line by line in a Z-shaped path, analyzes the edge gradient, and obtains a stream of light and dark widths. The zbar_decode_width() function processes this stream of light and dark widths to obtain a horizontal line segment structure variable that conforms to the characteristics of a QR code.

[0136] The same method is used to scan the photo column by column in an N-shaped path to obtain the light and dark height flow, thereby obtaining the longitudinal line segment structure variable.

[0137] Finally, the codeword of the photo is read. The functional area of ​​the QR code is first identified and then the data area is parsed. The Reed-Solomon error correction algorithm is added to obtain the information contained in the QR code (corresponding to the above-mentioned QR code recognition result).

[0138] Optionally, the pre-trained classification model includes a GBDT module and a Logistic Regression (LR) module;

[0139] The input end of the GBDT module is used to receive target data, the output end of the GBDT module is connected to the input end of the LR module, and the output end of the LR module is used to output the device model.

[0140] In this embodiment, the classification model in the server includes a GBDT module and an LR module.

[0141] GBDT is an iterative decision tree algorithm, a member of the Boosting family of ensemble learning. It boasts high classification accuracy and good generalization, making it a commonly used nonlinear model. Based on the boosting principle of ensemble learning, each iteration builds a new decision tree in the direction of the gradient that reduces the residual error. The number of iterations yields the same number of decision trees. As a result, the GBDT module can discover a variety of discriminative features and feature combinations, significantly reducing the time and labor costs of feature engineering.

[0142] The GBDT module can classify target data and generate classification results that represent the probability that an electronic device's device type belongs to various preset device types. In some application scenarios, the software and hardware configurations of some electronic devices may be relatively similar. Accordingly, the classification results output by the GBDT module may show that the probability of an electronic device belonging to preset device type A and the probability of belonging to preset device type B are relatively similar.

[0143] In this embodiment, the output end of the GBDT module is connected to the input end of the LR module, so that the LR module can perform more accurate classification based on the classification result output by the GBDT module, thereby helping to more accurately determine the device type of the electronic device.

[0144] Optionally, before using a pre-trained classification model to classify the target data to obtain the device model of the electronic device, the method further includes:

[0145] Obtaining an original data set, where each original data in the original data set corresponds to a plurality of initial feature indicators, and each original data includes software and hardware data and user operation data of a sample device, and the plurality of initial feature indicators include feature indicators related to the software and hardware data and feature indicators related to the user operation data;

[0146] Based on the original data set, a correlation analysis is performed on the multiple initial feature indicators to obtain multiple target feature indicators, where the multiple initial feature indicators include the multiple target feature indicators, and the correlation between the multiple target feature indicators meets a preset condition;

[0147] Based on the data related to the multiple target characteristic indicators in each original data and the device model of the sample device, training samples are respectively established to obtain a training sample set;

[0148] The pre-established classification model is trained using the training sample set to obtain a trained classification model.

[0149] This embodiment can be considered as a process in which the server trains the above-mentioned classification model.

[0150] The original data set may include multiple original data, each original data may include data of multiple dimensions, and each dimension may correspond to one of the above-mentioned initial feature indicators.

[0151] In order to ensure that the original data includes as much data as possible that has a positive effect on the accurate classification of the device type of the electronic device, each original data may include the software and hardware data and user operation data of the sample device. Accordingly, the multiple initial feature indicators include feature indicators related to the software and hardware data, as well as feature indicators related to the user operation data.

[0152] Combined with some application scenarios, the above classification model can theoretically classify data of multiple initial feature indicators to obtain the device type of the electronic device.

[0153] However, there may be a strong correlation between the data of different initial feature indicators. For example, an increase in the data of one initial feature indicator will inevitably lead to a proportional increase or decrease in the data of another initial feature indicator, indicating that there is a strong correlation between the two initial feature indicators. In this case, the data of the two initial feature indicators may be highly redundant. Using the data of one of the initial feature indicators, or using the data of both initial feature indicators at the same time, will not have a significant impact on the classification results of the classification model. However, using the data of both initial feature indicators at the same time will obviously increase the data processing volume of the electronic device and the server.

[0154] Therefore, based on the above considerations, in this embodiment, the server may perform a correlation analysis on a plurality of initial feature indicators based on the original data set to obtain a plurality of target feature indicators.

[0155] In some examples, the multiple target feature indicators may be all or part of the multiple initial feature indicators.

[0156] The correlation between the multiple target feature indicators satisfies a preset condition. For example, the preset condition may be that the correlation between two target feature indicators is within a preset threshold range. Accordingly, the correlation between the multiple target feature indicators satisfies the preset condition when the correlation between any two of the multiple target feature indicators is within a preset threshold range.

[0157] Generally speaking, the restrictions of the above preset conditions can make the correlation between any two target feature indicators lower.

[0158] In this embodiment, training samples may be established based on data related to multiple target characteristic indicators in each original data and the device model of the sample device to obtain a training sample set.

[0159] It is easy to understand that each original data can be derived from a corresponding sample device. In the process of preparing the training sample set, the device model of each sample device can be known.

[0160] Generally speaking, each training sample includes sample data and its corresponding data label, wherein the sample data may be data related to multiple target feature indicators in the original data, and the data label may be the device model of the sample device providing the original data.

[0161] In this way, the pre-established classification model is trained using the training sample set, and the obtained trained classification model can classify and obtain the device model of the electronic device according to the target data including data related to multiple target feature indicators.

[0162] When preparing a training sample set for a classification model, this embodiment can analyze the correlation between the initial feature indicators of the original data to obtain multiple target feature indicators, and use data related to the multiple target feature indicators in the original data to establish training samples, which can reduce data redundancy, reduce the data input flow of the classification model during training and application, and save server computing resource consumption.

[0163] In a specific application example, an electronic device extracts user operation data through multiple channels, such as user screen click habits and software usage frequency. This user operation data, along with the electronic device's hardware and software data, can specifically include data related to multiple initial feature indicators. Theoretically, training a classification model using data related to these initial feature indicators can enable the model to predict the device's model.

[0164] In this application example, the server can use statistical methods to aggregate and derive the original data set to form an information table actually required for input into the classification model. The information table includes target feature indicators and related data.

[0165] For example, in one example, the server may use the Pearson coefficient to calculate the correlation between the initial feature indicators, extract important feature indicators (corresponding to the target feature indicators), and reduce data redundancy.

[0166] In this example, the correlation between any two initial feature indicators can be a linear correlation between the two, with a value range of [-1, 1], where 1 indicates a perfect positive correlation, 0 indicates no linear relationship at all, and -1 indicates a perfect negative correlation, meaning that when the data associated with one initial feature indicator increases, the data associated with the other initial feature indicator decreases. The closer the correlation coefficient is to 0, the weaker the correlation. The correlation calculation formula can be as follows:

[0167]

[0168] In the formula, r is the correlation, X is the data related to an initial feature index in any original data, is the mean of the data related to an initial feature index in the original data set, and Y is the data related to another initial feature index in any original data. is the mean of the data related to another initial feature index in the original data set.

[0169] In one example, the aforementioned preset condition may be that the correlation r between the two target feature indicators is within a preset threshold range [-0.5, 0.5]. Of course, in actual applications, the preset threshold range may be set according to actual needs and is not specifically limited here.

[0170] In one embodiment, before training a pre-established classification model using a training sample set, a loss function and number of iterations can be set. The data labels for each training sample in the training sample set can include sub-labels corresponding to each device model. Each sub-label can take a value of 0 or 1, where 0 indicates that the sample data does not belong to the device model corresponding to the sub-label, and 1 indicates that the sample data does belong to the device model corresponding to the sub-label.

[0171] In one example, the loss function of the classification model can be an exponential loss function as follows:

[0172]

[0173] Among them, L(y,F(x)) is the loss value of the loss function, N is the number of training samples in the training sample set, y represents the data label, and y i represents the value of the sub-label corresponding to the i-th device model, x represents the sample data, x i represents the sample data corresponding to the i-th device model, F(x i ) is the classification model for xi The predicted probability of being the i-th device model.

[0174] Of course, in practical applications, the specific form of the loss function can be set as needed, and this embodiment does not specifically limit the loss function of the classification model.

[0175] Optionally, after performing correlation analysis on the multiple initial feature indicators based on the original data set to obtain multiple target feature indicators, the method further includes:

[0176] Generate a feature vector format based on multiple target feature indicators;

[0177] Send the feature vector format to the electronic device.

[0178] When a classification model is fully trained, the format of the input data of the trained classification model is usually fixed. For example, the input data needs to include data related to multiple target feature indicators.

[0179] In this embodiment, the server can generate a feature vector format based on multiple target feature indicators and send the feature vector format to the electronic device. The electronic device can then use the data related to the multiple target feature indicators based on the feature vector format and send this data to the server in the feature vector format. This can save the server from pre-processing the data from the electronic device and improve the server's efficiency in determining the device model of the electronic device.

[0180] like Figure 4 As shown, Figure 4 The figure is a schematic diagram of the data interaction process between an electronic device and a server to realize QR code recognition in a specific application example.

[0181] based on Figure 4 It can be seen that electronic devices can collect device information, such as software and hardware data and user operation data, organize the device information to obtain feature vectors, and send the feature vectors to the server.

[0182] The server adapts the electronic device based on the background big data. Specifically, the server can create training samples based on the big data and train the classification model. The trained classification model can determine the device model of the electronic device according to the feature vector sent by the electronic device, and select the JS code corresponding to the device model of the electronic device from the preset JS code library (corresponding to the target script), encapsulate the JS code and send it to the electronic device.

[0183] The HTML5-based browser in the electronic device can receive and run JS code. During the running process, the browser can apply for relevant permissions of the electronic device through the API interface, turn on the camera, obtain the video stream, and process the video stream into photos through the Canvas function and send them to the server.

[0184] The server can pre-process the photo in the form of grayscale processing, use the Zbar algorithm to identify the QR code in the photo, and send the identified QR code information to the electronic device. When the electronic device receives the QR code information, it stops the camera shooting process.

[0185] Based on the above application examples, it can be seen that the embodiments of this application can leverage big data modeling and adaptation algorithms to enable the server to automatically select dynamic scripts to adapt to electronic devices, significantly improving the compatibility of HTML5 invoking native device camera-related functions. The code scanning capabilities implemented by HTML5 are less dependent on electronic device hardware and software, significantly reducing the performance requirements of mobile phones, while also providing HTML5 browser scanning capabilities for low-end devices. The entire code scanning process is simple for users, and the server has a high recognition rate for QR codes, significantly improving user experience and satisfaction.

[0186] like Figure 5 As shown, an embodiment of the present application further provides a data processing device 500, which is applied to an electronic device. The data processing device 500 includes:

[0187] A first receiving module 501 is configured to receive a first input in a preset application while the preset application is running, where the first input is used to request QR code recognition;

[0188] The collection and transmission module 502 is used to collect target data in response to the first input and send the target data to the server;

[0189] A second receiving module 503 is configured to receive a target script sent by the server, where the target script is determined by the server based on a device model of the electronic device and a preset correspondence relationship. The device model of the electronic device is obtained by classifying target data using a pre-trained classification model, and the preset correspondence relationship includes a correspondence between the device model of the electronic device and the target script.

[0190] The running recognition module 504 is used to run the target script to perform two-dimensional code recognition.

[0191] Optionally, running the identification module 504 includes:

[0192] A first acquisition unit, configured to activate a camera of the electronic device and acquire a video stream;

[0193] A first sending unit is used to send a video stream to a server, where the video stream is used by the server to identify a QR code and generate a QR code recognition result;

[0194] The closing unit is used to close the camera when receiving the QR code recognition result sent by the server.

[0195] Optionally, the acquisition and sending module 502 includes:

[0196] an acquisition unit, configured to acquire a video stream captured by a camera through a media capture interface when the preset application is a browser, and associate a preset tag with the video stream;

[0197] A conversion unit, used to capture a video stream associated with a preset tag through a canvas function and convert the video stream into multiple photos;

[0198] A second sending unit is used to send multiple photos to the server at a scheduled time;

[0199] Among them, the browser includes a media capture interface and Canvas function.

[0200] Optionally, the data processing device 500 may further include:

[0201] a fourth receiving module, configured to receive, before collecting target data and sending the target data to the server, a feature vector format sent by the server, the feature vector format including a plurality of target feature indicators, the plurality of target feature indicators including feature indicators related to software and hardware data and feature indicators related to user operation data;

[0202] Accordingly, the acquisition and sending module 502 includes:

[0203] A second collection unit is used to collect target data corresponding to multiple target characteristic indicators, the target data including software and hardware data and user operation data;

[0204] A processing unit, configured to process target data into a feature vector based on a feature vector format;

[0205] The third sending unit is configured to send the feature vector to the server.

[0206] It should be noted that the data processing device 500 is a device corresponding to the above-mentioned data processing method applied to electronic equipment. All implementation methods in the above-mentioned method embodiments are applicable to the embodiments of the device and can achieve the same technical effects.

[0207] like Figure 6 As shown, the embodiment of the present application further provides a data processing device 600, which is applied to a server. The data processing device 600 includes:

[0208] The third receiving module 601 is used to receive target data sent by the electronic device;

[0209] A classification module 602 is configured to classify the target data using a pre-trained classification model to obtain a device model of the electronic device;

[0210] A determination module 603 is configured to determine a target script according to a device model of the electronic device and a preset correspondence relationship, wherein the preset correspondence relationship includes a correspondence relationship between the device model of the electronic device and the target script;

[0211] The first sending module 604 is used to send the target script to the electronic device, and the target script is used by the electronic device to perform QR code recognition when the target script is running.

[0212] Optionally, the data processing device 600 may further include:

[0213] A fifth receiving module is configured to receive a video stream sent by an electronic device, where the video stream is collected by the electronic device while the target script is running.

[0214] The recognition module is used to perform QR code recognition based on the video stream and obtain the QR code recognition result;

[0215] The second sending module is used to send the QR code recognition result to the electronic device.

[0216] Optionally, the data processing device 600 may further include:

[0217] An acquisition module is used to acquire an original data set, wherein each original data in the original data set corresponds to a plurality of initial characteristic indicators, and each original data includes software and hardware data and user operation data of a sample device, and the plurality of initial characteristic indicators include characteristic indicators related to the software and hardware data, and characteristic indicators related to the user operation data;

[0218] An analysis module is used to perform a correlation analysis on a plurality of initial feature indicators based on an original data set to obtain a plurality of target feature indicators, wherein the plurality of initial feature indicators include a plurality of target feature indicators, and the correlation between the plurality of target feature indicators satisfies a preset condition;

[0219] An establishment module is used to establish training samples based on data related to multiple target characteristic indicators in each original data and the device model of the sample device to obtain a training sample set;

[0220] The training module is used to train the pre-established classification model using the training sample set to obtain a trained classification model.

[0221] Optionally, the data processing device 600 may further include:

[0222] A generation module, used for generating a feature vector format according to multiple target feature indicators;

[0223] The third sending module is used to send the feature vector format to the electronic device.

[0224] Optionally, the pre-trained classification model includes a gradient descent tree (GBDT) module and a logistic regression (LR) module;

[0225] The input end of the GBDT module is used to receive target data, the output end of the GBDT module is connected to the input end of the LR module, and the output end of the LR module is used to output the device model.

[0226] It should be noted that the data processing device 600 is a device corresponding to the above-mentioned data processing method applied to the server. All implementation methods in the above-mentioned method embodiments are applicable to the embodiments of the device and can achieve the same technical effects.

[0227] Figure 7 A schematic diagram of the hardware structure of the terminal device provided in an embodiment of the present application is shown.

[0228] The terminal device may include a processor 701 and a memory 702 storing computer program instructions.

[0229] Specifically, the processor 701 may include a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0230] The memory 702 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 702 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 702 may include removable or non-removable (or fixed) media. Where appropriate, the memory 702 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 702 is a non-volatile solid-state memory.

[0231] In certain embodiments, the memory 702 may include read-only memory (ROM), random access memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical, or other physical / tangible memory storage devices. Thus, in general, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.

[0232] The processor 701 implements any one of the data processing methods in the above embodiments by reading and executing computer program instructions stored in the memory 702 .

[0233] In one example, the terminal device may further include a communication interface 703 and a bus 710. Figure 7 As shown, the processor 701, the memory 702, and the communication interface 703 are connected via a bus 710 and communicate with each other.

[0234] The communication interface 703 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.

[0235] Bus 710 includes hardware, software or both, and the parts of online data flow metering equipment are coupled to each other. For example, but not limitation, bus can include accelerated graphics port (AGP) or other graphics bus, enhanced industry standard architecture (EISA) bus, front side bus (FSB), hypertransport (HT) interconnection, industry standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 710 can include one or more buses. Although the present application embodiment describes and shows specific bus, the application considers any suitable bus or interconnection.

[0236] In addition, in conjunction with the data processing methods in the above embodiments, embodiments of the present application may provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any one of the data processing methods in the above embodiments is implemented.

[0237] It should be understood that the present application is not limited to the specific configurations and processes described above and illustrated in the figures. For the sake of brevity, a detailed description of known methods is omitted here. In the above embodiments, several specific steps are described and illustrated as examples. However, the method process of the present application is not limited to the specific steps described and illustrated. Those skilled in the art can make various changes, modifications, and additions, or change the order of the steps after understanding the spirit of the present application.

[0238] The functional blocks shown in the above block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. Programs or code segments can be stored in machine-readable media, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable media" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROMs, flash memories, erasable ROMs (EROMs), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segments can be downloaded via computer networks such as the Internet, intranets, etc.

[0239] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps. In other words, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.

[0240] Aspects of the present disclosure have been described above with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor or a field programmable logic circuit. It is also understood that each box in the block diagram and / or flowchart and the combination of the boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.

[0241] The above is only a specific implementation method of the present application. Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the scope of protection of the present application is not limited to this. Any technician familiar with this technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the scope of protection of this application.

Claims

1. A data processing method, applied to an electronic device, characterized in that: The method comprises: When a preset application is running, receiving a first input in the preset application, where the first input is used to request QR code recognition; In response to the first input, collecting target data, and sending the target data to a server; receiving a target script sent by the server, where the target script is determined by the server based on a device model of the electronic device and a preset correspondence relationship, where the device model of the electronic device is obtained by classifying the target data by the server using a pre-trained classification model, and the preset correspondence relationship includes a correspondence between the device model of the electronic device and the target script; Run the target script to perform QR code recognition.

2. The method according to claim 1, characterized in that The target script is used to control the electronic device to perform the following steps: Turning on the camera of the electronic device to capture a video stream; Sending the video stream to the server, wherein the video stream is used by the server to identify the QR code and generate a QR code recognition result; When receiving the QR code recognition result sent by the server, the camera is turned off.

3. The method according to claim 2, characterized in that In a case where the preset application is a browser, sending the video stream to the server includes: Acquire the video stream captured by the camera through a media capture interface, and associate a preset tag with the video stream; Capturing the video stream associated with the preset tag through a canvas function, and converting the video stream into multiple photos; Sending the plurality of photos to the server at a fixed time; Wherein, the browser includes the media capture interface and the Canvas function.

4. The method according to claim 1, wherein Before collecting the target data and sending the target data to the server, the method further includes: Receiving a feature vector format sent by the server, the feature vector format including a plurality of target feature indicators, the plurality of target feature indicators including feature indicators related to software and hardware data and feature indicators related to user operation data; The collecting target data and sending the target data to the server includes: Collecting target data corresponding to the multiple target characteristic indicators, the target data including the software and hardware data and the user operation data; Based on the feature vector format, processing the target data into a feature vector; The feature vector is sent to the server.

5. A data processing method, applied to a server, characterized in that: The method comprises: receiving target data sent by the electronic device; Classify the target data using a pre-trained classification model to obtain the device model of the electronic device; Determine a target script according to a device model of the electronic device and a preset correspondence relationship, wherein the preset correspondence relationship includes a correspondence relationship between the device model of the electronic device and the target script; The target script is sent to the electronic device, and the target script is used by the electronic device to perform two-dimensional code recognition when the target script is running.

6. The method according to claim 5, characterized in that After sending the target script to the electronic device, the method further includes: Receiving a video stream sent by the electronic device, where the video stream is collected by the electronic device when running the target script; Performing QR code recognition based on the video stream to obtain a QR code recognition result; The QR code recognition result is sent to the electronic device.

7. The method according to claim 5, characterized in that Before classifying the target data using a pre-trained classification model to obtain the device model of the electronic device, the method further includes: Acquire an original data set, wherein each original data in the original data set corresponds to a plurality of initial feature indicators, each original data includes software and hardware data and user operation data of a sample device, and the plurality of initial feature indicators include feature indicators related to the software and hardware data and feature indicators related to the user operation data; Based on the original data set, performing a correlation analysis on the multiple initial feature indicators to obtain multiple target feature indicators, where the multiple initial feature indicators include the multiple target feature indicators, and the correlations between the multiple target feature indicators meet a preset condition; Based on the data related to the multiple target characteristic indicators in each of the original data and the device model of the sample device, respectively establish training samples to obtain a training sample set; The pre-established classification model is trained using the training sample set to obtain a trained classification model.

8. The method according to claim 7, characterized in that After performing correlation analysis on the multiple initial feature indicators based on the original data set to obtain multiple target feature indicators, the method further includes: generating a feature vector format according to the plurality of target feature indicators; The feature vector format is sent to the electronic device.

9. The method according to claim 5, characterized in that The pre-trained classification model includes a gradient descent tree GBDT module and a logistic regression LR module; The input end of the GBDT module is used to receive the target data, the output end of the GBDT module is connected to the input end of the LR module, and the output end of the LR module is used to output the device model.

10. A data processing device, applied to electronic equipment, characterized in that: The device comprises: A first receiving module is configured to receive a first input in a preset application while the preset application is running, wherein the first input is used to request QR code recognition; an acquisition and sending module, configured to acquire target data in response to the first input, and send the target data to a server; a second receiving module, configured to receive a target script sent by the server, the target script being determined by the server based on a device model of the electronic device and a preset correspondence relationship, the device model of the electronic device being obtained by the server classifying the target data using a pre-trained classification model, the preset correspondence relationship including a correspondence between the device model of the electronic device and the target script; The running recognition module is used to run the target script to perform QR code recognition.

11. A data processing device, applied to a server, characterized in that: The device comprises: a third receiving module, configured to receive target data sent by an electronic device; a classification module, configured to classify the target data using a pre-trained classification model to obtain a device model of the electronic device; a determination module, configured to determine a target script according to a device model of the electronic device and a preset correspondence relationship, wherein the preset correspondence relationship includes a correspondence relationship between the device model of the electronic device and the target script; The first sending module is used to send the target script to the electronic device, and the target script is used by the electronic device to perform QR code recognition when running the target script.

12. A terminal device, characterized in that: The device includes: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, it implements the data processing method according to any one of claims 1 to 4, or implements the data processing method according to any one of claims 5 to 9.

13. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the data processing method according to any one of claims 1 to 4 is implemented, or the data processing method according to any one of claims 5 to 9 is implemented.

14. A computer program product, characterized in that When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the data processing method according to any one of claims 1 to 4, or implements the data processing method according to any one of claims 5 to 9.

Citation Information

Patent Citations

  • Method, device and system for establishing Bluetooth connection

    CN110868763A

  • Method and device for displaying terminal page, computer equipment and storage medium

    CN111338531A