CN108510296B - Service function starting and processing method, client and server - Google Patents

Service function starting and processing method, client and server Download PDF

Info

Publication number
CN108510296B
CN108510296B CN201710110259.5A CN201710110259A CN108510296B CN 108510296 B CN108510296 B CN 108510296B CN 201710110259 A CN201710110259 A CN 201710110259A CN 108510296 B CN108510296 B CN 108510296B
Authority
CN
China
Prior art keywords
identification code
image
verification
business object
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710110259.5A
Other languages
Chinese (zh)
Other versions
CN108510296A (en
Inventor
张超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201710110259.5A priority Critical patent/CN108510296B/en
Publication of CN108510296A publication Critical patent/CN108510296A/en
Application granted granted Critical
Publication of CN108510296B publication Critical patent/CN108510296B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0207Discounts or incentives, e.g. coupons or rebates
    • G06Q30/0212Chance discounts or incentives
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K17/00Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations
    • G06K17/0022Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations arrangements or provisious for transferring data to distant stations, e.g. from a sensing device
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0207Discounts or incentives, e.g. coupons or rebates
    • G06Q30/0222During e-commerce, i.e. online transactions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0207Discounts or incentives, e.g. coupons or rebates
    • G06Q30/0234Rebates after completed purchase

Abstract

The embodiment of the application discloses a method for starting and processing a business function, a client and a server, wherein the method provides a business object with an identification code graph on the surface, and the method comprises the following steps: capturing an image of the business object; the image comprises an identification code graph; the identification code graph carries an identification code; the identification code points to an appointed service function, and the appointed service function is bound with the service object; issuing an authentication request accompanied with authentication data to a server, the authentication data representing the image for enabling execution of the designated business function pointed to by the identification code when the authentication data passes verification of an authentication rule of the business object. The method for starting and processing the service function, the client and the server provided by the embodiment of the application can provide corresponding resources for the user who purchases the service object under the condition of not shielding the identification code, so that the manufacturing process of the service object package is simplified.

Description

Service function starting and processing method, client and server
Technical Field
The present application relates to the field of network communication technologies, and in particular, to a method for starting and processing a service function, a client, and a server.
Background
Currently, many merchants often provide a portion of the resources to users who purchase business objects in order to increase sales and awareness of the business objects. For example, the merchant may return a certain amount of cash or provide a coupon for a repurchase to the user who purchased the business object. With the continuous development of network communication technology and intelligent terminals, merchants can add identification codes to packages of business objects, and users who purchase the business objects can acquire corresponding resources through the identification codes. The identification code can be a two-dimensional code, a bar code or a serial number printed on the business object package. After the user purchases the service object, the identification code is scanned or input on the intelligent terminal, so that the corresponding cash back or the coupon can be obtained.
Currently, in order to ensure that the user can only enjoy the corresponding resources after purchasing the business object, the merchant usually prints the identification code in a concealed location. For example, the identification code may be printed on the back of the tab, the cap, the wrapper. The identification code of the business object can be obtained only after the user purchases the business object and pulls open the pull-out, opens the bottle cap or tears the wrapping paper. However, sometimes, because the position of the identification code is too hidden, the user may ignore the identification code or the process of obtaining the identification code by the user is laborious, so that the identification code cannot generate due popularization effect. If the identification code is directly printed at the conspicuous position on the business object, the corresponding resource may be already picked up when the business object is not sold, and the user who really purchases the business object cannot acquire the corresponding resource.
As can be seen from the above, the method for obtaining resources only by verifying the identification code in the prior art usually has a strict requirement on the position of the identification code, which may limit the manufacturing process of the business object package to a certain extent, thereby increasing the manufacturing cost of the business object.
Disclosure of Invention
The embodiment of the application aims to provide a method for starting and processing a business function, a client and a server, which can provide corresponding resources for a user who purchases a business object under the condition of not shielding an identification code, so that the manufacturing process of a business object package is simplified.
In order to achieve the above object, an embodiment of the present application provides a method for starting a service function, which provides a service object, where a surface of the service object has an identification code pattern; the method comprises the following steps: capturing an image of the business object; the image comprises an identification code graph; the identification code graph carries an identification code; the identification code points to an appointed service function, and the appointed service function is bound with the service object; and sending an authentication request with authentication data to a server, wherein the authentication data represents the image, so that when the authentication data passes the verification of the authentication rule corresponding to the business object, the server starts to execute the specified business function pointed by the identification code.
To achieve the above object, an embodiment of the present application further provides a client, where the client includes a network communication port, a memory, and a processor, where: the network communication port is used for carrying out network data communication with the server; the memory for storing a computer program executable by the processor; the processor, when executing the computer program, may implement the following functions: taking an image of a business object; the image comprises an identification code graph; the identification code graph carries an identification code; the identification code points to an appointed service function, and the appointed service function is bound with the service object; and sending an authentication request with authentication data to a server, wherein the authentication data represents the image, so that when the authentication data passes the verification of the authentication rule corresponding to the business object, the server starts to execute the specified business function pointed by the identification code.
In order to achieve the above object, an embodiment of the present application further provides a method for processing a service function, where the method includes: receiving a verification request provided by a client; wherein the authentication request includes authentication data representing an image; the image is used for representing a business object; acquiring an identification code of the business object based on the verification request; the identification code points to an appointed service function, and the appointed service function is bound with the service object; sending the verification data to a verification server for the verification server to verify the verification data according to a verification rule corresponding to the business object; the verification rule is used for limiting the business object represented by the image to be in a specified state; receiving verification result information fed back by the verification server; and when the verification result information is that the verification is passed, executing the appointed service function pointed by the identification code.
In order to achieve the above object, an embodiment of the present application further provides a method for processing a service function, including: receiving a verification request provided by a client; wherein the authentication request includes authentication data representing an image; the image is used for representing a business object; acquiring an identification code of the business object based on the verification request; the identification code points to an appointed service function, and the appointed service function is bound with the service object; verifying the verification data according to the verification rule of the business object; wherein the validation rule is used for limiting the business object represented by the image to be in a specified state; and when the verification is passed, executing the designated service function pointed by the identification code.
To achieve the above object, an embodiment of the present application further provides a server, which includes a network communication port, a memory, and a processor, wherein: the network communication port is used for carrying out network data communication with a client; the memory for storing a computer program executable by the processor; the processor, when executing the computer program, is capable of implementing the following functions: receiving a verification request provided by a client; wherein the authentication request includes authentication data representing an image; the image is used for representing a business object; acquiring an identification code of the business object based on the verification request; the identification code points to an appointed service function, and the appointed service function is bound with the service object; verifying the verification data according to the verification rule of the business object; wherein the validation rule is used for limiting the business object represented by the image to be in a specified state; and when the verification is passed, executing the designated service function pointed by the identification code.
According to the technical scheme provided by the embodiment of the application, when the identification code is verified, the image of the business object needs to be further verified. The image of the business object may show the current state of the business object. The current state may be, for example, a state in which a bottle cap is opened, a straw is inserted, or the like. The authentication is passed only if the current state is in accordance with the state specified by the authentication rule and the authenticated identification code is valid, so that the assigned service function pointed to by the identification code can be executed. Therefore, the method and the device can correctly provide corresponding resources for the user who purchases the business object under the condition of not shielding the identification code by further verifying the business object image, thereby simplifying the manufacturing process of the business object package.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a method for starting a service function according to an embodiment of the present application;
FIG. 2 is a flow chart illustrating generation of verification data according to an embodiment of the present disclosure;
fig. 3 is an interaction diagram of a method for starting a service function according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a client according to an embodiment of the present disclosure;
fig. 5 is a flowchart of a method for processing a service function according to an embodiment of the present disclosure;
FIG. 6 is a flow chart illustrating data verification according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of a server according to an embodiment of the present disclosure;
FIG. 8 is a schematic interface diagram of a prompt message according to an embodiment of the present disclosure;
fig. 9 is a schematic interface diagram of verification passing in the embodiment of the present application.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art without any inventive work based on the embodiments in the present application shall fall within the scope of protection of the present application.
The embodiment of the application provides a method for starting a service function. The method can be applied to the system architecture of the client and the server. The client may be an electronic device for acquiring the identification code and the business object image. Specifically, the client may be, for example, a desktop computer, a tablet computer, a notebook computer, a smart phone, a digital assistant, a smart wearable device, a shopping guide terminal, a smart television, and the like, which have a camera function or a picture importing function. Alternatively, the client may be software capable of running in the electronic device. Specifically, the client may be identification code scanning software in the electronic device. The identification code scanning software can call a camera of the electronic equipment to scan an identification code graph printed on the service object package. The identification code scanning software may also receive an identification code entered by a user. The identification code scanning software may also capture an image of a scene containing the identification code pattern or the identification code while scanning the identification code pattern or receiving the identification code.
In this embodiment, the business object may be a physical entity with an identification code graphic on the surface. For example, the business object may be a product such as a packing box (bottle), a packing bag, a ticket, a book, a tape, etc. printed with an identification code figure. The business object can have different forms according to different use cases. For example, when the bottle is not used, it can have the form: the bottle cap is intact and fixed on the bottle body. And when the bottle is used, it can have the following forms: the bottle body is not provided with a bottle cap. For another example, when the ticket is not used, the form of the ticket may be: the entrance ticket auxiliary link is fixed with the entrance ticket body. After the ticket is used, the form of the ticket can be as follows: the entrance ticket body is not provided with an auxiliary entrance ticket link. In this way, by identifying the form currently possessed by the business object, it is possible to determine whether or not the business object is currently used.
In this embodiment, the server may be an electronic device having data operation, storage function and network interaction function; software may also be provided that runs in the electronic device to support data processing, storage, and network interaction.
The number of servers is not particularly limited in the present embodiment. The server may be one server, several servers, or a server cluster formed by several servers.
In this embodiment, the server may be a service server corresponding to each service object, and the service server may store data related to the service object. For example, the model of the service object, the identification code corresponding to the service object, the image data of the service object in different states, and the like may be stored in the service server.
Of course, the server may also be a transit server between the client and the service server of the service object. The relay server can store the association relationship between the identification code and the service object, so that when the relay server receives the verification data sent by the client, the relay server can determine which service object the current verification data is for according to the identification code in the verification data, and can forward the verification data to the corresponding service server according to an interface provided by the service server in advance.
In this embodiment, the server and the client may perform data interaction via the internet. For example, the client may send validation data of the business object to the server, and the server may validate the received validation data and perform the corresponding designated business function when the validation is passed.
Referring to fig. 1 and fig. 3, the method for starting the service function according to the embodiment of the present application may include the following steps, and the execution subjects of the following steps may be clients.
Step S11: capturing an image of the business object; the image comprises an identification code graph; the identification code graph carries an identification code; the identification code points to an assigned business function, and the assigned business function is bound with the business object.
In this embodiment, the identification code pattern may be a pattern that can be recognized, such as a two-dimensional code, a barcode, and a serial number, printed on the business object to identify the business object. The identification code graph can carry identification codes. The identification code may be a character string obtained by analyzing according to the identification code graph. In particular, the identification code may point to a specific business function. In this embodiment, the specified business function may be an operation instruction preset by a business object. For example, the operation instruction may be red packet cashback, return of a discount activation code, adding a score in an account of the user, and the like. The identification code pointing to a designated service function may indicate that the corresponding designated service function can be determined by the identification code.
In this embodiment, the specified service function may be bound to the service object. The binding of the specified business function with the business object may mean that the specified business function can be executed only when the business object is in a specified state. For example, the designated business function may be performed with the business object in a state where the cap is opened.
In this embodiment, the identification code may be a unique code that is not duplicated with other identification codes. In the server, a designated service function pointed to and a service object bound to the designated service function may be configured for the unique code in advance. For example, the identification code is '123', the designated service function pointed by the identification code may be issuing a 2-element red packet, and the designated service function issuing the 2-element red packet may be bound with the mongolian cow packaged milk, and the function issuing the red packet may be executed only when a bottle cap of the mongolian cow packaged milk is opened.
In this embodiment, the manner of capturing the image of the business object may be to scan the identification code pattern through a camera of the client. In particular, in the interface of the client, a defined area of the identification code may be displayed. The user may enable the position at which the identification code graphic is displayed in the interface of the client to be adapted to the defined area by moving the relative position between the client and the identification code graphic. When the position of the identification code graph displayed in the interface of the client side is matched with the defined area, the client side can automatically shoot the image containing the identification code graph, so that the image of the business object can be shot.
Step S13: issuing an authentication request accompanied with authentication data to a server, the authentication data representing the image for enabling execution of the designated business function pointed to by the identification code when the authentication data passes verification of an authentication rule of the business object.
In this embodiment, after the image of the business object is captured, an authentication request may be sent to a server. The server may be the service server or the relay server.
In this embodiment, the verification request may be a character string written according to a preset rule. The preset rules may specify the components in the string and the ordering of the components. The preset rule may be predefined in a communication protocol between the client and the server. The communication protocol may be, for example, an http protocol, an FTP protocol, a TCP protocol, a UDP protocol, or the like. For example, the authentication request may include a source IP address, a destination IP address, authentication data representing the image, and the like. Wherein the source IP address may be an IP address of the client sending the authentication request in the network. The destination IP address may then be the IP address in the network of the server receiving the authentication request.
In this embodiment, the verification data may have a plurality of expressions. Specifically, the verification data may be the captured image itself. After the client captures the image of the business object, the captured image can be sent to the server.
Furthermore, the verification data may be a feature vector extracted from a captured image. Specifically, each image may be composed of a plurality of pixel points, and in this embodiment, the pixel values at each pixel point may be arranged according to a preset sequence, so as to form a pixel value vector corresponding to the image, and the pixel value vector may be used as a feature vector of the image. In the present embodiment, the pixel value may be an RGB (Red, Green, Blue, Red, Green, Blue) value at each pixel point. Generally, the RGB values may range from 0 to 255, so that each pixel is represented by an integer with a value in the range of 0 to 255. For example, such a feature vector (10, 2, 255, 168, 122, 13, 0, 158, 9) can be obtained by arranging RGB values of respective pixel points in order from left to right and from top to bottom. Of course, the pixel values may take different values depending on the color mode used for the image, in addition to the RGB values. For example, the pixel value may also be an HSL (hue, saturation, brightness) value or a CIE Lab value or the like.
It should be noted that the feature vector extracted from the captured image may also be represented in other forms. Specifically, the feature vector may also be extracted through a Convolutional Neural Network (CNN), a Haar-like rectangular feature, and an LBP (Local Binary Pattern).
In this embodiment, the business object may correspond to a validation rule. The validation rules may be used to define that a business object of the image representation is in a specified state. For example, the validation rule may define that the business object is in a state that a bottle cap is unscrewed or in a state that a straw is inserted, and the like. In this embodiment, the validation rules corresponding to different business objects may also be different. For example, for a bottled business object, the corresponding validation rule may define that the business object is in a state that the bottle cap is twisted open; for boxed business objects, the corresponding validation rules can limit the business objects in the state of straw insertion.
In this embodiment, the business object corresponding to the validation rule may mean that there is an association relationship between the business object and the validation rule. The association between the business object and the validation rule may be stored in a server. Specifically, the association relationship may be pre-edited and kept updated in the server by the business of the business object. For example, in the case of a box-packed chewing gum, the manufacturer of the service object may write in advance a verification rule of the box-packed chewing gum in the database of the server as a state where the cap is opened.
In this embodiment, the verification rule may be set in advance in the server. Specifically, an image sample corresponding to the validation rule may be stored in the server, and the specified state of the business object may be displayed in the image sample. For example, the image sample may be boxed milk with a bottle cap unscrewed. Of course, it is also possible that not the image samples but feature vectors characterizing the image samples are stored in the server.
In this embodiment, when receiving a verification request, the server may verify the verification data in the verification request according to the verification rule of the business object. In particular, the server may calculate a similarity coefficient between the validation data and the image sample. The similarity coefficient may be determined by a hamming distance or a correlation coefficient. In the present embodiment, after obtaining the parameter such as the hamming distance or the correlation coefficient that can represent the degree of similarity between the verification data and the image sample, a parameter threshold value for determining whether the verification is passed may be set. And judging whether the verification is passed or not according to the comparison result between the calculated parameter and the parameter threshold value. Specifically, when the calculated parameter is a hamming distance, if the calculated hamming distance is less than or equal to a parameter threshold, it may indicate that the verification data and the image sample are similar and can pass the verification, and otherwise, the verification cannot pass. When the calculated parameter is a correlation coefficient, if the calculated correlation coefficient is greater than or equal to a parameter threshold, it may indicate that the verification data and the image sample are similar and can pass the verification, and otherwise, the verification cannot pass.
In the embodiment, when the verification data is verified by the server, the verification data is indicated to be in accordance with the verification rule, so that the specified service function pointed by the identification code can be executed.
In this embodiment, the specified business function may be an operation instruction preset by a business object. For example, the operation instruction may be red packet cashback, return of a discount activation code, adding a score in an account of the user, and the like. The specified business function may be performed by a server and corresponding results generated.
In this embodiment, after executing the designated service function pointed by the identification code, the server may generate execution result information and feed back the execution result information to the client. Resources such as cashback red packets, coupons, activation codes, etc. may be included in the execution result information. For example, the identification code points to the designated service function as cashback 2-ary. Then after the server verifies the received verification data, a 2-dollar cash red envelope may be generated and fed back to the client. Here, the 2-member cash red package may be included in the execution result information so that the client may withdraw the 2-member cash red package therefrom after receiving the execution result information.
In this embodiment, the execution result information may be data written according to a specified rule. The specified rules may be specified by a communication protocol between the server and the client. Specifically, the specifying rule may define each component in the execution result information and an arrangement order of each component. For example, in the execution result information, a body field may be included. The body field may fill a virtual resource corresponding to the specified service function after execution. For example, the body field may be populated with 2-element electronic tickets, activation codes, serial numbers, coupons, and other virtual resources. Thus, after the client receives the execution result information, the virtual resources can be identified from the body field, and the identified virtual resources are merged into the account corresponding to the client.
In one embodiment of the present application, when an authentication request with authentication data is issued to a server, the validity of the identification code pattern may be preferentially judged at a client. If the identification code pattern is invalid, a subsequent authentication process may not be performed. Specifically, the client may recognize the identification code pattern through identification code recognition software, thereby obtaining the identification code. The client may then verify the identification code. When the client checks the identification code, the client can verify whether the identification code conforms to the writing rule of the identification code. The writing rules may define the components of the various fields in the identification code and the ordering of the various components. If the identification code does not conform to the writing rule, the identification code can be judged to be an invalid identification code, so that a prompt that the identification code is wrong can be displayed in the current page of the client. And when the identification code is in accordance with the writing rule and passes the verification, the client can send the verification request to the server.
In this embodiment, the client may further include an identification code data set. The set of identification code data may comprise at least one identification code. The identification codes in the identification code data set can be valid identification codes. Based on the identification code pattern, when the client judges the validity of the identification code pattern, the carried identification code can be identified from the identification code pattern through identification code identification software. The identified identification code may then be matched with an identification code in the identification code dataset. If the recognized identification code is present in the identification code dataset, this is an indication that the recognized identification code is a valid identification code, so that verification can be passed. If the identified identification code is not present in the identification code dataset, the identified identification code cannot pass the verification.
In this embodiment, when the client checks the identifier code, it may further determine whether the function pointed by the identifier code is the designated service function. Specifically, the content of the identification code may be identified, and it is determined whether the content of the identification code includes an identifier for characterizing the designated service function. If the identification code is contained in the service information, the function pointed by the identification code is indicated as the appointed service function. If not, the function pointed to by the identification code is not the appointed service function. For example, the designated service function is a red packet, the designated service function of the red packet may be represented by "HB", and all the identification codes pointing to the red packet may carry a word of "HB". Thus, by identifying each field in the identification code, it can be determined whether "HB" is contained in the identification code. If the identification code is contained in the service function, the identification code indicates that the specified service function containing the red packet is pointed to. If not, the identification code indicates that the designated service function pointed by the identification code does not contain the designated service function of the red packet.
In one embodiment of the present application, before the step of issuing the authentication request with the authentication data to the server, the client may recognize the identification code pattern by identification code recognition software, thereby obtaining the identification code. Prompt information may then be displayed based on the identification code; the prompt information is used for expressing an image acquisition rule aiming at the business object.
In this embodiment, the prompt information may be used to express an image acquisition rule for the business object. Wherein the image acquisition rules may define the state in which the business object is located. For example, the image acquisition rule may be to photograph a business object with a bottle cap unscrewed or to photograph a business object with a straw inserted, etc. In the present embodiment, the corresponding image acquisition rules are often different for different business objects. For example, for a bottled business object, the corresponding image acquisition rule may be to photograph the business object when the bottle cap is unscrewed; and for the boxed business object, the corresponding image acquisition rule can be to shoot the business object under the condition that the suction pipe is inserted.
In this embodiment, the correspondence between the business object and the image acquisition rule may be stored in the server. Specifically, the correspondence may be edited in advance and kept updated in the server by the business of the business object. For example, for boxed chewing gum, the manufacturer of the business object may write in advance in the database of the server the image acquisition rule of the boxed chewing gum for photographing the business object with the cap open.
In this embodiment, the correspondence between the business object and the image acquisition rule may also be stored in the client. Specifically, the client may download/update the corresponding relationship between the service object and the image acquisition rule from the server periodically, so that the client may obtain the corresponding image acquisition rule according to local query of the service object even if the client is in an offline state.
In this embodiment, the prompt information may be a text representation of the image acquisition rule. For example, if the image acquisition rule is to take a picture when the bottle cap is unscrewed, the corresponding prompt message may be "please open the bottle cap to take a picture". In this embodiment, when the image acquisition rule is stored, the image acquisition rule may be stored by a rule identifier. For example, the rule identifier may be character codes such as t1, t2, t 3. And different rule identifications may correspond to different prompt messages. For example, t1 corresponds to "parent, please open the lid to take a picture"; and t2 corresponds to "parent, please insert the straw to take a picture".
In the present embodiment, the correspondence between the rule identifier and the presentation information may be stored in the server or the client. The conversion process from rule identification to prompt information may be performed in the server or in the client. Therefore, the client displays the prompt message, on one hand, the client sends the identification code to the server. The server can determine the prompt information corresponding to the service object according to the received identification code, so that the corresponding prompt information can be fed back to the client. Therefore, the client can receive the prompt message sent by the server and display the prompt message in the current interface. In this embodiment, the server may analyze the image acquisition rule of the service object into the prompt information, and send the analyzed prompt information to the client. In this way, the client can directly display the received prompt message.
On the other hand, the prompt information can be displayed by the client side by receiving the rule identifier, which is fed back by the server and is aimed at the identification code, after the identification code is sent to the server, and locally analyzing the rule identifier into corresponding text information, so that the text information is displayed in the current interface. For example, the data received by the client is t1, and through the correspondence between the locally stored rule identifier and the prompt information, t1 may be resolved as "parent, please open the bottle cap to take a picture". After the prompt information is obtained through analysis, the analyzed prompt information can be displayed in the current page.
In this embodiment, an association relationship may exist between the identification code and the business object, and a correspondence relationship may exist between the business object and the image acquisition rule, so that a correspondence relationship may also exist between the identification code and the image acquisition rule. For example, if the business object corresponding to the identification code 134gyt56 is Yili boxed milk and the image acquisition rule corresponding to the Yili boxed milk is to take a picture in the case of inserting a straw, the image acquisition rule corresponding to the identification code 134gyt56 may be to take a picture in the case of inserting a straw. Accordingly, based on the acquired identification code, the corresponding image acquisition rule may be acquired. And analyzing to obtain corresponding prompt information according to the image acquisition rule. Therefore, after the client acquires the identification code, the corresponding prompt message can be displayed based on the identification code.
It should be noted that the image acquisition rule may also specify multiple states of the business object at the same time. For example, the image acquisition rule may be: firstly, taking a picture under the condition that the bottle cap is not unscrewed, and then taking a picture under the condition that the bottle cap is unscrewed. In the image acquisition rule, two states of the business object can be defined according to the sequence. Of course, in practical application, the image acquisition rule may also specify more states of the business object, and the number of the business object states defined by the image acquisition rule is not limited in the present application.
In this embodiment, after the client provides the server with the image that meets the image acquisition rule, the server may continue to send the prompt message to the client in order to further ensure the reliability of data verification. The hint information may also express image acquisition rules for the business object. The prompt message sent this time may be different from the image acquisition rule defined by the prompt message sent before. For example, the image obtaining rule defined by the previously sent prompt message is to allow the client to provide an image of the bottle cap being opened, and the image obtaining rule defined by the currently sent prompt message may allow the client to provide an image of the bottle cap being held by the user. Of course, after receiving the image provided again by the client, the server may also continue to send more prompting information to the client to request the client to provide more images to the server. In this way, the reliability of data verification can be ensured by performing authentication on the image provided by the client a plurality of times.
As can be seen from the above, in the present embodiment, when the prompt information is displayed based on the identification code, various situations may be included. In one aspect, the client may send the identification code to a server; prompt information fed back by the server and aiming at the identification code can be received; the prompt message may eventually be displayed.
In this embodiment, the server feeds back to the client text information that can be directly displayed, so that the conversion process from rule identification to text information can be performed in the server. The client only needs to display the received prompt information.
On the other hand, the client may send the identification code to the server; then, rule identification for the identification code fed back by the server can be received; finally, the rule identification can be analyzed into corresponding prompt information and the prompt information is displayed; wherein the rule identification is an image acquisition rule for identifying the business object.
In this embodiment, the client receives the rule identifier that cannot be directly displayed. In this case, the client may parse the rule identifier into corresponding text information, so that the parsed text information may be displayed.
On the other hand, the client can determine the rule identification corresponding to the identification code, then analyze the rule identification into corresponding prompt information and display the prompt information; wherein the rule identification is an image acquisition rule for identifying the business object.
In this embodiment, the corresponding relationship between the identification code and the rule identifier, and the corresponding relationship between the rule identifier and the prompt message may be stored locally at the client. The client can realize the process of obtaining the prompt information from the identification code without data interaction with the server.
In this embodiment, after the prompt information is displayed based on the identification code, the client may capture an image of the business object that conforms to the image acquisition rule.
In this embodiment, after the prompt information is displayed in the current interface of the client, the user may adjust the shape of the business object according to the prompt information, and capture an image of the business object according with the image acquisition rule through the client.
In this embodiment, the number of images captured by the client may be determined according to the state of the business object defined by the image acquisition rule. For example, the image acquisition rules define only one state of the business object: when the suction pipe is inserted, the shot image can be a business object image inserted into the suction pipe. If the image acquisition rule defines two states of the business object in sequence, the captured image can be two business object images respectively corresponding to different states. Furthermore, the captured image may be an image stream composed of a plurality of frames of images.
In the present embodiment, the manner of capturing the image may be to capture an image of the business object in response to a user's capture instruction. Specifically, when the state of the business object is adjusted, the user can click the instruction for taking the picture in the client, so as to take the picture of the business object. In addition, the mode of taking the image can also be importing the image of the business object. Specifically, the image of the business object may be captured in advance and stored in other local applications. In this way, by calling other local applications, the image of the business object can be imported into the client. In addition, in order to guarantee the reality of the business object image, the client can automatically shoot the business object image. Specifically, the service object package may be printed with the identification code, so that when an image of the service object needs to be captured, the client may call the camera to scan a picture facing the camera. At this time, the graphical limited area of the identification code can be displayed in the interface of the client, and when the user adjusts the distance between the camera and the service object, the display area of the identification code graph in the current interface can be changed. When the display area of the identification code graph on the business object in the current interface is matched with the preset limited area, the client can automatically shoot the image of the business object containing the identification code graph. In addition, the client can automatically shoot the business object image in other various implementation forms. For example, a shooting countdown may be started in the client, and when the countdown is completed, the shooting is automatically performed.
In one embodiment of the application, the authentication request sent to the server may include an identification code of the business object in addition to authentication data representing the image. In this way, the client may send the identification code and the verification data together to the server, which may thereby verify the validity of the identification code and the verification data. Specifically, when the image of the business object according with the image acquisition rule is captured, the image may include an identification code pattern on a package of the business object, so that when the image of the business object is captured, the identification code pattern is captured in the image, and the captured image of the business object including the identification code pattern may be sent to the server.
It should be noted that the identification code may not be included in the authentication request. After the identification code is obtained according to the identification code image recognition, the client side can directly send the identification code to the server. Then, after the image complying with the image acquisition rule is captured, the client may transmit the verification data of the image to the server again. Therefore, the identification code and the verification data can be sent to the server in two times, and can also be combined in a verification request and sent to the server once.
Referring to fig. 2, in an embodiment of the present application, the verification data of the image may be generated according to the following steps.
Step S711: the image is converted into a grayscale image having a specified size.
In this embodiment, an image can be viewed as a two-dimensional signal that contains components of different frequencies. In an image, a region where the luminance change is small may be a low-frequency component, which may describe a wide range of information. While regions of intense intensity variation (such as edges of objects) may be high frequency components, which may describe specific details. Or the high frequency part may provide detailed information of the image and the low frequency part may provide a frame of the image. Typically, a large, detailed image has a high frequency, while a small picture lacks image detail and is therefore low frequency.
In this embodiment, in order to simplify the calculation procedure, the high frequency part may be removed from the image by down-sampling. Specifically, the image may be reduced to a specified size of 8 × 8 for a total of 64 pixels, so that the high frequency part may be removed. Therefore, the image difference caused by different sizes and proportions can be abandoned, and all images are subjected to normalization processing. In this embodiment, an image having a predetermined size can be converted into a grayscale image, and the subsequent operation can be simplified.
Step S713: and calculating the average gray value of the gray image.
Step S715: and comparing the gray value of each pixel point in the gray image with the average gray value, and setting the characteristic value of each pixel point according to the comparison result.
In this embodiment, the gray values corresponding to the pixels in the gray image may be accumulated and divided by the number of the pixels in the gray image, so as to obtain the average gray value of the gray image.
In this embodiment, the gray value of each pixel point in the gray image may be compared with the average gray value, and if the gray value of the current pixel point is greater than or equal to the average gray value, the characteristic value of the current pixel point may be set to 1, otherwise, the characteristic value may be set to 0. Thus, a matrix consisting of 0 and 1 can be generated by comparison with the average gray value.
Step S717: and combining the characteristic values of the pixel points into verification data of the image according to the specified sequence.
In this embodiment, the feature values of the respective pixel points are combined in a designated order, so that the verification data of the image can be obtained. For example, the feature values of the pixels may be combined in the order from left to right in the grayscale image, so as to form a feature vector composed of 0 and 1, and the feature vector may be used as the verification data of the image.
Of course, in the practical application process, the specified sequence can also have a plurality of implementation forms. For example, the designated sequence may be from left to right and from top to bottom, and the odd-numbered pixels are counted first, and then the even-numbered pixels are counted; or the appointed sequence can be that all pixel points are counted from top to bottom from left to right in sequence, and the form of the appointed sequence is not limited in the application.
In one embodiment of the present application, the verification data representing the image may further include verification data of a core area of the image. The core area may be an area in the image that can reflect a current state of a business object. For example, for an image of boxed milk, the core area may be the cap area of the boxed milk. When the bottle cap is unscrewed, the content displayed in the core area indicates that the milk box is in a used state currently. Therefore, the verification data representing the image may include the verification data of the core area in addition to the verification data of the entire business object. Specifically, the core area of the image may be pre-specified by a business of the business object, and the core areas corresponding to different business object types may also be different. For example, for a bottled business object, its corresponding core area may be a bottle cap. For boxed paper extraction, the corresponding core area may be a paper extraction opening. In this way, after acquiring the identification code and capturing the image of the business object, the client may determine the type of the business object according to the identification code, so as to intercept the image of the core area from the image of the business object, and process the image of the core area according to the flow of the above steps S711 to S717, so as to obtain the verification data of the core area. In this way, the verification request sent by the client to the server not only contains the verification data of the whole image of the business object, but also contains the verification data of the core area of the business object, so that the server can perform two times of verification, and the accuracy of data verification is improved.
In an embodiment of the present application, after sending the authentication request to the server, the client may further receive execution result information fed back by the server. Wherein, after the server executes the appointed service function pointed by the identification code, the execution result information can be generated. For example, the identification code points to the designated service function as cashback 2-ary. Then after the server verifies the received verification data, a 2-dollar cash red envelope may be generated and fed back to the client. Here, the 2-member cash red package may be included in the execution result information so that the client may withdraw the 2-member cash red package therefrom after receiving the execution result information.
Referring to fig. 4, the present embodiment further provides a client, which includes a network communication port 100, a memory 200 and a processor 300.
The network communication port 100 is used for performing network data communication with a server;
the memory 200 for storing a computer program executable by the processor;
the processor 300, when executing the computer program, may implement the following functions:
taking an image of a business object; the image comprises an identification code graph; the identification code graph carries an identification code; the identification code points to an appointed service function, and the appointed service function is bound with the service object; and sending an authentication request with authentication data to a server, wherein the authentication data represents the image, so that when the authentication data passes the verification of the authentication rule corresponding to the business object, the server starts to execute the specified business function pointed by the identification code.
In this embodiment, the network communication port 100 may be a virtual port that is bound to different communication protocols so that different data can be transmitted or received. For example, the network communication port may be port No. 80 responsible for web data communication, port No. 21 responsible for FTP data communication, or port No. 25 responsible for mail data communication. In addition, the network communication port can also be a communication interface or a communication chip of an entity. For example, it may be a wireless mobile network communication chip, such as GSM, CDMA, etc.; it can also be a Wifi chip; it may also be a bluetooth chip.
In this embodiment, the memory 200 may be a storage device for storing information. In a digital system, the device capable of storing binary data may be a memory; in an integrated circuit, a circuit without an actual form and with a storage function can also be a memory, such as a RAM, a FIFO and the like; in the system, the storage device in physical form may also be called a memory, such as a memory bank, a TF card, etc.
The processor 300 may be implemented in any suitable manner. For example, the processor may take the form of, for example, a microprocessor or processor and a computer-readable medium that stores computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, an embedded microcontroller, and so forth. The present application is not limited.
The specific functions of the client, the network communication port 100, the memory 200 and the processor 300 of the client disclosed in the above embodiments can be explained by comparing with the embodiment of the method for starting the service function on the client side in the present application, so that the embodiment of the method for starting the service function in the present application can be realized and the technical effect of the embodiment of the method can be achieved.
Referring to fig. 5 and fig. 3, an embodiment of the present application further provides a method for processing a service function, where the method may include the following steps, and execution subjects of the following steps may be servers.
Step S21: receiving a verification request provided by a client; wherein the authentication request includes authentication data representing an image; the image is used to characterize a business object.
In this embodiment, the authentication request may be sent by the client to the server. The verification request may be a character string written according to a preset rule. The preset rules may specify the components in the string and the ordering of the components. The preset rule may be predefined in a communication protocol between the client and the server. The communication protocol may be, for example, an http protocol, an FTP protocol, a TCP protocol, a UDP protocol, or the like. For example, the authentication request may include a source IP address, a destination IP address, authentication data representing an image, and the like. Wherein the source IP address may be an IP address of the client sending the authentication request in the network. The destination IP address may then be the IP address in the network of the server receiving the authentication request. The image may be an image used to characterize a business object, which may be ingested by a client. In the image, the overall shape of the business object may be included, or only the shape of a part of the business object may be included. For example, for bottled coca-cola, the image may show the entire bottle or only the mouth of the bottle. Of course, the number of the images may not be limited to one, and the authentication request received by the server may include authentication data of at least two images.
In the present embodiment, the verification data of the image may have a plurality of expressions. For example, the authentication data of the image may be the captured image itself. After the client captures the image, the client can send the captured image to the server as the verification data of the image.
Furthermore, the verification data may be a feature vector extracted from a captured image. Specifically, each image may be composed of a plurality of pixel points, and in this embodiment, the pixel values at each pixel point may be arranged according to a preset sequence, so as to form a pixel value vector corresponding to the image, and the pixel value vector may be used as a feature vector of the image. In the present embodiment, the pixel value may be an RGB (Red, Green, Blue, Red, Green, Blue) value at each pixel point. Generally, the RGB values may range from 0 to 255, so that each pixel is represented by an integer with a value in the range of 0 to 255. For example, such a feature vector (10, 2, 255, 168, 122, 13, 0, 158, 9) can be obtained by arranging RGB values of respective pixel points in order from left to right and from top to bottom. Of course, the pixel values may take different values depending on the color mode used for the image, in addition to the RGB values. For example, the pixel value may also be an HSL (hue, saturation, brightness) value or a CIE Lab value or the like.
It should be noted that the feature vector extracted from the captured image may also be represented in other forms. Specifically, the feature vector may also be extracted through a Convolutional Neural Network (CNN), a Haar-like rectangular feature, and an LBP (Local Binary Pattern).
In this way, the authentication data in the authentication request received by the server may also be in the form of a feature vector.
Step S23: acquiring an identification code of the business object based on the verification request; the identification code points to an assigned business function, and the assigned business function is bound with the business object.
In this embodiment, the authentication request may include an identification code of the service object in addition to authentication data indicating an image. The identification code may be a two-dimensional code, a bar code, a serial number, etc. printed on the business object for identifying the business object. In particular, the identification code may point to a specific business function. In this embodiment, the specified business function may be an operation instruction preset by a business object. For example, the operation instruction may be red packet cashback, return of a discount activation code, adding a score in an account of the user, and the like. The identification code pointing to a designated service function may indicate that the corresponding designated service function can be determined by the identification code.
In this embodiment, the specified service function may be bound to the service object. The binding of the specified business function with the business object may mean that the specified business function can be executed only when the business object is in a specified state. For example, the designated business function may be performed with the business object in a state where the cap is opened.
In this embodiment, the identification code may be a unique code that is not duplicated with other identification codes. In the server, a designated service function pointed to and a service object bound to the designated service function may be configured for the unique code in advance. For example, the identification code is '123', the designated service function pointed by the identification code may be issuing a 2-element red packet, and the designated service function issuing the 2-element red packet may be bound with the mongolian cow packaged milk, and the function issuing the red packet may be executed only when a bottle cap of the mongolian cow packaged milk is opened.
In this embodiment, the manner of acquiring the identification code of the service object based on the verification request may be to extract an identification code field from the verification request and identify the identification code therein from the identification code field.
In addition, the verification data of the image may also include identification code information of the business object. Specifically, when the verification data of the image is the image itself, since the identification code is printed on the business object package, the client can capture the image containing the identification code when capturing the image of the business object. Thus, the authentication data received by the server may include the identification code of the business object. In the present embodiment, since the position where the two-dimensional code is printed is generally fixed, a specific region in the image can be recognized, so that the identification code included in the image can be extracted.
Step S25: verifying the verification data according to the verification rule of the business object; wherein the validation rule is used for limiting the business object represented by the image to be in a specified state.
In this embodiment, the validation rule may be used to define that the business object represented by the image is in a specified state. Wherein, when the business object is in the designated state, it can indicate that the business object has been used. For example, for a bottle, the corresponding specified condition may be insertion of a straw into the mouth of the bottle. It can be determined that the bottle has been used when a straw is inserted into the mouth of the bottle. In this embodiment, the specified state may be defined by the validation rule. Specifically, the validation rules may be set manually, and the specified states defined by the validation rules may also be different according to different business objects. For example, for a bottle, the specified state defined by the validation rule may be a state in which the cap is unscrewed; for tickets, the specified state defined by the validation rule may be the absence of a sublink on the ticket body. The validation rules may also define different specified states for the same business object. For example, for a bottle, the validation rules may define the specified state as a state of unscrewing a cap, and may also define the specified state as a state of inserting a straw in a bottle mouth. That is, in the actual application process, the form of the specified state may be variously set by the verification rule according to the actual environment, and is not limited to the form described in the embodiment of the present application, for example. But should be included in the scope of protection of the present application as long as the specified state can indicate that the business object has been used.
It should be noted that, in the actual application process, when the business object is used, it is not necessarily in the designated state. For example, after a bottle is used, the corresponding state may be that the cap is unscrewed, the neck is inserted into a straw, or the cap is still screwed on the neck. At this time, the server can determine that the business object is used only by photographing the used business object in a specified state defined by the verification rule.
In this embodiment, the validation rule of the business object may refer to that there is an association relationship between the business object and the validation rule. Specifically, the association relationship may be pre-edited and kept updated in the server by the business of the business object. For example, in the case of a box-packed chewing gum, the manufacturer of the service object may write in advance a verification rule of the box-packed chewing gum in the database of the server as a state where the cap is opened.
In this embodiment, an association relationship may exist between the identification code and the service object, and an association relationship may also exist between the service object and the validation rule, so that an association relationship may also exist between the identification code and the validation rule, and thus, the validation rule associated with the identification code may be determined by the acquired identification code of the service object.
In this embodiment, the way of verifying the verification data according to the verification rule may include verifying whether the state of the business object represented by the verification data is consistent with the state of the business object defined by the verification rule. If the two are consistent, the verification is passed; if not, verification failure may be indicated.
In this embodiment, the verification rule may be set in advance in the server. Specifically, an image sample corresponding to the validation rule may be stored in the server, and the specified state of the business object may be displayed in the image sample. For example, the image sample may be boxed milk with a bottle cap unscrewed. Of course, it is also possible that not the image samples but feature vectors characterizing the image samples are stored in the server.
In this embodiment, when the verification data is verified according to the verification rule, a similarity coefficient between the verification data and the image sample may be calculated. The similarity coefficient may be determined by a hamming distance or a correlation coefficient. Specifically, in calculating the hamming distance between the verification data and the image sample, if the verification data and the image sample are not represented by feature vectors, the verification data and the image sample may be converted into the respective corresponding feature vectors in advance. When calculating the hamming distance, each digit in the two eigenvectors can be compared in sequence, if the digits on the same digit are different, the hamming distance between the two eigenvectors can be increased by 1 until each digit in the eigenvectors is compared. The resulting hamming distance can then represent the similarity procedure between the validation data and the image sample, with a greater hamming distance indicating a greater dissimilarity between the two.
In the present embodiment, when calculating the correlation coefficient between the verification data and the image sample, if the verification data and the image sample are not represented by the feature vector, the verification data and the image sample may be converted into the respective corresponding feature vectors in advance. In this way, the correlation coefficient between two feature vectors can be calculated by the correlation coefficient formula. The numerator of the correlation coefficient formula may be a covariance between two eigenvectors, and the denominator of the correlation coefficient formula may be a product of a mean square error of the two eigenvectors. Thus, a larger calculated correlation coefficient indicates that the validation data is more similar to the image sample.
In the present embodiment, after obtaining the parameter such as the hamming distance or the correlation coefficient that can represent the degree of similarity between the verification data and the image sample, a parameter threshold value for determining whether the verification is passed may be set. And judging whether the verification is passed or not according to the comparison result between the calculated parameter and the parameter threshold value. Specifically, when the calculated parameter is a hamming distance, if the calculated hamming distance is less than or equal to a parameter threshold, it may indicate that the verification data and the image sample are similar and can pass the verification, and otherwise, the verification cannot pass. When the calculated parameter is a correlation coefficient, if the calculated correlation coefficient is greater than or equal to a parameter threshold, it may indicate that the verification data and the image sample are similar and can pass the verification, and otherwise, the verification cannot pass.
Referring to fig. 6, it should be noted that the above-mentioned process of verifying the verification data can be performed on the premise of confirming that the identification code is a valid identification code. When the identification code is a valid identification code, the server may further verify whether the verification data conforms to a verification rule. If the identification code is an invalid identification code, the server can directly feed back a prompt for identifying the error to the client without performing a subsequent verification process of verification data.
Further, in the present embodiment, the process of verifying the verification data may not be performed only once. For example, the verification data received by the server may include the entire data of the image and may also include the partial data of the image. Specifically, the verification data representing the image may further include verification data of a core area of the image. The core area may be an area in the image that can reflect a current state of a business object. For example, for an image of boxed milk, the core area may be the cap area of the boxed milk. When the bottle cap is unscrewed, the content displayed in the core area indicates that the milk box is in a used state currently. Therefore, the verification data representing the image may include the verification data of the core area in addition to the verification data of the entire business object. Specifically, the core area of the image may be pre-specified by a business of the business object, and the core areas corresponding to different business object types may also be different. For example, for a bottled business object, its corresponding core area may be a bottle cap. For boxed paper extraction, the corresponding core area may be a paper extraction opening. Therefore, after receiving the whole data and the local data of the image, the server can verify whether the whole data meets the verification rule or not, and if the whole data passes the verification, the server can verify whether the local data meets the verification rule or not again. When both pass the verification, the final verification can be determined to pass, so that the accuracy of data verification can be improved.
Step S27: and when the verification is passed, executing the designated service function pointed by the identification code.
Referring to fig. 6, in the present embodiment, when the verification data is verified by the server, the identification code is a valid identification code, and the verification data also conforms to the verification rule, so that the designated service function pointed by the identification code can be executed.
In this embodiment, the specified business function may be a preset operation instruction of a business object. For example, the operation instruction may be red packet cashback, return of a discount activation code, adding a score in an account of the user, and the like. The specified business function may be performed by a server and corresponding results generated.
In this embodiment, after executing the designated service function pointed by the identification code, the server may generate execution result information and feed back the execution result information to the client. For example, the identification code points to the designated service function as cashback 2-ary. Then after the server verifies the received verification data, a 2-dollar cash red envelope may be generated and fed back to the client. Here, the 2-member cash red package may be included in the execution result information so that the client may withdraw the 2-member cash red package therefrom after receiving the execution result information.
In an embodiment of the present application, the verification data for representing the image may be generated according to the processes described in steps S711 to S717, and will not be described herein again.
It should be noted that the verification data received by the server may be the feature vector that has undergone the processing in steps S711 to S717, or may be the image itself. If it is the image itself, the process of steps S711 to S717 may be performed in the server to convert the received image into a corresponding feature vector.
Referring to fig. 6, in an embodiment of the present application, when the verification data does not meet the verification rule, resulting in that the verification fails, the server may feed back a prompt message to the client. Wherein the prompt information is used for expressing the verification rule. The prompt message may prompt the user for the correct scan status of the business object. For example, to remind the user that the cap should be twisted open and scanned again.
In this embodiment, the prompt information may be a character representation of the validation rule. Wherein the prompt message may be a text message. For example, if the verification rule is the case of twisting off the bottle cap, the corresponding text message may be "parent, please open the bottle cap to verify again". In this embodiment, the prompt information may be represented by a rule flag. For example, the rule identifier may be character codes such as t1, t2, t 3. And different rule identifications may correspond to different text information. For example, t1 corresponds to "parent, please open the lid to take a picture"; and t2 corresponds to "parent, please insert the straw to take a picture".
In this embodiment, the correspondence between the rule identifier and the text information may be stored in the server or the client. The conversion process from rule identification to text information may be performed in the server or in the client. Therefore, the prompt information provided by the server to the client may be the rule identifier on the one hand, and may also be the text information after the rule identifier is converted on the other hand. If the server provides the text information to the client, the client can directly display the received text information; and if the client receives the rule identification, the client can analyze the rule identification into corresponding text information, so that the text information is displayed in the current interface. For example, the data received by the client is t1, and through the correspondence between the locally stored rule identifier and the text information, t1 may be parsed as "parent, please open the bottle cap to take a picture". After the text information is obtained through analysis, the analyzed text information can be displayed in the current page.
In an embodiment of the present application, the process of verifying the verification data may also be performed in a specific verification server. Specifically, after the identification code of the service object is obtained based on the verification request, the verification data and the identification code may be sent to a verification server, so that the verification server verifies the verification data according to a verification rule corresponding to the identification code. The process of verifying the verification data by the verification server according to the verification rule corresponding to the identification code may be consistent with the description in step S25, and is not repeated here.
In this embodiment, after the authentication server completes authentication on the authentication data, authentication result information may be fed back to the server. In this way, the server can receive the verification result information fed back by the verification server, and execute the specified service function pointed by the identification code when the verification result information is that the verification is passed.
In one embodiment of the present application, the identification code may be associated with a target resource. The target resource may be, for example, the amount of a red envelope or the amount of a cash back. Then the target resource associated with the identification code may be incorporated into the client bound set of resources, such as a bank card or virtual fund pool, when performing the specified business function pointed to by the identification code. For example, the resource set may be a bank card bound by the user in the financial institution in the kyoto, or a small vault of the financial institution in the kyoto. After the designated service function of the red packet or cash back is executed, the money amount of the red packet or cash back can be integrated into the resource set of the user, so that the process of the red packet or cash back is completed.
Referring to fig. 7, the present application further provides a server, which includes a network communication port 110, a memory 210 and a processor 310.
The network communication port 110 is used for performing network data communication with a client.
The memory 210 is used for storing a computer program which can be executed by the processor.
The processor 310 is configured to, when executing the computer program, implement the following functions:
receiving a verification request provided by a client; wherein the authentication request includes authentication data representing an image; the image is used for representing a business object; acquiring an identification code of the business object based on the verification request; the identification code points to an appointed service function, and the appointed service function is bound with the service object; verifying the verification data according to the verification rule of the business object; wherein the validation rule is used for limiting the business object represented by the image to be in a specified state; and when the verification is passed, executing the designated service function pointed by the identification code.
In this embodiment, the network communication port 110 may be a virtual port that is bound to different communication protocols so that different data can be transmitted or received. For example, the network communication port may be port No. 80 responsible for web data communication, port No. 21 responsible for FTP data communication, or port No. 25 responsible for mail data communication. In addition, the network communication port can also be a communication interface or a communication chip of an entity. For example, it may be a wireless mobile network communication chip, such as GSM, CDMA, etc.; it can also be a Wifi chip; it may also be a bluetooth chip.
In this embodiment, the memory 210 may be a memory device for storing information. In a digital system, the device capable of storing binary data may be a memory; in an integrated circuit, a circuit without an actual form and with a storage function can also be a memory, such as a RAM, a FIFO and the like; in the system, the storage device in physical form may also be called a memory, such as a memory bank, a TF card, etc.
The processor 310 may be implemented in any suitable manner. For example, the processor may take the form of, for example, a microprocessor or processor and a computer-readable medium that stores computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, an embedded microcontroller, and so forth. The present application is not limited.
The specific functions implemented by the network communication port 110, the memory 210, and the processor 310 of the server disclosed in the above embodiments can be explained in comparison with the embodiments of the method for processing the service function on the server side in the present application, and can implement the embodiments of the method for processing the service function in the present application and achieve the technical effects of the method embodiments.
Referring to fig. 8 and 9, in a specific application scenario, a user may identify a two-dimensional code printed on a milk box package through two-dimensional code scanning software installed on a mobile phone terminal. The user opens the two-dimensional code scanning software, the software can call a camera of the mobile phone terminal, and the limited area of the two-dimensional code and the scene faced by the camera can be displayed in the interface of the software. When the user adjusts the distance between the mobile phone terminal and the milk box, the two-dimensional code on the milk box can fall into the limited area. At this time, after the mobile phone terminal can identify the serial number of the red packet contained in the two-dimensional code, a picture is automatically shot, and the picture and the serial number of the red packet are sent to a background service server of the two-dimensional code scanning software. In this picture, the cover of the milk carton may be in an untwisted state. After receiving the information sent by the mobile phone terminal, the background service server can firstly inquire that the serial number corresponds to an illite pure milk beverage according to the serial number of the red packet. The corresponding verification rule of the beverage is that the bottle cap needs to be in a state of being unscrewed. After the picture sent by the mobile phone terminal is identified by the service server, the bottle cap in the picture is determined not to be unscrewed, and then the verification fails, prompt information can be fed back to the user: "parent, please open the bottle and sweep one scan". At the moment, the user can open the bottle cap of the milk box, the two-dimensional code recognition process is carried out again, and the mobile phone terminal uploads the recognized serial number and the shot picture to the server again. The server can recognize that the bottle cap in the picture is unscrewed and the serial number is in an effective state, so that the server can obtain the red packet corresponding to the serial number and send the limit of the red packet to the mobile phone terminal. Certainly, in the two-dimensional code scanning software, the account of the user can be logged in advance, and when the mobile phone terminal is in data communication with the server, the mobile phone terminal can be provided with an identifier representing the account of the user each time. Therefore, after the verification is passed, a prompt of 'red packet opening in the middle' can be displayed on the interface of the mobile phone terminal, and after the server obtains the red packet corresponding to the serial number, the quota of the red packet is written into the account number of the user.
Thus, whether the milk box is used or not can be judged by identifying whether the bottle cap of the milk box purchased by the user is unscrewed or not. Only when the milk box is used, the milk box is indicated to be purchased by the user, and the user can obtain the red packet corresponding to the two-dimension code on the milk box.
Of course, the technical solution of the present application is not limited to verifying whether the business object is purchased (used), but can also be used to verify whether the business object is complete. For example, when a user purchases a box of milk, but the user wants to return the product, the two-dimensional code on the milk box may be scanned. At the moment, when the bottle cap of the milk box is verified to be intact and not opened, the user has the goods returning permission.
According to the technical scheme provided by the embodiment of the application, when the identification code is verified, the image of the business object needs to be further verified. The image of the business object may show the current state of the business object. The current state may be, for example, a state in which a bottle cap is opened, a straw is inserted, or the like. The authentication is passed only if the current state is in accordance with the state specified by the authentication rule and the authenticated identification code is valid, so that the assigned service function pointed to by the identification code can be executed. Therefore, the method and the device can correctly provide corresponding resources for the user who purchases the business object under the condition of not shielding the identification code by further verifying the business object image, thereby simplifying the manufacturing process of the business object package.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate a dedicated integrated circuit chip 2. Furthermore, nowadays, instead of manually making an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Language Description Language), traffic, pl (core unified Programming Language), HDCal, JHDL (Java Hardware Description Language), langue, Lola, HDL, laspam, hardbyscript Description Language (vhr Description Language), and the like, which are currently used by Hardware compiler-software (Hardware Description Language-software). It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
Those skilled in the art will also appreciate that, in addition to implementing a client, server as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the client, server are in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a client, server may be considered as a hardware component, and the means included therein for implementing various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
From the above description of the embodiments, it is clear to those skilled in the art that the present application can be implemented by software plus necessary general hardware platform. Based on such understanding, the technical solutions of the present application may be essentially or partially implemented in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the embodiments or some parts of the embodiments of the present application.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments can be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, both for the embodiments of the client and the server, reference may be made to the introduction of embodiments of the method described above.
The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
Although the present application has been described in terms of embodiments, those of ordinary skill in the art will recognize that there are numerous variations and permutations of the present application without departing from the spirit of the application, and it is intended that the appended claims encompass such variations and permutations without departing from the spirit of the application.

Claims (17)

1. A method for starting service function is characterized in that a service object is provided, and the surface of the service object is provided with an identification code graph; the method comprises the following steps:
capturing an image of the business object; the image comprises an identification code graph; the identification code graph carries an identification code; the identification code points to an appointed service function, and the appointed service function is bound with the service object;
sending a verification request with verification data to a server, wherein the verification data represents the image and is used for starting to execute a specified service function pointed by the identification code when the verification data passes the verification of a verification rule corresponding to the service object, and the specified service function is an operation instruction preset by a business of the service object; wherein the validation rule is used for limiting the business object represented by the image to be in a specified state; the specified state is a specified use state.
2. The method according to claim 1, wherein the step of issuing the authentication request with the authentication data to the server comprises:
identifying the identification code graph to obtain the identification code;
checking the identification code; judging whether the function pointed by the identification code is the appointed service function or not;
and when the identification code passes the verification, sending the verification request.
3. The method of claim 1, wherein prior to the step of issuing the authentication request with the authentication data to the server, the method further comprises:
identifying the identification code graph to obtain the identification code;
displaying prompt information based on the identification code; the prompt information is used for expressing an image acquisition rule aiming at the business object;
and taking an image of the business object according with the image acquisition rule.
4. The method of claim 3, wherein displaying a prompt based on the identification code comprises:
sending the identification code to a server so that the server can determine prompt information corresponding to the business object according to the identification code;
receiving prompt information fed back by the server and aiming at the identification code;
and displaying the prompt information.
5. The method of claim 3, wherein displaying the reminder information based on the identification code comprises:
sending the identification code to a server;
receiving a rule identifier for the identification code fed back by the server;
analyzing the rule identification into corresponding prompt information and displaying the prompt information; wherein the rule identification is an image acquisition rule for identifying the business object.
6. The method of claim 3, wherein displaying the reminder information based on the identification code comprises:
determining a rule identifier corresponding to the identification code;
analyzing the rule identification into corresponding prompt information and displaying the prompt information; wherein the rule identification is an image acquisition rule for identifying the business object.
7. The method of claim 3, wherein capturing an image of the business object that complies with the image acquisition rules comprises:
and when the display area of the identification code graph on the business object in the current interface is matched with the limited area, shooting the image of the business object containing the identification code graph.
8. The method of claim 1, wherein the verification data is generated as follows:
converting the image into a grayscale image having a specified size;
calculating an average gray value of the gray image;
comparing the gray value of each pixel point in the gray image with the average gray value, and setting the characteristic value of each pixel point according to the comparison result;
and combining the characteristic values of the pixel points into verification data of the image according to the specified sequence.
9. The method of claim 8, wherein setting the feature value of each pixel according to the comparison result comprises:
if the gray value of the current pixel point is larger than or equal to the average gray value, setting the characteristic value of the current pixel point to be 1;
and if the gray value of the current pixel point is smaller than the average gray value, setting the characteristic value of the current pixel point to be 0.
10. The method of claim 1, wherein after issuing the authentication request with the authentication data to the server, the method further comprises:
receiving execution result information fed back by the server; and after the server executes the designated service function pointed by the identification code, generating the execution result information.
11. A client, comprising a network communication port, a memory, and a processor, wherein:
the network communication port is used for carrying out network data communication with the server;
the memory for storing a computer program executable by the processor;
the processor, when executing the computer program, may implement the following functions:
taking an image of a business object; the image comprises an identification code graph; the identification code graph carries an identification code; the identification code points to an appointed service function, and the appointed service function is bound with the service object; sending a verification request with verification data to a server, wherein the verification data represents the image and is used for starting to execute a specified service function pointed by the identification code when the verification data passes the verification of a verification rule corresponding to the service object, and the specified service function is an operation instruction preset by a business of the service object; wherein the validation rule is used for limiting the business object represented by the image to be in a specified state; the specified state is a specified use state.
12. A method for processing a service function, the method comprising:
receiving a verification request provided by a client; wherein the authentication request includes authentication data representing an image; the image is used for representing a business object;
acquiring an identification code of the business object based on the verification request; the identification code points to an appointed service function, and the appointed service function is bound with the service object;
sending the verification data to a verification server for the verification server to verify the verification data according to a verification rule corresponding to the business object; the verification rule is used for limiting the business object represented by the image to be in a specified state; the specified state is a specified use state;
receiving verification result information fed back by the verification server;
and when the verification result information is that the verification is passed, executing the appointed service function pointed by the identification code, wherein the appointed service function is an operation instruction preset by a business object.
13. A method for processing a service function, comprising:
receiving a verification request provided by a client; wherein the authentication request includes authentication data representing an image; the image is used for representing a business object;
acquiring an identification code of the business object based on the verification request; the identification code points to an appointed service function, and the appointed service function is bound with the service object;
verifying the verification data according to the verification rule of the business object; wherein the validation rule is used for limiting the business object represented by the image to be in a specified state; the specified state is a specified use state;
and when the verification is passed, executing the appointed service function pointed by the identification code, wherein the appointed service function is an operation instruction preset by a business object.
14. The method of claim 13, wherein validating the validation data according to the validation rules of the business object comprises:
when the identification code is confirmed to be valid, determining an image sample corresponding to the verification rule;
calculating a similarity coefficient between the verification data and the image sample;
and comparing the similarity coefficient with a threshold value, and judging whether the verification data passes the verification according to the comparison result.
15. The method of claim 13, further comprising:
when the verification fails, feeding back prompt information to the client; the prompt message is used for expressing the verification rule.
16. The method of claim 13, wherein the identification code is associated with a target resource; accordingly, the executing of the assigned service function pointed to by the identification code comprises:
and incorporating the target resource associated with the identification code into the resource set bound by the client.
17. A server, comprising a network communication port, a memory, and a processor, wherein:
the network communication port is used for carrying out network data communication with a client;
the memory for storing a computer program executable by the processor;
the processor, when executing the computer program, is capable of implementing the following functions:
receiving a verification request provided by a client; wherein the authentication request includes authentication data representing an image; the image is used for representing a business object; acquiring an identification code of the business object based on the verification request; the identification code points to an appointed service function, and the appointed service function is bound with the service object; verifying the verification data according to the verification rule of the business object; wherein the validation rule is used for limiting the business object represented by the image to be in a specified state; the specified state is a specified use state; and when the verification is passed, executing the appointed service function pointed by the identification code, wherein the appointed service function is an operation instruction preset by a business object.
CN201710110259.5A 2017-02-27 2017-02-27 Service function starting and processing method, client and server Active CN108510296B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710110259.5A CN108510296B (en) 2017-02-27 2017-02-27 Service function starting and processing method, client and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710110259.5A CN108510296B (en) 2017-02-27 2017-02-27 Service function starting and processing method, client and server

Publications (2)

Publication Number Publication Date
CN108510296A CN108510296A (en) 2018-09-07
CN108510296B true CN108510296B (en) 2022-01-28

Family

ID=63373654

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710110259.5A Active CN108510296B (en) 2017-02-27 2017-02-27 Service function starting and processing method, client and server

Country Status (1)

Country Link
CN (1) CN108510296B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112950236B (en) * 2021-03-31 2023-05-23 四川虹美智能科技有限公司 Sequence number writing method, device and computer readable medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103955660A (en) * 2014-04-22 2014-07-30 广州闪购软件服务有限公司 Method for recognizing batch two-dimension code images
CN104184589A (en) * 2014-08-26 2014-12-03 重庆邮电大学 Identity authentication method, terminal device and system
CN104376339A (en) * 2014-08-06 2015-02-25 智眼天下通(北京)科技发展有限公司 Graphic code scanning method with verification function and graphic code structure thereof
CN104967586A (en) * 2014-05-04 2015-10-07 腾讯科技(深圳)有限公司 User identity authentication method, user identity authentication apparatus and user identity authentication system
CN106022738A (en) * 2016-06-02 2016-10-12 中国联合网络通信集团有限公司 Two-dimensional code safety payment method, terminal, and system
CN106295965A (en) * 2016-07-29 2017-01-04 暨南大学 Waste sorting recycle method based on the Internet, system and refuse classification terminating machine

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103955660A (en) * 2014-04-22 2014-07-30 广州闪购软件服务有限公司 Method for recognizing batch two-dimension code images
CN104967586A (en) * 2014-05-04 2015-10-07 腾讯科技(深圳)有限公司 User identity authentication method, user identity authentication apparatus and user identity authentication system
CN104376339A (en) * 2014-08-06 2015-02-25 智眼天下通(北京)科技发展有限公司 Graphic code scanning method with verification function and graphic code structure thereof
CN104184589A (en) * 2014-08-26 2014-12-03 重庆邮电大学 Identity authentication method, terminal device and system
CN106022738A (en) * 2016-06-02 2016-10-12 中国联合网络通信集团有限公司 Two-dimensional code safety payment method, terminal, and system
CN106295965A (en) * 2016-07-29 2017-01-04 暨南大学 Waste sorting recycle method based on the Internet, system and refuse classification terminating machine

Also Published As

Publication number Publication date
CN108510296A (en) 2018-09-07

Similar Documents

Publication Publication Date Title
CN111401880B (en) Safe payment method and device and mobile terminal
US9092774B2 (en) Augmented reality messaging system and method based on multi-factor recognition
CN107707970B (en) A kind of electronic contract signature method, system and terminal
CN107277573A (en) Video-frequency advertisement put-on method, device and computer-readable recording medium
US10867144B2 (en) Systems and methods for point of sale age verification
CN107016420A (en) A kind of method for processing business and device
CN113011349A (en) Element identification method and device of bill and storage medium
US20200218772A1 (en) Method and apparatus for dynamically identifying a user of an account for posting images
CN108510296B (en) Service function starting and processing method, client and server
CN107729124A (en) Transaction methods and device, electronic equipment
US20210357600A1 (en) Systems and Methods for Point of Sale Age Verification
WO2020081317A1 (en) Systems and methods for point of sale age verification
CN102542696B (en) Security information interaction system and method
KR20110070842A (en) Method for settling wireless using camera
KR20100094443A (en) Method for payment by using 2d barcode and program recording medium
CN108510382B (en) Transaction information processing method and device
US10650072B2 (en) System and method for determination of a digital destination based on a multi-part identifier
CN112153418A (en) Streaming media generation method and device, terminal and server
KR20110070843A (en) Method for relaying pattern image
CN107688559A (en) Display methods, device and the computer-readable recording medium of prompt message
TW201946005A (en) Graphic code scanning transaction system with mobile device and method of payment thereof enhances the convenience of consumers and taxpayers
KR20100094444A (en) Smart phone
KR20100094445A (en) Smart phone

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 1260143

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant