Disclosure of Invention
In order to automatically convert various types of cards into corresponding standards and forms under the trend of intelligent operation, and facilitate management of the cards, the application provides a card conversion method and system based on digital rights.
The card conversion method and the card conversion system based on the digital rights adopt the following technical scheme:
in a first aspect, the present application provides a digital rights based method of converting a card ticket, comprising the steps of:
responding to a card information identification request sent by a user through an intelligent terminal, wherein the card information identification request carries card identification information for entering an identification entrance;
according to the card identification information, calling card key information;
obtaining card type information corresponding to the card key information from a preset database, wherein the card type information comprises a specific card representation type which corresponds to the current card and is required by a merchant to verify the card;
generating a card conversion instruction according to the card type information and executing the card conversion instruction, wherein the card conversion instruction is used for converting a card into a corresponding card display form, and the card display form comprises a two-dimensional code, a bar code, a card number, a password plaintext or a link;
pushing the card ticket display form to the intelligent terminal of the user.
Further, the step of generating and executing the instruction for converting the card ticket specifically includes:
according to the information of the type of the card ticket, calling structured data JSON from a preset database;
defining JSON data in a unified format according to the structured data JSON and the card type information;
defining JSON data according to the type information and format of the card, dynamically generating unique parameters and embedding the unique parameters into the JSON data;
and generating and executing an analysis instruction according to the JSON data, wherein the analysis instruction is used for judging the type of the card ticket according to specific application scenes and business requirements and correspondingly generating a supported display mode.
Further, before the step of generating and executing the instruction for converting the card ticket, the method further comprises:
responding to a manual conversion request of the card sent by a user through an intelligent terminal, wherein the manual conversion request of the card carries card conversion information for carrying out card conversion;
and executing the steps of generating the card conversion instruction and executing according to the card conversion information.
In a second aspect, the present application provides a digital rights based coupon conversion system comprising:
the card information identification request response module is used for responding to a card information identification request sent by a user through the intelligent terminal, wherein the card information identification request carries card identification information for entering an identification entrance;
the card key information calling module is used for calling card key information according to the card identification information;
the card type information acquisition module is used for acquiring card type information corresponding to the card key information from a preset database, wherein the card type information comprises a merchant for using corresponding to the current card and a specific card representation type required by the merchant for verifying the card;
the card conversion instruction generation module is used for generating and executing a card conversion instruction according to the card type information, wherein the card conversion instruction is used for converting a card into a corresponding card display form, and the card display form comprises a two-dimensional code, a bar code, a card number, a password plaintext or a link;
and the card display form pushing module is used for pushing the card display form to the intelligent terminal of the user.
In a third aspect, the present application provides an intelligent terminal comprising a memory and a processor, wherein the memory stores a computer program capable of being loaded by the processor and executing a digital rights based card conversion method as described above.
In a fourth aspect, the present application provides a computer readable storage medium storing a computer program capable of being loaded by a processor and performing a digital rights based coupon conversion method as described above.
In summary, compared with the prior art, the beneficial effects of the technical scheme are as follows:
after a card information identification request of a user is obtained, according to the identification information of a current card, key information of the card is called, and a specific card representation type which corresponds to the current card and is required by a merchant for verifying the card is queried from a preset database; according to the required use form of the card, the card is automatically converted into a corresponding card display form and pushed to the intelligent terminal of the user for storage, so that the subsequent card is convenient to use.
The unified card form can be automatically realized through the service provided by the card conversion system under the condition of not increasing personnel and technical investment, the operation is simple and convenient, and the user experience can be effectively improved. Under the trend of intelligent operation, the platform and merchants depending on the platform can automatically convert various types of cards into corresponding standards and forms, and the cards are convenient to manage, so that the operation target is realized.
Detailed Description
The present application is described in further detail below with reference to the accompanying drawings.
The embodiment of the application discloses a card conversion method and a system based on digital rights, and referring to fig. 1, the card conversion method based on digital rights comprises the following steps:
s101, responding to a card information identification request sent by a user through the intelligent terminal.
Specifically, the card information conversion system responds to a card information identification request sent by a user through the intelligent terminal, wherein the card information identification request carries card identification information for entering an identification entrance, and the card identification information comprises a card unique code.
S102, calling the key information of the card.
Specifically, the card key information is called by the card conversion system according to the card identification information, and the card key information comprises information such as the card number and the card secret of the card, so that the card number and the password of the card are known by the system for subsequent operation. The card conversion system files the extracted data, so that the integrity of data storage and easy reading of the data are ensured.
S103, acquiring the card type information corresponding to the card key information from a preset database.
Specifically, the card conversion system acquires card type information corresponding to the card key information from a preset database, wherein the card type information comprises a merchant for using corresponding to the current card and a specific card representation type required by the merchant for verifying the card.
S104, generating a card conversion instruction and executing the card conversion instruction.
Specifically, the card conversion system generates and executes a card conversion instruction according to the card type information, wherein the card conversion instruction is used for converting a card into a corresponding card display form, and the card display form comprises a two-dimensional code, a bar code, a card number, a password plaintext or a link.
S105, pushing the card ticket display form to the intelligent terminal of the user.
Specifically, after the card conversion system converts the card into the corresponding card display form, the card display form is pushed to the intelligent terminal of the user.
In another embodiment, referring to fig. 2, S104 specifically includes the following sub-steps:
s104.1, calling the structured data JSON from a preset database.
Specifically, the card conversion system calls structured data JSON from a preset database according to the card type information so as to encode the identified card key information.
S104.2, defining JSON data in a unified format.
JSON (JavaScript Object Notation, JS object profile) is a lightweight data exchange format. It stores and presents data in a text format that is completely independent of the programming language based on a subset of ECMAScript (European Computer Manufacturers Association, js specification by the european computer institute)
Specifically, the coupon conversion system defines JSON data in a unified format according to the structured data JSON and the coupon type information. Data is often required to be transmitted during network communication, and JSON is a common data format. Cocos2d-x provides support for parsing JSON data formats, mainly: JOSN data parsing.
S104.3, dynamically generating unique parameters and embedding the unique parameters into the JSON data.
Specifically, the JOSN data analysis process comprises the following steps: firstly, creating a JSON file, then, including document.h and cos-ext.h header files in the class, then, obtaining a JSON file path through FileUtils, analyzing JSON data through Document objects, and finally, obtaining data values of different types.
And the card conversion system defines JSON data according to the card type information and the format, dynamically generates unique parameters and embeds the unique parameters into the JSON data, ensures the uniqueness of each card and is convenient for data receiving and data processing.
S104.4, generating and executing an analysis instruction.
Specifically, the coupon conversion system generates and executes an analysis instruction according to the JSON data, wherein the analysis instruction is used for judging the type of the coupon according to specific application scenes and business requirements and correspondingly generating a supported display mode.
For example, a card contains the following key information: type, value, expiration date, usage conditions, etc., by encoding these information using JSON format, defining the relevant information of the ticket with JSON format, and adding a dynamically generated unique parameter uniqueID.
Then, the JSON data is analyzed, and the type of the card and the supported display mode can be judged according to specific application scenes and service requirements. The display form is a two-dimensional code or bar code card, and the dynamically generated JSON data can be converted into corresponding code pictures for display by using an open-source two-dimensional code/bar code generation library; for other types of coupons, the presentation may be presented directly in text form.
Referring to fig. 3, S104 further generates a card conversion instruction according to the card manual conversion request, specifically including the following steps:
s201, responding to a manual conversion request of the card ticket sent by the user through the intelligent terminal.
Specifically, the card manual conversion request carries card conversion information for performing card conversion in response to a card manual conversion request sent by a user through the intelligent terminal.
S202, executing the steps of generating the card conversion instruction and executing the card conversion instruction.
Specifically, the card conversion system executes the steps of generating the card conversion instruction and executing the card conversion instruction according to the card conversion information. In order to improve the user experience, the display form of the card is supported to be manually converted by the user. For example, the user can choose to display a certain card in the form of a two-dimensional code on the application interface, and the system can convert JSON data into two-dimensional code pictures and display the two-dimensional code pictures to the user by using a corresponding library according to the selection of the user.
The implementation principle of the card conversion method based on digital rights in the embodiment of the application is as follows: after a card information identification request of a user is obtained, according to the identification information of a current card, key information of the card is called, and a specific card representation type which corresponds to the current card and is required by a merchant for verifying the card is queried from a preset database; according to the required use form of the card, the card is automatically converted into a corresponding card display form and pushed to the intelligent terminal of the user for storage, so that the subsequent card is convenient to use.
The unified card form can be automatically realized through the service provided by the card conversion system under the condition of not increasing personnel and technical investment, the operation is simple and convenient, and the user experience can be effectively improved. Under the trend of intelligent operation, the platform and merchants depending on the platform can automatically convert various types of cards into corresponding standards and forms, and the cards are convenient to manage, so that the operation target is realized.
Based on the method, the embodiment of the application also discloses a card conversion system based on digital rights.
Referring to fig. 4, a digital rights based coupon conversion system comprising:
the card information identification request response module 1 is used for responding to a card information identification request sent by a user through the intelligent terminal, wherein the card information identification request carries card identification information for entering an identification entrance;
the card key information calling module 2 is used for calling card key information according to the card identification information;
the card type information acquisition module 3 is used for acquiring card type information corresponding to the card key information from a preset database, wherein the card type information comprises a specific card representation type which corresponds to the current card and is required by a merchant to verify the card;
the card conversion instruction generation module 4 is used for generating and executing a card conversion instruction according to the card type information, wherein the card conversion instruction is used for converting a card into a corresponding card display form, and the card display form comprises a two-dimensional code, a bar code, a card number, a password plaintext or a link;
the card display form pushing module 5 is used for pushing the card display form to the intelligent terminal of the user.
The embodiment of the application also discloses an intelligent terminal which comprises a memory and a processor, wherein the memory stores a computer program which can be loaded by the processor and execute the card conversion method based on digital rights.
The embodiment of the application also discloses a computer readable storage medium. A computer-readable storage medium has stored therein a computer program that can be loaded by a processor and that performs a digital rights based coupon conversion method as described above, the computer-readable storage medium comprising, for example: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the scope of the present invention. It will be apparent that the described embodiments are merely some, but not all, embodiments of the invention. Based on these embodiments, all other embodiments that may be obtained by one of ordinary skill in the art without inventive effort are within the scope of the invention. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art may still combine, add or delete features of the embodiments of the present invention or make other adjustments according to circumstances without any conflict, so as to obtain different technical solutions without substantially departing from the spirit of the present invention, which also falls within the scope of the present invention.