Data processing method, device, equipment and medium based on two-dimensional code

By generating and parsing the URL of the target QR code, determining its ownership and processing relevant data, the garbled problem of QR code when scanning in third-party applications is solved, improving user experience and process continuity.

CN114417195BActive Publication Date: 2025-01-17PING AN TECH (SHENZHEN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111440029.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-30
Publication Date
2025-01-17
Estimated Expiration
2041-11-30

AI Technical Summary

Technical Problem

The existing QR code data cannot be processed directly when scanning in third-party applications, resulting in unfriendly user experience and garbled displays, resulting in process failure.

Method used

By obtaining the pre-configured data format and pending data, generating the target QR code, parsing the target URL, determining whether it belongs to the current application, if it does not belong, obtain the target page address and task data, and connect and display the target page based on this information. Ensure the correct analysis and processing of QR code data.

Benefits of technology

Whether the QR code is identified by external or internal applications, it can avoid garbled code display, guide users to perform further operations, and ensure process continuity and user experience improvement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114417195B_ABST
    Figure CN114417195B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of data processing, and provides a data processing method, device, equipment and medium based on a QR code, which can generate a target QR code according to a data format and data to be processed, and when it is detected that the current application scans the target QR code, the target QR code is parsed to obtain a target URL, and when the target QR code does not belong to the current application, the address of the target page and the task data to be executed are obtained from the target URL, the task data to be executed is connected and transferred to the target page, the target page is displayed, and a QR code is generated based on a specific format, so that no matter whether the QR code is recognized by an external application or an internal application, it will not respond in the form of garbled code, but guide the user to perform further operations, so as to avoid the situation where the user cannot process the process due to the display of garbled code due to the scanning of the QR code by an external application. In addition, the present invention also relates to blockchain technology, and the target QR code can be stored in a blockchain node.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a data processing method, device, equipment and medium based on a two-dimensional code. Background Art

[0002] QR codes can be seen everywhere in daily life, such as for website redirection, mobile e-commerce, anti-counterfeiting traceability, mobile payment, account login, etc., and the types of QR code data can be numbers, alphanumeric characters, characters, binary information, Chinese characters, etc. By scanning the QR code, the identified data can be processed to realize various functions.

[0003] In the prior art, the main QR code data formats include: website, email address, phone number, WiFi configuration, custom data format, etc. In addition, there are many custom QR code data on the market.

[0004] Especially for the above-mentioned customized QR code data, it is usually only valid when recognized by its own application. When recognized by an external application, it is usually just a string of characters. It is impossible to directly perform corresponding business processing based on the recognition result, and the user cannot know the function of the scanned QR code. This not only hinders the use of the QR code, but also has an unfriendly user experience. Summary of the invention

[0005] In view of the above, it is necessary to provide a data processing method, device, equipment and medium based on a QR code, aiming to solve the problem of abnormal jump when a third-party application scans a QR code.

[0006] A data processing method based on a two-dimensional code, the data processing method based on a two-dimensional code comprising:

[0007] Acquire a pre-configured data format and data to be processed, and generate a target QR code according to the data format and the data to be processed;

[0008] When a signal of scanning the target QR code through the current application is detected, the target QR code is parsed to obtain a target URL;

[0009] Determine whether the target QR code belongs to the current application according to the target URL;

[0010] When the target QR code does not belong to the current application, obtaining the address of the target page from the target URL and obtaining the task data to be executed;

[0011] Connecting to the target page according to the address of the target page, and transferring the task data to be executed to the target page;

[0012] The opening mode of the target page is determined according to the task data to be executed, and the target page is displayed according to the opening mode.

[0013] According to a preferred embodiment of the present invention, generating a target two-dimensional code according to the data format and the data to be processed includes:

[0014] Acquire, from the data to be processed, a domain name of an application to which the data to be processed belongs as a target domain name;

[0015] Acquire the task data to be executed from the data to be processed;

[0016] Perform Base64 encoding on the task data to be executed to obtain the target task data;

[0017] Obtain the identifier of the pre-configured QR code recognition task as the target identifier;

[0018] Sequentially concatenate the target domain name, the target identifier and the target task data to obtain the target URL;

[0019] The target QR code is generated according to the target URL.

[0020] According to a preferred embodiment of the present invention, determining whether the target QR code belongs to the current application according to the target URL includes:

[0021] Extract the target domain name from the target URL;

[0022] Determine the application to which the target QR code belongs according to the target domain name, and use it as the target application;

[0023] When the current application is different from the target application, determining that the target QR code does not belong to the current application; or

[0024] When the current application is the same as the target application, it is determined that the target two-dimensional code belongs to the current application.

[0025] According to a preferred embodiment of the present invention, the step of obtaining the address of the target page from the target URL and obtaining the task data to be executed includes:

[0026] Extract the target domain name and the target identifier from the target URL;

[0027] Concatenate the target domain name and the target identifier to obtain the address of the target page;

[0028] Extract the target task data from the target URL;

[0029] Base64 decoding is performed on the target task data to obtain the task data to be executed.

[0030] According to a preferred embodiment of the present invention, when the target two-dimensional code belongs to the current application, the method further includes:

[0031] Determining whether the target URL includes a preset identifier;

[0032] When the target URL includes the preset identifier, obtaining the task identifier and task information from the task data to be executed, and processing the task information according to the task identifier;

[0033] When the target URL does not include the preset identifier, determining whether the target URL is a preset URL;

[0034] When the target URL is the preset URL, executing the task corresponding to the preset URL;

[0035] When the target URL is not the preset URL, determining whether the target domain name is a preset domain name;

[0036] When the target domain name is the preset domain name, determining whether to load the target URL in the current application;

[0037] When the target domain name is not the preset domain name, determining whether the task data to be executed belongs to a preset task;

[0038] When the task data to be executed belongs to the preset task, loading the target URL according to the task parameters of the preset task;

[0039] When the task data to be executed does not belong to the preset task, obtaining a pre-configured domain name list, and determining whether the target domain name is in the domain name list;

[0040] When the target domain name is in the domain name list, loading the target URL in the current application;

[0041] When the target domain name is not in the domain name list, a prompt message is generated, where the prompt message is used to prompt that the recognition of the target QR code is abnormal.

[0042] According to a preferred embodiment of the present invention, when the target domain name is the preset domain name, determining whether to load the target URL in the current application includes:

[0043] Obtaining a configuration file of the current application, wherein the configuration file is used to store the host of the URL that can be loaded by the current application;

[0044] Get the host of the target URL as the target host;

[0045] Utilize the target host to query in the configuration file;

[0046] When the target host is found in the configuration file, the target URL is loaded in the current application.

[0047] According to a preferred embodiment of the present invention, determining the opening mode of the target page according to the task data to be executed, and displaying the target page according to the opening mode includes:

[0048] Obtain a list of permissions pre-configured for the current application;

[0049] When the task data to be executed is in the permission list, jump to the target application based on the target page, and process the task data to be executed in the target application; or

[0050] When the task data to be executed is not in the permission list, the download information of the target application is pushed to the target page.

[0051] A data processing device based on a two-dimensional code, the data processing device based on a two-dimensional code comprising:

[0052] A generating unit, used for acquiring a pre-configured data format and data to be processed, and generating a target two-dimensional code according to the data format and the data to be processed;

[0053] A parsing unit, configured to parse the target QR code to obtain a target URL when a signal of scanning the target QR code through the current application is detected;

[0054] A determination unit, configured to determine whether the target QR code belongs to the current application according to the target URL;

[0055] an acquisition unit, configured to acquire the address of a target page from the target URL and acquire task data to be executed when the target QR code does not belong to the current application;

[0056] A connection unit, used to connect to the target page according to the address of the target page, and transfer the task data to be executed to the target page;

[0057] The display unit is used to determine the opening mode of the target page according to the task data to be executed, and display the target page according to the opening mode.

[0058] A computer device, comprising:

[0059] a memory storing at least one instruction; and

[0060] A processor executes instructions stored in the memory to implement the data processing method based on the two-dimensional code.

[0061] A computer-readable storage medium stores at least one instruction, and the at least one instruction is executed by a processor in a computer device to implement the data processing method based on a two-dimensional code.

[0062] It can be seen from the above technical scheme that the present invention can obtain the pre-configured data format and the data to be processed, and generate a target QR code according to the data format and the data to be processed. When a signal of scanning the target QR code through the current application is detected, the target QR code is parsed to obtain the target URL, and whether the target QR code belongs to the current application is determined according to the target URL. When the target QR code does not belong to the current application, the address of the target page is obtained from the target URL, and the task data to be executed is obtained, and the target page is connected to the target page according to the address of the target page, and the task data to be executed is transferred to the target page, and the opening method of the target page is determined according to the task data to be executed, and the target page is displayed according to the opening method, and the QR code is generated based on a specific format. In this way, whether the QR code is recognized by an external application or an internal application, it will not respond in the form of garbled code, but guide the user to perform further operations, so as to avoid the situation where garbled code is displayed due to the external application scanning the QR code, which makes the user unable to process and causes the process to be broken. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] Figure 1 It is a flow chart of a preferred embodiment of the data processing method based on QR code of the present invention.

[0064] Figure 2 It is a functional module diagram of a preferred embodiment of the data processing device based on two-dimensional code of the present invention.

[0065] Figure 3 It is a structural schematic diagram of a computer device of a preferred embodiment of the present invention for implementing a data processing method based on a two-dimensional code. DETAILED DESCRIPTION

[0066] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention is described in detail below with reference to the accompanying drawings and specific embodiments.

[0067] like Figure 1FIG. 1 is a flowchart of a preferred embodiment of a data processing method based on a two-dimensional code according to the present invention. According to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted.

[0068] The data processing method based on QR code is applied to one or more computer devices, and the computer device is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.

[0069] The computer device may be any electronic product that can perform human-computer interaction with a user, such as a personal computer, a tablet computer, a smart phone, a personal digital assistant (PDA), a game console, an interactive network television (IPTV), a smart wearable device, etc.

[0070] The computer device may also include a network device and / or a user device, wherein the network device includes, but is not limited to, a single network server, a server group consisting of multiple network servers, or a cloud consisting of a large number of hosts or network servers based on cloud computing.

[0071] The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), as well as big data and artificial intelligence platforms.

[0072] Among them, Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0073] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0074] The network where the computer device is located includes but is not limited to the Internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (VPN), etc.

[0075] S10, obtaining a pre-configured data format and data to be processed, and generating a target two-dimensional code according to the data format and the data to be processed.

[0076] In this embodiment, the data format refers to the data format of the configured two-dimensional code.

[0077] For example: In most scenarios, the data format of the QR code is a string, such as mm01EFCB9727HHKJK.

[0078] S11, when a signal of scanning the target QR code through the current application is detected, the target QR code is parsed to obtain a target URL (Uniform Resource Locator).

[0079] In this embodiment, the current application may be any application. Specifically, the current application may be the application to which the target two-dimensional code belongs, or may be other third-party application that has no association with the target two-dimensional code.

[0080] Further, when a signal of scanning the target QR code through the current application is detected, the target URL can be directly obtained according to the information transmitted by the target QR code.

[0081] S12: Determine whether the target QR code belongs to the current application according to the target URL.

[0082] In this embodiment, the target URL stores the domain name of the application to which the target QR code belongs. The stored domain name can be used to further determine whether the target QR code belongs to the current application.

[0083] It should be noted that, depending on whether it belongs to the current application, the response method after scanning the target QR code will also be different.

[0084] S13, when the target QR code does not belong to the current application, obtaining the address of the target page from the target URL, and obtaining the task data to be executed.

[0085] In this embodiment, the target page may include an H5 (Html ​​5) page, which is pre-configured and used to display response data after scanning the target QR code.

[0086] Specifically, the address of the target page can be obtained by acquiring characters at a specified position from the target URL according to the data format of the target URL.

[0087] In at least one embodiment of the present invention, generating a target two-dimensional code according to the data format and the data to be processed includes:

[0088] Acquire, from the data to be processed, a domain name of an application to which the data to be processed belongs as a target domain name;

[0089] Acquire the task data to be executed from the data to be processed;

[0090] Perform Base64 encoding on the task data to be executed to obtain the target task data;

[0091] Obtain the identifier of the pre-configured QR code recognition task as the target identifier;

[0092] Sequentially concatenate the target domain name, the target identifier and the target task data to obtain the target URL;

[0093] The target QR code is generated according to the target URL.

[0094] The target identifier may be custom configured, such as / qr.

[0095] For example, when the target domain name is XXX.com / , the target identifier is / qr, and the target task number is base64(data), the generated target URL is: XXX.com / qr / base64(data). Further, the target QR code is generated according to the target URL.

[0096] It should be noted that the traditional way of expressing QR code data is to use business data as a parameter of the URL to achieve the transmission of business data.

[0097] For example, in a traditional way, the URL generated by the QR code can be expressed as: XXX.com / qr?key=xxxx, where key is the transmitted business data, such as the target task data.

[0098] Different from transmitting business data in the form of parameters, this embodiment encodes business data (such as the target task data) according to the format requirements of the URL, and then directly adds the encoded data to the URL path, thereby realizing the transmission of business data.

[0099] Further, determining whether the target QR code belongs to the current application according to the target URL includes:

[0100] Extract the target domain name from the target URL;

[0101] Determine the application to which the target QR code belongs according to the target domain name, and use it as the target application;

[0102] When the current application is different from the target application, determining that the target QR code does not belong to the current application; or

[0103] When the current application is the same as the target application, it is determined that the target two-dimensional code belongs to the current application.

[0104] In the above implementation, by performing domain name resolution on the target URL, the relationship between the target QR code and the application that scans the target QR code is determined, which facilitates subsequent targeted processing.

[0105] Further, the step of obtaining the address of the target page from the target URL and obtaining the task data to be executed includes:

[0106] Extract the target domain name and the target identifier from the target URL;

[0107] Concatenate the target domain name and the target identifier to obtain the address of the target page;

[0108] Extract the target task data from the target URL;

[0109] Base64 decoding is performed on the target task data to obtain the task data to be executed.

[0110] Continuing with the above example, when it is determined that the target QR code does not belong to the current application, the target domain name XXX.com / and the target identifier / qr are extracted from the target URL XXX.com / qr / base64(data). Further, the target domain name XXX.com / and the target identifier / qr are concatenated to obtain the address of the target page XXX.com / qr / . Since the page is generated, the QR code scan data will not be displayed in a garbled form, but can be jumped to the target page according to the address of the target page. The target task data base64(data) is further extracted from the target URL XXX.com / qr / base64(data), and the target task data base64(data) can be subsequently transferred to the target page at the same time. In this way, based on the special format of the target QR code, the target page and the target task data can be obtained by parsing, and a targeted response can be made on the target page according to the transferred target task data.

[0111] Through the above implementation, the target URL can be parsed to obtain the corresponding page address and task data, which is convenient for subsequent targeted response.

[0112] Furthermore, when the target two-dimensional code belongs to the current application, the method further includes:

[0113] Determining whether the target URL includes a preset identifier;

[0114] When the target URL includes the preset identifier, obtaining the task identifier and task information from the task data to be executed, and processing the task information according to the task identifier;

[0115] When the target URL does not include the preset identifier, determining whether the target URL is a preset URL;

[0116] When the target URL is the preset URL, executing the task corresponding to the preset URL;

[0117] When the target URL is not the preset URL, determining whether the target domain name is a preset domain name;

[0118] When the target domain name is the preset domain name, determining whether to load the target URL in the current application;

[0119] When the target domain name is not the preset domain name, determining whether the task data to be executed belongs to a preset task;

[0120] When the task data to be executed belongs to the preset task, loading the target URL according to the task parameters of the preset task;

[0121] When the task data to be executed does not belong to the preset task, obtaining a pre-configured domain name list, and determining whether the target domain name is in the domain name list;

[0122] When the target domain name is in the domain name list, loading the target URL in the current application;

[0123] When the target domain name is not in the domain name list, a prompt message is generated, where the prompt message is used to prompt that the recognition of the target QR code is abnormal.

[0124] In this embodiment, the preset identifier can be custom configured, and the URL with the preset identifier can directly execute the corresponding task.

[0125] The task identifier refers to a specific identification code of the task, which is used to locate the specific task.

[0126] The task information refers to the relevant data of the specific task to be executed.

[0127] In this embodiment, the preset URL refers to a specific URL, for example, for a preset NetLink QR code, there is a specific URL: XXX.com / . When the specific URL: XXX.com / corresponding to the preset NetLink QR code is determined, the corresponding cashier can be directly pulled up through the current application.

[0128] In this embodiment, the preset domain name may include a third-party domain name of a partner, such as a domain name of a third-party browser.

[0129] Specifically, when the target domain name is the preset domain name, determining whether to load the target URL in the current application includes:

[0130] Obtaining a configuration file of the current application, wherein the configuration file is used to store the host of the URL that can be loaded by the current application;

[0131] Get the host of the target URL as the target host;

[0132] Utilize the target host to query in the configuration file;

[0133] When the target host is found in the configuration file, the target URL is loaded in the current application.

[0134] The configuration file may be configured according to historical data and updated in real time according to new requirements.

[0135] In this embodiment, the preset tasks may include configured special tasks, such as payment services, etc.

[0136] For example: when the task data to be executed belongs to a preset payment service, the risk control parameters and the entry information of the payment service are transmitted to execute the payment service.

[0137] In this embodiment, the domain name list is similar to a white list, and the URLs corresponding to the domain names stored in the domain name list are trusted URLs and can be directly loaded without further identification and analysis.

[0138] For example, the WebView may be loaded directly in the current application according to the domain name and the business path in the target URL.

[0139] In this embodiment, the prompt information is used to prompt the user to identify the abnormality.

[0140] For example, the prompt information may include a preset prompt word and a character string of the target URL.

[0141] The prompt can be custom configured, such as "Sorry, the current QR code recognition is abnormal."

[0142] In the above implementation, judgment is performed step by step according to different priorities, which effectively improves the response efficiency of two-dimensional code recognition.

[0143] S14, connecting to the target page according to the address of the target page, and transferring the task data to be executed to the target page.

[0144] In this embodiment, after the task data to be executed is transferred to the target page, the display and jump mode of the target page can be further determined.

[0145] S15, determining an opening method of the target page according to the task data to be executed, and displaying the target page according to the opening method.

[0146] Specifically, determining the opening method of the target page according to the task data to be executed, and displaying the target page according to the opening method includes:

[0147] Obtain a list of permissions pre-configured for the current application;

[0148] When the task data to be executed is in the permission list, jump to the target application based on the target page, and process the task data to be executed in the target application; or

[0149] When the task data to be executed is not in the permission list, the download information of the target application is pushed to the target page.

[0150] In the above implementation, a QR code is generated based on a specific format. In this way, whether the QR code is recognized by an external application or an internal application, it will not respond in the form of garbled code, but will guide the user to perform further operations, thereby avoiding the situation where garbled code is displayed when the external application scans the QR code, causing the user to be unable to process and causing a break in the process.

[0151] It should be noted that in order to further improve the security of data and prevent data from being maliciously tampered with, the target QR code can be stored in a blockchain node.

[0152] It can be seen from the above technical scheme that the present invention can obtain the pre-configured data format and the data to be processed, and generate a target QR code according to the data format and the data to be processed. When a signal of scanning the target QR code through the current application is detected, the target QR code is parsed to obtain the target URL, and whether the target QR code belongs to the current application is determined according to the target URL. When the target QR code does not belong to the current application, the address of the target page is obtained from the target URL, and the task data to be executed is obtained, and the target page is connected to the target page according to the address of the target page, and the task data to be executed is transferred to the target page, and the opening method of the target page is determined according to the task data to be executed, and the target page is displayed according to the opening method, and the QR code is generated based on a specific format. In this way, whether the QR code is recognized by an external application or an internal application, it will not respond in the form of garbled code, but guide the user to perform further operations, so as to avoid the situation where garbled code is displayed due to the external application scanning the QR code, which makes the user unable to process and causes the process to be broken.

[0153] like Figure 2 , which is a functional module diagram of a preferred embodiment of a data processing device based on a two-dimensional code of the present invention. The data processing device 11 based on a two-dimensional code includes a generating unit 110, a parsing unit 111, a determining unit 112, an acquiring unit 113, a connecting unit 114, and a display unit 115. The module / unit referred to in the present invention refers to a series of computer program segments that can be executed by a processor 13 and can complete fixed functions, which are stored in a memory 12. In this embodiment, the functions of each module / unit will be described in detail in subsequent embodiments.

[0154] The generating unit 110 obtains a pre-configured data format and data to be processed, and generates a target two-dimensional code according to the data format and the data to be processed.

[0155] In this embodiment, the data format refers to the data format of the configured two-dimensional code.

[0156] For example: In most scenarios, the data format of the QR code is a string, such as mm01EFCB9727HHKJK.

[0157] When a signal of scanning the target two-dimensional code through the current application is detected, the parsing unit 111 parses the target two-dimensional code to obtain a target URL (Uniform Resource Locator).

[0158] In this embodiment, the current application may be any application. Specifically, the current application may be the application to which the target two-dimensional code belongs, or may be other third-party application that has no association with the target two-dimensional code.

[0159] Further, when a signal of scanning the target QR code through the current application is detected, the target URL can be directly obtained according to the information transmitted by the target QR code.

[0160] The determination unit 112 determines whether the target QR code belongs to the current application according to the target URL.

[0161] In this embodiment, the target URL stores the domain name of the application to which the target QR code belongs. The stored domain name can be used to further determine whether the target QR code belongs to the current application.

[0162] It should be noted that, depending on whether it belongs to the current application, the response method after scanning the target QR code will also be different.

[0163] When the target QR code does not belong to the current application, the acquisition unit 113 acquires the address of the target page from the target URL and acquires the task data to be executed.

[0164] In this embodiment, the target page may include an H5 (Html ​​5) page, which is pre-configured and used to display response data after scanning the target QR code.

[0165] Specifically, the address of the target page can be obtained by acquiring characters at a specified position from the target URL according to the data format of the target URL.

[0166] In at least one embodiment of the present invention, the generating unit 110 generates a target two-dimensional code according to the data format and the data to be processed, including:

[0167] Acquire, from the data to be processed, a domain name of an application to which the data to be processed belongs as a target domain name;

[0168] Acquire the task data to be executed from the data to be processed;

[0169] Perform Base64 encoding on the task data to be executed to obtain the target task data;

[0170] Obtain the identifier of the pre-configured QR code recognition task as the target identifier;

[0171] Sequentially concatenate the target domain name, the target identifier and the target task data to obtain the target URL;

[0172] The target QR code is generated according to the target URL.

[0173] The target identifier may be custom configured, such as / qr.

[0174] For example, when the target domain name is XXX.com / , the target identifier is / qr, and the target task number is base64(data), the generated target URL is: XXX.com / qr / base64(data). Further, the target QR code is generated according to the target URL.

[0175] It should be noted that the traditional way of expressing QR code data is to use business data as a parameter of the URL to achieve the transmission of business data.

[0176] For example, in a traditional way, the URL generated by the QR code can be expressed as: XXX.com / qr?key=xxxx, where key is the transmitted business data, such as the target task data.

[0177] Different from transmitting business data in the form of parameters, this embodiment encodes business data (such as the target task data) according to the format requirements of the URL, and then directly adds the encoded data to the URL path, thereby realizing the transmission of business data.

[0178] Further, the determining unit 112 determines whether the target QR code belongs to the current application according to the target URL, including:

[0179] Extract the target domain name from the target URL;

[0180] Determine the application to which the target QR code belongs according to the target domain name, and use it as the target application;

[0181] When the current application is different from the target application, determining that the target QR code does not belong to the current application; or

[0182] When the current application is the same as the target application, it is determined that the target two-dimensional code belongs to the current application.

[0183] In the above implementation, by performing domain name resolution on the target URL, the relationship between the target QR code and the application that scans the target QR code is determined, which facilitates subsequent targeted processing.

[0184] Furthermore, the acquisition unit 113 acquires the address of the target page from the target URL, and acquires the task data to be executed including:

[0185] Extract the target domain name and the target identifier from the target URL;

[0186] Concatenate the target domain name and the target identifier to obtain the address of the target page;

[0187] Extract the target task data from the target URL;

[0188] Base64 decoding is performed on the target task data to obtain the task data to be executed.

[0189] Continuing with the above example, when it is determined that the target QR code does not belong to the current application, the target domain name XXX.com / and the target identifier / qr are extracted from the target URL XXX.com / qr / base64(data). Further, the target domain name XXX.com / and the target identifier / qr are concatenated to obtain the address of the target page XXX.com / qr / . Since the page is generated, the QR code scan data will not be displayed in a garbled form, but can be jumped to the target page according to the address of the target page. The target task data base64(data) is further extracted from the target URL XXX.com / qr / base64(data), and the target task data base64(data) can be subsequently transferred to the target page at the same time. In this way, based on the special format of the target QR code, the target page and the target task data can be obtained by parsing, and a targeted response can be made on the target page according to the transferred target task data.

[0190] Through the above implementation, the target URL can be parsed to obtain the corresponding page address and task data, which is convenient for subsequent targeted response.

[0191] Further, when the target QR code belongs to the current application, determining whether the target URL includes a preset identifier;

[0192] When the target URL includes the preset identifier, obtaining the task identifier and task information from the task data to be executed, and processing the task information according to the task identifier;

[0193] When the target URL does not include the preset identifier, determining whether the target URL is a preset URL;

[0194] When the target URL is the preset URL, executing the task corresponding to the preset URL;

[0195] When the target URL is not the preset URL, determining whether the target domain name is a preset domain name;

[0196] When the target domain name is the preset domain name, determining whether to load the target URL in the current application;

[0197] When the target domain name is not the preset domain name, determining whether the task data to be executed belongs to a preset task;

[0198] When the task data to be executed belongs to the preset task, loading the target URL according to the task parameters of the preset task;

[0199] When the task data to be executed does not belong to the preset task, obtaining a pre-configured domain name list, and determining whether the target domain name is in the domain name list;

[0200] When the target domain name is in the domain name list, loading the target URL in the current application;

[0201] When the target domain name is not in the domain name list, a prompt message is generated, where the prompt message is used to prompt that the recognition of the target QR code is abnormal.

[0202] In this embodiment, the preset identifier can be custom configured, and the URL with the preset identifier can directly execute the corresponding task.

[0203] The task identifier refers to a specific identification code of the task, which is used to locate the specific task.

[0204] The task information refers to the relevant data of the specific task to be executed.

[0205] In this embodiment, the preset URL refers to a specific URL, for example, for a preset NetLink QR code, there is a specific URL: XXX.com / . When the specific URL: XXX.com / corresponding to the preset NetLink QR code is determined, the corresponding cashier can be directly pulled up through the current application.

[0206] In this embodiment, the preset domain name may include a third-party domain name of a partner, such as a domain name of a third-party browser.

[0207] Specifically, when the target domain name is the preset domain name, determining whether to load the target URL in the current application includes:

[0208] Obtaining a configuration file of the current application, wherein the configuration file is used to store the host of the URL that can be loaded by the current application;

[0209] Get the host of the target URL as the target host;

[0210] Utilize the target host to query in the configuration file;

[0211] When the target host is found in the configuration file, the target URL is loaded in the current application.

[0212] The configuration file may be configured according to historical data and updated in real time according to new requirements.

[0213] In this embodiment, the preset tasks may include configured special tasks, such as payment services, etc.

[0214] For example: when the task data to be executed belongs to a preset payment service, the risk control parameters and the entry information of the payment service are transmitted to execute the payment service.

[0215] In this embodiment, the domain name list is similar to a white list, and the URLs corresponding to the domain names stored in the domain name list are trusted URLs and can be directly loaded without further identification and analysis.

[0216] For example, the WebView may be loaded directly in the current application according to the domain name and the business path in the target URL.

[0217] In this embodiment, the prompt information is used to prompt the user to identify the abnormality.

[0218] For example, the prompt information may include a preset prompt word and a character string of the target URL.

[0219] The prompt can be custom configured, such as "Sorry, the current QR code recognition is abnormal."

[0220] In the above implementation, judgment is performed step by step according to different priorities, which effectively improves the response efficiency of two-dimensional code recognition.

[0221] The connection unit 114 connects to the target page according to the address of the target page, and transfers the task data to be executed to the target page.

[0222] In this embodiment, after the task data to be executed is transferred to the target page, the display and jump mode of the target page can be further determined.

[0223] The display unit 115 determines an opening mode of the target page according to the task data to be executed, and displays the target page according to the opening mode.

[0224] Specifically, the display unit 115 determines the opening mode of the target page according to the task data to be executed, and displays the target page according to the opening mode, including:

[0225] Obtain a list of permissions pre-configured for the current application;

[0226] When the task data to be executed is in the permission list, jump to the target application based on the target page, and process the task data to be executed in the target application; or

[0227] When the task data to be executed is not in the permission list, the download information of the target application is pushed to the target page.

[0228] In the above implementation, a QR code is generated based on a specific format. In this way, whether the QR code is recognized by an external application or an internal application, it will not respond in the form of garbled code, but will guide the user to perform further operations, thereby avoiding the situation where garbled code is displayed when the external application scans the QR code, causing the user to be unable to process and causing a break in the process.

[0229] It should be noted that in order to further improve the security of data and prevent data from being maliciously tampered with, the target QR code can be stored in a blockchain node.

[0230] It can be seen from the above technical scheme that the present invention can obtain the pre-configured data format and the data to be processed, and generate a target QR code according to the data format and the data to be processed. When a signal of scanning the target QR code through the current application is detected, the target QR code is parsed to obtain the target URL, and whether the target QR code belongs to the current application is determined according to the target URL. When the target QR code does not belong to the current application, the address of the target page is obtained from the target URL, and the task data to be executed is obtained, and the target page is connected to the target page according to the address of the target page, and the task data to be executed is transferred to the target page, and the opening method of the target page is determined according to the task data to be executed, and the target page is displayed according to the opening method, and the QR code is generated based on a specific format. In this way, whether the QR code is recognized by an external application or an internal application, it will not respond in the form of garbled code, but guide the user to perform further operations, so as to avoid the situation where garbled code is displayed due to the external application scanning the QR code, which makes the user unable to process and causes the process to be broken.

[0231] like Figure 3 , which is a schematic diagram of the structure of a computer device of a preferred embodiment of the present invention for implementing a data processing method based on a two-dimensional code.

[0232] The computer device 1 may include a memory 12 , a processor 13 , and a bus, and may also include a computer program stored in the memory 12 and executable on the processor 13 , such as a data processing program based on a QR code.

[0233] Those skilled in the art will appreciate that the schematic diagram is merely an example of the computer device 1 and does not constitute a limitation on the computer device 1. The computer device 1 may be a bus-type structure or a star-type structure. The computer device 1 may also include more or less other hardware or software than shown in the diagram, or a different arrangement of components. For example, the computer device 1 may also include input and output devices, network access devices, etc.

[0234] It should be noted that the computer device 1 is only an example, and other existing or future electronic products that are suitable for the present invention should also be included in the protection scope of the present invention and included here by reference.

[0235] The memory 12 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a magnetic memory, a disk, an optical disk, etc. In some embodiments, the memory 12 may be an internal storage unit of the computer device 1, such as a mobile hard disk of the computer device 1. In other embodiments, the memory 12 may also be an external storage device of the computer device 1, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the computer device 1. Further, the memory 12 may also include both an internal storage unit of the computer device 1 and an external storage device. The memory 12 may not only be used to store application software and various types of data installed in the computer device 1, such as the code of a data processing program based on a two-dimensional code, but may also be used to temporarily store data that has been output or is to be output.

[0236] In some embodiments, the processor 13 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips. The processor 13 is the control core (Control Unit) of the computer device 1, and uses various interfaces and lines to connect various components of the entire computer device 1, and executes various functions and processes data of the computer device 1 by running or executing programs or modules stored in the memory 12 (for example, executing a data processing program based on a QR code, etc.), and calling data stored in the memory 12.

[0237] The processor 13 executes the operating system of the computer device 1 and various installed applications. The processor 13 executes the applications to implement the steps in the above-mentioned various embodiments of the data processing method based on the two-dimensional code, for example Figure 1 Steps shown.

[0238] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory 12 and executed by the processor 13 to complete the present invention. The one or more modules / units may be a series of computer-readable instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program in the computer device 1. For example, the computer program may be divided into a generating unit 110, a parsing unit 111, a determining unit 112, an acquiring unit 113, a connecting unit 114, and a display unit 115.

[0239] The above-mentioned integrated unit implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, and includes a number of instructions for enabling a computer device (which can be a personal computer, a computer device, or a network device, etc.) or a processor to execute the part of the data processing method based on the two-dimensional code described in each embodiment of the present invention.

[0240] If the module / unit integrated in the computer device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware devices through a computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of each of the above-mentioned method embodiments can be implemented.

[0241] The computer program includes computer program code, which may be in source code form, object code form, executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory, etc.

[0242] Furthermore, the computer-readable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the blockchain node, etc.

[0243] The blockchain referred to in this invention is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the blockchain underlying platform, platform product service layer, and application service layer.

[0244] The bus can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 The bus is represented by only one straight line, but it does not mean that there is only one bus or one type of bus. The bus is configured to realize the connection and communication between the memory 12 and at least one processor 13, etc.

[0245] Although not shown, the computer device 1 may also include a power source (such as a battery) for supplying power to various components. Preferably, the power source may be logically connected to the at least one processor 13 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include any components such as one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, and power status indicators. The computer device 1 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.

[0246] Furthermore, the computer device 1 may also include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is usually used to establish a communication connection between the computer device 1 and other computer devices.

[0247] Optionally, the computer device 1 may further include a user interface, which may be a display, an input unit (such as a keyboard), or a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the computer device 1 and to display a visual user interface.

[0248] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.

[0249] Figure 3 Only the computer device 1 having components 12-13 is shown, and it can be understood by those skilled in the art that Figure 3 The structure shown does not constitute a limitation on the computer device 1, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.

[0250] Combination Figure 1 , the memory 12 in the computer device 1 stores a plurality of instructions to implement a data processing method based on a two-dimensional code, and the processor 13 can execute the plurality of instructions to implement:

[0251] Acquire a pre-configured data format and data to be processed, and generate a target QR code according to the data format and the data to be processed;

[0252] When a signal of scanning the target QR code through the current application is detected, the target QR code is parsed to obtain a target URL;

[0253] Determine whether the target QR code belongs to the current application according to the target URL;

[0254] When the target QR code does not belong to the current application, obtaining the address of the target page from the target URL and obtaining the task data to be executed;

[0255] Connecting to the target page according to the address of the target page, and transferring the task data to be executed to the target page;

[0256] The opening mode of the target page is determined according to the task data to be executed, and the target page is displayed according to the opening mode.

[0257] Specifically, the specific implementation method of the processor 13 for the above instructions can refer to Figure 1 The description of the relevant steps in the corresponding embodiments will not be repeated here.

[0258] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.

[0259] The present invention can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present invention can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present invention can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0260] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0261] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.

[0262] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0263] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.

[0264] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the present invention can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.

[0265] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.

Claims

1. A data processing method based on a two-dimensional code, characterized in that: The data processing method based on the two-dimensional code comprises: Acquire a pre-configured data format and data to be processed, and generate a target QR code according to the data format and the data to be processed; When a signal of scanning the target QR code through the current application is detected, the target QR code is parsed to obtain a target URL; Determine whether the target QR code belongs to the current application according to the target URL; When the target QR code does not belong to the current application, obtaining the address of the target page from the target URL and obtaining the task data to be executed; Connecting to the target page according to the address of the target page, and transferring the task data to be executed to the target page; Determining an opening method of the target page according to the task data to be executed, and displaying the target page according to the opening method; When the target QR code belongs to the current application, determining whether the target URL includes a preset identifier; When the target URL includes the preset identifier, obtaining the task identifier and task information from the task data to be executed, and processing the task information according to the task identifier; When the target URL does not include the preset identifier, determining whether the target URL is a preset URL; When the target URL is the preset URL, executing the task corresponding to the preset URL; When the target URL is not the preset URL, determining whether the target domain name is a preset domain name; When the target domain name is the preset domain name, determining whether to load the target URL in the current application; When the target domain name is not the preset domain name, determining whether the task data to be executed belongs to a preset task; When the task data to be executed belongs to the preset task, loading the target URL according to the task parameters of the preset task; When the task data to be executed does not belong to the preset task, obtaining a pre-configured domain name list, and determining whether the target domain name is in the domain name list; When the target domain name is in the domain name list, loading the target URL in the current application; When the target domain name is not in the domain name list, a prompt message is generated, wherein the prompt message is used to prompt that the recognition of the target QR code is abnormal; When the target domain name is the preset domain name, determining whether to load the target URL in the current application includes: Obtaining a configuration file of the current application, wherein the configuration file is used to store the host of the URL that can be loaded by the current application; Get the host of the target URL as the target host; Utilize the target host to query in the configuration file; When the target host is found in the configuration file, the target URL is loaded in the current application.

2. The data processing method based on a two-dimensional code according to claim 1, characterized in that: Generating a target two-dimensional code according to the data format and the data to be processed includes: Acquire, from the data to be processed, a domain name of an application to which the data to be processed belongs as a target domain name; Acquire the task data to be executed from the data to be processed; Perform Base64 encoding on the task data to be executed to obtain target task data; Obtain the identifier of the pre-configured QR code recognition task as the target identifier; Sequentially concatenate the target domain name, the target identifier and the target task data to obtain the target URL; The target QR code is generated according to the target URL.

3. The data processing method based on a two-dimensional code according to claim 2, characterized in that: Determining whether the target QR code belongs to the current application according to the target URL includes: Extract the target domain name from the target URL; Determine the application to which the target QR code belongs according to the target domain name, and use it as the target application; When the current application is different from the target application, determining that the target QR code does not belong to the current application; or When the current application is the same as the target application, it is determined that the target two-dimensional code belongs to the current application.

4. The data processing method based on a two-dimensional code according to claim 2, characterized in that: The step of obtaining the address of the target page from the target URL and obtaining the task data to be executed includes: Extract the target domain name and the target identifier from the target URL; Concatenate the target domain name and the target identifier to obtain the address of the target page; Extract the target task data from the target URL; Base64 decoding is performed on the target task data to obtain the task data to be executed.

5. The data processing method based on a two-dimensional code according to claim 3, characterized in that: Determining the opening mode of the target page according to the task data to be executed, and displaying the target page according to the opening mode includes: Obtain a list of permissions pre-configured for the current application; When the task data to be executed is in the permission list, jump to the target application based on the target page, and process the task data to be executed in the target application; or When the task data to be executed is not in the permission list, the download information of the target application is pushed to the target page.

6. A data processing device based on a two-dimensional code, characterized in that: The data processing device based on the two-dimensional code comprises: A generating unit, used for acquiring a pre-configured data format and data to be processed, and generating a target two-dimensional code according to the data format and the data to be processed; A parsing unit, configured to parse the target QR code to obtain a target URL when a signal of scanning the target QR code through the current application is detected; A determination unit, configured to determine whether the target QR code belongs to the current application according to the target URL; an acquisition unit, configured to acquire the address of a target page from the target URL and acquire task data to be executed when the target QR code does not belong to the current application; A connection unit, used to connect to the target page according to the address of the target page, and transfer the task data to be executed to the target page; A display unit, used to determine an opening mode of the target page according to the task data to be executed, and display the target page according to the opening mode; When the target QR code belongs to the current application, determining whether the target URL includes a preset identifier; When the target URL includes the preset identifier, obtaining the task identifier and task information from the task data to be executed, and processing the task information according to the task identifier; When the target URL does not include the preset identifier, determining whether the target URL is a preset URL; When the target URL is the preset URL, executing the task corresponding to the preset URL; When the target URL is not the preset URL, determining whether the target domain name is a preset domain name; When the target domain name is the preset domain name, determining whether to load the target URL in the current application; When the target domain name is not the preset domain name, determining whether the task data to be executed belongs to a preset task; When the task data to be executed belongs to the preset task, loading the target URL according to the task parameters of the preset task; When the task data to be executed does not belong to the preset task, obtaining a pre-configured domain name list, and determining whether the target domain name is in the domain name list; When the target domain name is in the domain name list, loading the target URL in the current application; When the target domain name is not in the domain name list, a prompt message is generated, wherein the prompt message is used to prompt that the recognition of the target QR code is abnormal; When the target domain name is the preset domain name, determining whether to load the target URL in the current application includes: Obtaining a configuration file of the current application, wherein the configuration file is used to store the host of the URL that can be loaded by the current application; Get the host of the target URL as the target host; Utilize the target host to query in the configuration file; When the target host is found in the configuration file, the target URL is loaded in the current application.

7. A computer device, characterized in that: The computer device comprises: a memory storing at least one instruction; and A processor executes instructions stored in the memory to implement the data processing method based on the two-dimensional code as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one instruction, and the at least one instruction is executed by a processor in a computer device to implement the data processing method based on a two-dimensional code as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Bar code scanning method and system

    CN106649437A