CN110580633B - Information pushing method and device and server - Google Patents

Information pushing method and device and server Download PDF

Info

Publication number
CN110580633B
CN110580633B CN201810589910.6A CN201810589910A CN110580633B CN 110580633 B CN110580633 B CN 110580633B CN 201810589910 A CN201810589910 A CN 201810589910A CN 110580633 B CN110580633 B CN 110580633B
Authority
CN
China
Prior art keywords
source data
bit
electronic
value
data
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
CN201810589910.6A
Other languages
Chinese (zh)
Other versions
CN110580633A (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.)
Beijing Sankuai Online Technology Co Ltd
Original Assignee
Beijing Sankuai Online Technology Co 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 Beijing Sankuai Online Technology Co Ltd filed Critical Beijing Sankuai Online Technology Co Ltd
Priority to CN201810589910.6A priority Critical patent/CN110580633B/en
Publication of CN110580633A publication Critical patent/CN110580633A/en
Application granted granted Critical
Publication of CN110580633B publication Critical patent/CN110580633B/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/0208Trade or exchange of goods or services in exchange for incentives or rewards
    • 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/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0631Item recommendations
    • 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/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0641Shopping interfaces

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • Engineering & Computer Science (AREA)
  • Development Economics (AREA)
  • Marketing (AREA)
  • Economics (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Game Theory and Decision Science (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application provides a method, a device and a server for pushing information, wherein the method comprises the following steps: converting source data of the electronic goods into target data, wherein the source data are used for identifying the electronic goods, and a numerical value corresponding to the target data is not larger than a maximum numerical value supported by the client equipment; determining information to be displayed of the electronic commodity based on the target data and the attribute information of the electronic commodity; and pushing the information to be displayed. According to the technical scheme, the source data used for marking the electronic goods in the application program can be converted into the target data with the label bit, the converted target data are not larger than the maximum numerical value which can be supported by the machine type, and the converted numerical value is not easy to expose privacy information of the e-commerce platform, such as service growth amount, and potential safety hazards of the platform are avoided.

Description

Information pushing method and device and server
Technical Field
The present application relates to the field of application technologies, and in particular, to a method, an apparatus, and a server for pushing information.
Background
In order to guide the user to consume, the e-commerce platform usually pushes a coupon to the user, the user can view and use the coupon through a terminal device, such as a mobile phone, which is held by the user, and the coupon, as an electronic product, can indicate the uniqueness of the coupon through identification information of the coupon. The identification information is usually numerical data, and the coupon cannot be normally used because the numerical data may exceed the maximum numerical value supported by the terminal device.
In the prior art, a new version of e-commerce platform application program can be developed, and character string type numerical values are adopted in the new version to replace numerical data, so that all terminals can normally use coupons. However, since the string-type value is difficult to calculate and may expose the privacy information of the e-commerce platform, there is a great safety risk.
Disclosure of Invention
In view of this, the application provides a new technical scheme, when guaranteeing that electronic goods can normally demonstrate, has reduced the potential safety hazard of platform to a certain extent.
In order to achieve the above purpose, the present application provides the following technical solutions:
according to a first aspect of the present application, a method for pushing information is provided, including:
converting source data of the electronic goods into target data, wherein the source data are used for identifying the electronic goods, and a numerical value corresponding to the target data is not larger than a maximum numerical value supported by client equipment;
determining information to be displayed of the electronic commodity based on the target data and the attribute information of the electronic commodity;
and pushing the information to be displayed.
According to a second aspect of the present application, a method for pushing information is provided, including:
converting target data of the electronic goods into source data, wherein the source data are used for identifying the electronic goods, and the target data are not larger than a maximum numerical value supported by client equipment;
determining an available attribute value for the electronic article based on the source data;
based on the available attribute value, returning a consumption result of consuming the electronic goods to the client device.
According to a third aspect of the present application, there is provided an information pushing apparatus, including:
the system comprises a first conversion module, a second conversion module and a third conversion module, wherein the first conversion module is used for converting source data of the electronic commodity into target data, the source data is used for identifying the electronic commodity, and the target data is not larger than a maximum numerical value supported by client equipment;
the first determining module is used for determining information to be displayed of the electronic commodity based on the target data and the attribute information of the electronic commodity;
and the first sending module is used for pushing the information to be displayed.
According to a fourth aspect of the present application, a pushing apparatus for information is provided, including:
the second conversion module is used for converting target data of the electronic commodity into source data, the source data are used for identifying the electronic commodity, and the target data are not larger than the maximum numerical value supported by the client equipment;
a second determination module for determining a value of an available attribute of the electronic article based on the source data;
and the second sending module is used for returning a consumption result of consuming the electronic commodity to the client equipment based on the available attribute value.
According to a fifth aspect of the present application, a server is proposed, which comprises a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the push method of information as described in the first aspect above when executing the computer program.
According to a sixth aspect of the present application, a server is proposed, which comprises a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the push method of information as described in the second aspect above when executing the computer program.
According to a seventh aspect of the present application, a computer-readable storage medium is proposed, the storage medium storing a computer program, which when executed by a processor implements the method for pushing information described in the first aspect.
According to an eighth aspect of the present application, a computer-readable storage medium is presented, the storage medium storing a computer program, which when executed by a processor, implements the method for pushing information described in the second aspect.
According to the technical scheme, the source data of the electronic goods pushed to the client device can be converted into the target data which is not larger than the maximum numerical value supported by the client device, therefore, the problem that the electronic goods cannot be normally used due to the fact that the source data exceeds the maximum numerical value supported by the client device can be avoided by converting the source data of the electronic goods in the application program into the target data which can be supported by the client device, in addition, the source data are converted into the target data and then pushed to the client device, the problem that privacy information of an e-commerce platform is easily exposed due to the fact that the source data are directly pushed is solved, and the safety is higher.
Drawings
Fig. 1A shows a flow diagram of a method for pushing information according to an exemplary embodiment of the present invention;
fig. 1B is a schematic diagram illustrating a business process applied to a pushing method of information according to an exemplary embodiment of the present invention;
fig. 1C is a schematic structural diagram illustrating target data in a push method of information according to an exemplary embodiment of the present invention;
fig. 2 shows a flow diagram of a push method of information according to a further exemplary embodiment of the present invention;
fig. 3 shows a flow diagram of a push method of information according to a further exemplary embodiment of the present invention;
fig. 4 shows a flow diagram of a push method of information according to another exemplary embodiment of the present invention;
fig. 5 shows a flow diagram of a method for pushing information according to an exemplary embodiment of the present invention;
fig. 6 shows a flow diagram of a push method of information according to a further exemplary embodiment of the present invention;
FIG. 7 shows a block diagram of a pushing device of information according to an example embodiment of the present invention;
fig. 8 shows a block diagram of a pushing device of information according to a further exemplary embodiment of the present invention;
FIG. 9 shows a block diagram of a pushing device of information according to an example embodiment of the present invention;
fig. 10 shows a schematic configuration diagram of a server according to an exemplary embodiment of the present invention.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
The technical scheme provided by the application can be applied to a server of e-commerce application programs, and the electronic commodities can be coupons, red packages and the like. The source data of the electronic goods in the application refers to a unique identifier assigned by the server for the generated electronic goods, is numerical data, is used for uniquely identifying the electronic goods in the e-commerce platform, and can be stored in a database in the server; the target data is numerical data with a specific format, the numerical data is obtained by compressing the source data and has a label bit and a basic bit, the target data and the attribute information of the electronic commodity are pushed to the client device for use and display, and the display refers to hidden display which cannot be seen by a user and is hidden in the electronic commodity.
For further explanation of the present application, the following examples are provided:
fig. 1A is a schematic flowchart illustrating a pushing method of information according to an exemplary embodiment of the present invention, fig. 1B is a schematic flowchart illustrating a business process applied to the pushing method of information according to an exemplary embodiment of the present invention, and fig. 1C is a schematic diagram illustrating a structure of target data in the pushing method of information according to an exemplary embodiment of the present invention; the information pushing method may be applied to a server, as shown in fig. 1A, the information pushing method in this embodiment may include the following steps 101 to 103:
step 101, converting source data of the electronic goods into target data.
In one embodiment, the source data is used to identify the electronic article, the target data is composed of a tag bit and a base bit, and a value corresponding to the target data is not greater than a maximum value supported by the client device. The manner of converting the source data of the electronic goods into the target data may refer to the embodiment shown in fig. 2, which will not be described here.
In an embodiment, the types of the electronic goods are various, and the embodiment is illustrated by taking a coupon as an example, referring to fig. 1B, when the electronic goods need to be issued to the client device or when the client device queries information of the electronic goods, it may be determined that the electronic goods need to be pushed to the client device. The electronic goods can be used for promoting a user to place an order, various scenes for issuing the electronic goods to the client equipment are available, and the electronic goods can be actively triggered by the client equipment, for example, when the user inputs a mobile phone number through the client equipment to execute operations of acquiring a coupon or acquiring a red packet and the like, the server issues the electronic goods to the client; the electronic goods may also be automatically issued to the client device by the server, for example, after the user performs an ordering operation on the client device, the server automatically issues a red packet (electronic goods) to the user, or after the user completes a comment, automatically issues a coupon (electronic goods) to the user, and so on. The processing flow of the ticket issuing service can refer to the embodiment shown in fig. 3, and will not be described in detail here.
In an embodiment, when a user triggers an operation of checking a coupon owned by the user on a certain e-commerce platform through client equipment, the client equipment can send a request message for checking the coupon to a server, a service layer function module of the server can execute a coupon checking service, source data of the coupon enjoyed by the client equipment is converted into target data, and the target data and attribute information of the coupon are generated into information to be displayed and pushed to the client equipment. The processing flow of the ticket checking service can refer to the embodiment shown in fig. 4, and will not be described in detail here.
In an embodiment, the data format of the target data may refer to the embodiment shown in fig. 1C, and includes a tag bit and a base bit, where the bit number m of the tag bit is an empirical value obtained based on statistics of mass data, and may be determined according to the growth amount and experience of the service, and may be set to a value between 2 and 5 in general.
And 102, determining information to be displayed of the electronic commodity based on the target data and the attribute information of the electronic commodity.
In one embodiment, the attribute information of the electronic product is used for indicating the denomination, the usage limitation condition and the like of the electronic product, for example, the attribute information of the electronic product is a 30-element coupon, and the coupon is only used for purchasing the fresh products.
In one embodiment, the attribute information of the electronic goods can be directly and explicitly displayed on the interface of the client device, but the target data of the electronic goods is implicitly used on the client device for indicating the electronic goods.
And 103, pushing information to be displayed.
It should be noted that the above description is only exemplified by the coupon, and the electronic product of the present application may also be other product types, such as an electronic red envelope.
In this embodiment, in the present application, source data (unique identifier) of an electronic product (such as a coupon or an electronic red packet) pushed to a client device may be converted into target data that is not greater than a maximum value supported by the client device, so that by converting the source data of the electronic product in an application program into the target data that can be supported by the client device, a problem that the electronic product cannot be normally used due to the source data exceeding the maximum value supported by the client device may be avoided.
Fig. 2 shows a flow diagram of a push method of information according to a further exemplary embodiment of the present invention; based on the above embodiments, the present embodiment takes an example of converting source data of an electronic product into target data, as shown in fig. 2, and includes the following steps:
step 201, calculating the maximum value of the base bit to obtain a first numerical value, and calculating the value obtained by adding one to the maximum value corresponding to the tag bit to obtain a second numerical value.
In one embodiment, wherein the target data is composed of base bits and tag bits, a sum of a number of bits of the tag bits and a number of bits of the base bits does not exceed a number of bits of a maximum number that can be supported by the client device.
In one embodiment, assuming that the number of bits of the tag bit is m, the number of bits of the maximum value max that the client device can represent is length, where m is greater than or equal to 1 and less than or equal to length-1, and the number of bits n of the base bit is length-m. Since the value of m is a known value obtained based on the trade-off and empirical data, and the number of bits length of the maximum value max that each model can represent is also a fixed value, the value of n is also a fixed value.
In one embodiment, the maximum value of the base bits, viewIdBaseMax, may be calculated by equation (1):
viewIdBaseMax=10n+1-1 formula (1)
In one embodiment, the first 1-m bits of max are taken to obtain the maximum value of the tag bits, see formula (2):
tagMax=max/10n-1 formula (2)
Wherein, the range of the tag value tag corresponding to the tag bit is [0, tagMax ].
In an embodiment, for a type of service, the values of m and n are fixed values, so that the first numerical value and the second numerical value corresponding to the electronic product generated in the type of service are the same, and therefore, there is no need to perform a calculation for each electronic product.
Step 202, calculating a quotient of the source data and the first numerical value to obtain a step length of the basic bit; and performing complementation calculation on the step length of the source data and the basic bit to obtain a basic value corresponding to the basic bit.
In one embodiment, the step size realStep of the base bit can be calculated by equation (3):
realStep ═ realId/viewIdBaseMax formula (3)
In the formula (3), the realdid is the source data, the viewIdBaseMax is the first value calculated by the formula (1), and the realdstep is the step size of the base bit, that is, the step size of the viewIdBaseMax, which can be understood as how many viewIdBaseMax are included in the realdid.
In one embodiment, the base value corresponding to the base bit can be calculated by equation (4):
viewIdBase ═ realdvywIdBaseMax equation (4)
In the formula (4), the realId is the source data, the viewIdBaseMax is the first numerical value calculated by the formula (1), and the viewIdBase is the base value corresponding to the base bit.
Step 203, performing remainder calculation on the step length of the basic bit and the second numerical value to obtain a tag value corresponding to the tag bit; and calculating the quotient of the step size of the basic bit and the second numerical value to obtain the step size of the label bit.
In one embodiment, the tag value tag of the tag bit can be calculated by equation (5):
tag ═ realStep% (tag Max +1) formula (5)
In one embodiment, the step size of the tag bit can be understood as how many tagMax are included in the realStep, and the step size tagBase of the tag bit can be calculated by equation (6):
tagBase ═ realStep/(tagMax +1) formula (6)
Step 204, determining the target data based on the base value corresponding to the base bit and the tag value corresponding to the tag bit.
In one embodiment, the target data can be calculated by equation (7):
viewId=tag*10n+ viewIdBase formula (7)
It should be noted that, in the above description, the two-time hash function calculation in step 202 and step 203 is taken as an example for illustration, and the target data may also be obtained by more than three times of hash calculation.
In the embodiment, the source data is compressed to obtain the target data which can be represented by the model of the client device, the target data is represented by the label bit and the base bit, the risk of numerical data overflow in part of models is solved, the increment of services is not easy to expose, and the method is safer.
Fig. 3 shows a flow diagram of a push method of information according to a further exemplary embodiment of the present invention; based on the above embodiments, the present embodiment takes the processing flow of the issuing service as an example for illustration, and as shown in fig. 3, the present embodiment includes the following steps:
step 301, when the electronic goods need to be issued to the client device, generating an electronic goods, and executing step 302 and step 303.
In an embodiment, there are various scenarios for issuing electronic goods to the client device, which may be actively triggered by the client device, for example, when a user inputs a mobile phone number through the client device to execute operations of acquiring a coupon or acquiring a red packet, etc., the server issues the electronic goods to the client; the electronic goods may also be automatically issued to the client device by the server, for example, after the user performs an ordering operation on the client device, the server automatically issues an electronic red packet (electronic goods) to the user, or after the user completes a comment, the server automatically issues a coupon (electronic goods) to the user, and so on.
Step 302, storing the corresponding relationship among the device identifier of the client device to which the electronic goods belong, the source data of the electronic goods and the attribute information of the electronic goods in a database.
In an embodiment, the source data and the attribute information of the electronic goods generated by the server and the device identification of the client device to which the electronic goods belong are stored in the database, so that when a user uses the electronic goods through the client device, the relevant data of the electronic goods can be extracted from the database, malicious users can be prevented from swiping coupons and the like, and malicious users can be prevented from using the blank data to make fake coupons and the like, because the source data obtained by restoring the blank data cannot be recorded in the database.
In one embodiment, the data state of the source data can be determined based on the expiration date and the commodity state of the electronic commodity indicated by the source data, and the source data can be deleted from the database when the data state of the source data is in an invalid state.
In an embodiment, if the electronic product exceeds the corresponding validity period, the source data corresponding to the electronic product may be determined to be invalid data, for example, if the validity period of a coupon issued to the client device is up to 2018, month 2 and 1, the source data corresponding to the coupon becomes invalid data even if the coupon is not used when the time is exceeded. In one embodiment, if the commodity status of the electronic commodity is consumed, the source data corresponding to the electronic commodity is determined to be invalid data, for example, a coupon is used, which indicates that the coupon is consumed, the source data corresponding to the coupon is determined to be invalid data, and the invalid data can be deleted from the database. In one embodiment, the invalid data in the database can be cleaned in real time, and the invalid data in the database can also be cleaned periodically.
Step 303, converting the source data of the electronic goods into target data, where the source data is used to identify the electronic goods, and a value corresponding to the target data is not greater than a maximum value supported by the client device.
And step 304, determining information to be displayed of the electronic commodity based on the target data and the attribute information of the electronic commodity.
Step 305, pushing information to be displayed.
In one embodiment, the description of steps 303-304 can be found in the description of steps 101-103 of the embodiment shown in fig. 1A, and will not be described in detail here.
In the embodiment, the generation of the electronic goods and the issuing process to the client device in the coupon issuing business process are disclosed, and the issued coupon can be recognized and used by the client device by generating source data (used for identifying the electronic goods and converting the electronic goods into target data) for the electronic goods.
Fig. 4 shows a flow diagram of a push method of information according to a further exemplary embodiment of the present invention; based on the above embodiments, the present embodiment takes a processing flow of a coupon checking service as an example for illustration, and as shown in fig. 4, the present embodiment includes the following steps:
step 401, when a request of the client device for inquiring the information of the electronic goods is received, source data corresponding to the device identifier of the client device and attribute information of the electronic goods corresponding to the source data are obtained from the database.
In an embodiment, when the electronic goods are issued, the service module stores the device identifier of the client device to which the electronic goods belong, the corresponding relationship between the source data of the electronic goods and the attribute information of the electronic goods in the database, so that when the client device queries the information of the electronic goods, the server may query the source data, the attribute information and the like corresponding to the electronic goods of the client device in the database.
In an embodiment, a user may typically perform an operation of viewing information of available coupons, red packs, etc. electronic merchandise when the items need to be purchased.
Step 402, converting source data of the electronic goods into target data, wherein the source data is used for identifying the electronic goods.
And step 403, determining information to be displayed of the electronic commodity based on the target data and the attribute information of the electronic commodity.
Step 404, pushing information to be displayed.
In one embodiment, the description of steps 402-404 can be referred to the description of steps 101-103 of the embodiment shown in fig. 1A, and will not be described in detail here.
In the embodiment, the process of providing the information of the e-commerce to the client device in the coupon checking business process is disclosed, and the issued coupon can be identified and used by the client device by converting the source data extracted from the database and then sending the source data to the client device.
Fig. 5 shows a flow diagram of a method for pushing information according to an exemplary embodiment of the present invention; the information pushing method may be applied to a server, as shown in fig. 5, the information pushing method in this embodiment may include the following steps 501 to 503:
step 501, converting target data of the electronic goods into source data.
In one embodiment, the source data is used to identify the electronic article, the target data is composed of a tag bit and a base bit, and a value corresponding to the target data is not greater than a maximum value supported by the client device.
In an embodiment, when a user triggers an operation of using an electronic product (such as a coupon) of a certain e-commerce platform, a client device receives the operation of consuming the electronic product by the user, and can send a request message for acquiring the electronic product to a server, and a service layer function module of the server can restore target data of the electronic product to source data.
In one embodiment, the rules for restoring the target data to the source data may be referred to in the embodiment shown in fig. 6, and will not be described in detail here.
At step 502, based on the source data, a value of an available attribute of the electronic article is determined.
In an embodiment, the available attribute value of the electronic product may be understood as whether the electronic product to be used by the client device is available, if the converted source data can be queried from the database, the available attribute value of the electronic product may be determined to be available, further, other attribute information corresponding to the source data may be obtained from the database, such as a quota, and if the source data cannot be queried from the database, the available attribute value of the electronic product may be determined to be unavailable, and even if the coupon is a coupon obtained by the user through a hidden coupon swiping behavior.
Step 503, returning the consumption result of the consumer electronic goods to the client device based on the available attribute value.
In one embodiment, if the available attribute value is available, it may be determined that the user may use the electronic goods, and thus the consumption result is a successful consumption; if the available attribute value is unavailable, it is determined that the user cannot use the electronic goods, and thus the consumption result is consumption failure.
In this embodiment, in the application, when the user consumes the electronic goods, the source data can be restored through the restoration rule, and whether the electronic goods are available is determined based on the source data, and the consumption result of the corresponding consumer electronic goods is returned to the client device, so that the use safety of the electronic goods can be further increased.
Fig. 6 shows a flow chart diagram of a pushing method of numerical type information according to yet another exemplary embodiment of the present invention; based on the above embodiments, the present embodiment takes the example of converting the target data of the electronic product into the source data, as shown in fig. 6, and includes the following steps:
step 601, calculating a quotient of the target data and the third numerical value to obtain a label value corresponding to the label bit; and performing complementation calculation on the target data and the third numerical value to obtain a basic value corresponding to the basic bit.
In an embodiment, the third value is 10n, which can be obtained by the number of bits of the base bits in the target data, and the tag value tag corresponding to the tag bit is obtained by analyzing based on the target data viewId and the number of bits n of the base bits in the target data according to equation (8):
tag=viewId/10nformula (8)
In the formula (8), since the value of n can be determined based on the bit number m of the tag bit, the bit length of the maximum value max that the model can represent, and generally, for the electronic goods in one cycle, the value of n is a fixed value, which is described in detail in the embodiment shown in fig. 2.
In one embodiment, the base value viewIdBase corresponding to the base bit can be obtained by analyzing based on the target data viewId and the number n of the base bit in the target data according to equation (9):
viewIdBase=viewId%10nformula (9)
Step 602, calculating a reduction value based on the step size of the tag bit, the maximum value of the tag bit, the tag value corresponding to the tag bit, the base value corresponding to the base bit, and the maximum value of the base bit, and performing step 603 or step 604.
In one embodiment, the reduction value may be calculated based on the step size tagBase of the tag bit, the maximum value tagMax of the tag bit, the tag value tag corresponding to the tag bit, the base value viewIdBase corresponding to the base bit, and the maximum value viewIdBaseMax of the base bit by equation (10):
h ═ tagBase: (tagMax + tag): viewIdBaseMax + viewIdBase formula (10)
In one embodiment, tagBase, tagMax, viewIdBaseMax may all be calculated and stored during the process of compressing the source data to the target data, see the embodiment shown in fig. 2.
Step 603, if the reduction value is greater than or equal to the set maximum value of the current period, obtaining the step length of the basic bit by adopting a first reduction algorithm.
In one embodiment, the set maximum value of the current period may be understood as the maximum value of the source data of the current coupon under the current service, such as currentId.
In an embodiment, in each service period, it may be ensured that the source data and the target data are in one-to-one correspondence based on a modulo algorithm, when the step size tagBase of the tag bit is increased by 1, the target data generated in the previous period is subjected to a reduction method, and a pre-calculated reduction value is definitely a value in a new period, and a reduction value obtained after the target data generated in the new period is reduced also falls in the new period, and if the calculated reduction value is greater than currentId, the reduction value is considered to be generated in the previous period, so that the step size of the base bit may be obtained through the first reduction algorithm, see equation (11):
realStep ═ (tagBase-1) × (tagMax + tag formula (11)
And step 604, if the reduction value is smaller than the set maximum value of the current period, obtaining the step length of the basic bit by adopting a second reduction algorithm.
In one embodiment, if the reduction value is smaller than the current maximum value, the reduction value is considered to be generated in the present period, and the step size of the base bit can be obtained through a second reduction algorithm, see formula (12):
realStep ═ tagBase ═ tagMax + tag formula (12)
Step 605, calculating to obtain the source data based on the step size of the basic bit, the maximum value of the basic bit, and the basic value corresponding to the basic bit.
In one embodiment, the source data can be calculated by equation (13) based on the step size of the base bit, the maximum value of the base bit, and the base value corresponding to the base bit:
realId: realStep viewIdBaseMax + viewIdBase formula (13)
The process of restoring the target data to the source data corresponds to the process of compressing the source data to the target data, and when the process of compressing the source data to the target data changes, the process of restoring the target data to the source data also changes correspondingly.
In this embodiment, the target data is reduced to the source data for compression, so that the unique identification information corresponding to the electronic goods can be obtained, and further, the effective normal consumption and use of the electronic goods can be realized.
It should be noted that, the coupon is taken as an example for illustration, and those skilled in the art can understand that, for different types of electronic goods, for example, red packages and the like, target data for pushing to a client device for use and display can be generated in the manner of the present application, that is, the pushing method of information in the present application is not limited to the coupon.
Corresponding to the embodiment of the pushing method of the information, the application also provides an embodiment of a pushing device of the information.
Fig. 7 is a block diagram illustrating a pushing apparatus of information according to an exemplary embodiment of the present invention, and as shown in fig. 7, the pushing apparatus of information includes:
a first conversion module 71, configured to convert source data of the electronic goods into target data, where the source data is used to identify the electronic goods, and a value corresponding to the target data is not greater than a maximum value supported by the client device;
the first determining module 72 is configured to determine information to be displayed of the electronic goods based on the target data and the attribute information of the electronic goods;
and the first sending module 73 is used for pushing the information to be displayed.
Fig. 8 shows a block diagram of an information pushing apparatus according to another exemplary embodiment of the present invention, and as shown in fig. 8, on the basis of the above embodiment shown in fig. 7, in an embodiment, the first conversion module 71 is specifically configured to:
calculating the quotient of the source data and a first numerical value to obtain the step length of the basic bit, wherein the first numerical value is the maximum value corresponding to the basic bit;
performing complementation calculation on the step length of the source data and the basic bit to obtain a basic value corresponding to the basic bit;
performing complementation calculation on the step length of the basic bit and a second numerical value to obtain a tag value corresponding to the tag bit, wherein the second numerical value is a value obtained by adding one to the maximum value corresponding to the tag bit;
calculating the quotient of the step length of the basic bit and the second numerical value to obtain the step length of the label bit;
determining target data based on a base value corresponding to the base bits and a tag value corresponding to the tag bits;
the target data is composed of basic bits and tag bits, and the sum of the bits of the tag bits and the bits of the basic bits does not exceed the number of bits of the maximum numerical value supported by the client device.
In an embodiment, the apparatus further comprises:
the information obtaining module 74 is configured to obtain, from a database, source data corresponding to the device identifier of the client device and attribute information of the electronic product corresponding to the source data, where a corresponding relationship among the device identifier of the client device, the source data of the electronic product, and the attribute information of the electronic product is recorded in the database.
In an embodiment, the apparatus further comprises:
a third determining module 75, configured to determine a data state of the source data based on the validity period and the commodity state of the electronic commodity indicated by the source data;
and a deleting module 76, configured to delete the source data from the database when the data state of the source data is an invalid state.
In an embodiment, the third determining module 75 is specifically configured to:
if the electronic goods exceed the corresponding validity period, determining the source data corresponding to the electronic goods as invalid data; alternatively, the first and second electrodes may be,
and if the commodity state of the electronic commodity is consumed, determining that the source data corresponding to the electronic commodity is invalid data.
Fig. 9 is a block diagram illustrating a pushing apparatus of information according to an exemplary embodiment of the present invention, and as shown in fig. 9, the pushing apparatus of information includes:
the second conversion module 91 is configured to convert target data of the electronic goods into source data, where the source data is used to identify the electronic goods, and a numerical value corresponding to the target data is not greater than a maximum numerical value supported by the client device;
a second determining module 92, configured to determine an available attribute value of the electronic article based on the source data;
and a second sending module 93, configured to return a consumption result of the consumer electronic goods to the client device based on the available attribute value.
In an embodiment, the second conversion module 91 is specifically configured to:
calculating the quotient of the target data and a third numerical value to obtain a label value corresponding to the label bit, wherein the third numerical value is obtained through the bit number of the basic bit in the target data;
performing remainder calculation on the target data and the third numerical value to obtain a basic value corresponding to the basic bit;
calculating a reduction value based on the step length of the tag bit, the maximum value of the tag bit, the tag value corresponding to the tag bit, the basic value corresponding to the basic bit and the maximum value of the basic bit;
if the reduction value is larger than or equal to the set maximum value of the current period, obtaining the step length of the basic bit by adopting a first reduction algorithm;
if the reduction value is smaller than the set maximum value of the current period, obtaining the step length of the basic bit by adopting a second reduction algorithm;
calculating to obtain source data based on the step length of the basic bit, the maximum value of the basic bit and the basic value corresponding to the basic bit;
the target data is composed of basic bits and tag bits, and the sum of the bit number of the tag bits and the bit number of the basic bits does not exceed the bit number of the maximum value which can be represented and supported by the client device.
In an embodiment, the second determining module 92 is specifically configured to:
if the source data can be inquired from the database, determining that the available attribute value of the electronic commodity is available, and recording the corresponding relation among the equipment identifier of the client equipment, the source data of the electronic commodity and the attribute information of the electronic commodity in the database;
and if the source data cannot be inquired from the database, determining the available attribute value of the electronic commodity as unavailable.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the application. One of ordinary skill in the art can understand and implement it without inventive effort.
The present application also proposes a schematic structural diagram of a server according to an exemplary embodiment of the present invention shown in fig. 10, corresponding to the above-mentioned information push method. Referring to fig. 10, at the hardware level, the server includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, but may also include hardware required for other services. The processor reads the corresponding computer program from the nonvolatile memory into the memory and then runs the computer program to form the pushing device of the information on the logic level. Of course, besides the software implementation, the present application does not exclude other implementations, such as logic devices or a combination of software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, and may also be hardware or logic devices.
In an exemplary embodiment, there is also provided a computer-readable storage medium storing a computer program for executing the above-described information push method, wherein the computer-readable storage medium may be a Read Only Memory (ROM), a Random Access Memory (RAM), a compact disc read only memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, and the like.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
The present invention is not intended to be limited to the particular embodiments shown and described, but is to be accorded the widest scope consistent with the principles and novel features herein disclosed.

Claims (9)

1. A method for pushing information, the method comprising:
converting source data of the electronic goods into target data, wherein the source data are used for identifying the electronic goods, and a numerical value corresponding to the target data is not larger than a maximum numerical value supported by client equipment; wherein the source data and the target data are both numerical data;
determining information to be displayed of the electronic commodity based on the target data and the attribute information of the electronic commodity;
pushing the information to be displayed;
when a user uses the electronic commodity, converting target data of the electronic commodity into source data, wherein the source data are used for identifying the electronic commodity, and the target data are not larger than a maximum numerical value supported by client equipment;
determining an available attribute value for the electronic article based on the source data;
returning a consumption result of consuming the electronic goods to the client device based on the available attribute value;
wherein, the converting the source data of the electronic goods into the target data comprises:
calculating a quotient of the source data and a first numerical value to obtain a step length of a basic bit, wherein the first numerical value is a maximum value corresponding to the basic bit;
performing remainder calculation on the step length of the source data and the basic bit to obtain a basic value corresponding to the basic bit;
performing complementation calculation on the step length of the basic bit and a second numerical value to obtain a tag value corresponding to the tag bit, wherein the second numerical value is a value obtained by adding one to the maximum value corresponding to the tag bit;
calculating the quotient of the step length of the basic bit and the second numerical value to obtain the step length of the label bit;
determining the target data based on a base value corresponding to the base bit and a tag value corresponding to the tag bit;
the target data is composed of the base bits and the tag bits, and the sum of the number of the tag bits and the number of the base bits does not exceed the number of bits of the maximum value which can be supported by the client device.
2. The method of claim 1, further comprising, prior to said converting the source data of the electronic merchandise to the target data:
and acquiring source data corresponding to the equipment identifier of the client equipment and attribute information of the electronic commodity corresponding to the source data from a database, wherein the database records the corresponding relation among the equipment identifier of the client equipment, the source data of the electronic commodity and the attribute information of the electronic commodity.
3. The method of claim 2, further comprising:
determining the data state of the source data based on the validity period and the commodity state of the electronic commodity marked by the source data;
and deleting the source data from the database when the data state of the source data is an invalid state.
4. The method of claim 3, wherein determining the data status of the source data based on the expiration date and commodity status of the electronic commodity indicated by the source data comprises:
if the electronic commodity exceeds the corresponding valid period, determining that the source data corresponding to the electronic commodity is invalid data;
and if the commodity state of the electronic commodity is consumed, determining that the source data corresponding to the electronic commodity is invalid data.
5. The method of claim 1, wherein converting the target data of the electronic merchandise to source data comprises:
calculating a quotient of the target data and a third numerical value to obtain a label value corresponding to a label bit, wherein the third numerical value is obtained through the bit number of a basic bit in the target data;
performing remainder calculation on the target data and a third numerical value to obtain a basic value corresponding to the basic bit;
calculating a reduction value based on the step length of the tag bit, the maximum value of the tag bit, the tag value corresponding to the tag bit, the base value corresponding to the base bit and the maximum value of the base bit;
if the reduction value is larger than or equal to the set maximum value of the current period, obtaining the step length of the basic bit by adopting a first reduction algorithm;
if the reduction value is smaller than the set maximum value of the current period, obtaining the step length of the basic bit by adopting a second reduction algorithm;
calculating to obtain the source data based on the step length of the basic bit, the maximum value of the basic bit and the basic value corresponding to the basic bit;
wherein the target data is composed of the base bits and the tag bits, and the sum of the number of bits of the tag bits and the number of bits of the base bits does not exceed the number of bits that can represent the maximum number of values supported by the client device.
6. The method of claim 1, wherein determining the value of the available attribute of the electronic article based on the source data comprises:
if the source data can be inquired from a database, determining that the available attribute value of the electronic commodity is available, wherein the database records the equipment identification of the client equipment, the source data of the electronic commodity and the corresponding relation between the attribute information of the electronic commodity;
and if the source data cannot be inquired from the database, determining that the available attribute value of the electronic commodity is unavailable.
7. An apparatus for pushing information, the apparatus comprising:
the system comprises a first conversion module, a second conversion module and a third conversion module, wherein the first conversion module is used for converting source data of the electronic commodity into target data, the source data is used for identifying the electronic commodity, and a numerical value corresponding to the target data is not more than a maximum numerical value supported by client equipment; wherein the source data and the target data are both numerical data;
the first determining module is used for determining information to be displayed of the electronic commodity based on the target data and the attribute information of the electronic commodity;
the first sending module is used for pushing the information to be displayed;
the second conversion module is used for converting target data of the electronic commodity into source data when a user uses the electronic commodity, the source data are used for identifying the electronic commodity, and the target data are not larger than the maximum numerical value supported by the client equipment;
a second determination module for determining a value of an available attribute of the electronic article based on the source data;
a second sending module, configured to return a consumption result of consuming the electronic goods to the client device based on the available attribute value;
the first conversion module is specifically configured to calculate a quotient of the source data and a first numerical value to obtain a step length of the base bit, where the first numerical value is a maximum value corresponding to the base bit; performing complementation calculation on the step length of the source data and the basic bit to obtain a basic value corresponding to the basic bit; performing complementation calculation on the step length of the basic bit and a second numerical value to obtain a tag value corresponding to the tag bit, wherein the second numerical value is a value obtained by adding one to the maximum value corresponding to the tag bit; calculating the quotient of the step length of the basic bit and the second numerical value to obtain the step length of the label bit; determining target data based on a base value corresponding to the base bits and a tag value corresponding to the tag bits; the target data is composed of basic bits and tag bits, and the sum of the bits of the tag bits and the bits of the basic bits does not exceed the number of bits of the maximum numerical value supported by the client device.
8. A server comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method for pushing information according to any of the preceding claims 1-6 when executing the computer program.
9. A computer-readable storage medium, characterized in that the storage medium stores a computer program, which when executed by a processor implements the steps of the method for pushing information according to any one of claims 1 to 6.
CN201810589910.6A 2018-06-08 2018-06-08 Information pushing method and device and server Active CN110580633B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810589910.6A CN110580633B (en) 2018-06-08 2018-06-08 Information pushing method and device and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810589910.6A CN110580633B (en) 2018-06-08 2018-06-08 Information pushing method and device and server

Publications (2)

Publication Number Publication Date
CN110580633A CN110580633A (en) 2019-12-17
CN110580633B true CN110580633B (en) 2021-03-02

Family

ID=68810251

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810589910.6A Active CN110580633B (en) 2018-06-08 2018-06-08 Information pushing method and device and server

Country Status (1)

Country Link
CN (1) CN110580633B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101582106A (en) * 2009-06-19 2009-11-18 重庆邮电大学 Integrity inspection method for fine-grained data
CN101594480A (en) * 2008-05-30 2009-12-02 新奥特(北京)视频技术有限公司 A kind of method of processing caption data
CN107749861A (en) * 2017-11-16 2018-03-02 平安科技(深圳)有限公司 Information-pushing method, device, terminal device and storage medium
CN108108436A (en) * 2017-12-20 2018-06-01 东软集团股份有限公司 Date storage method, device, storage medium and electronic equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101594480A (en) * 2008-05-30 2009-12-02 新奥特(北京)视频技术有限公司 A kind of method of processing caption data
CN101582106A (en) * 2009-06-19 2009-11-18 重庆邮电大学 Integrity inspection method for fine-grained data
CN107749861A (en) * 2017-11-16 2018-03-02 平安科技(深圳)有限公司 Information-pushing method, device, terminal device and storage medium
CN108108436A (en) * 2017-12-20 2018-06-01 东软集团股份有限公司 Date storage method, device, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN110580633A (en) 2019-12-17

Similar Documents

Publication Publication Date Title
CN112000747B (en) Data multidimensional analysis method, device and system
CN111008869A (en) Advertisement recommendation method and device, electronic equipment and storage medium
CN109697454B (en) Cross-device individual identification method and device based on privacy protection
CN104850556B (en) A kind of method and device of data processing
CN111028009A (en) Method and device for processing retrievable service entity
CN109302300B (en) Data distribution and processing method, system and computer readable recording medium
US11533163B2 (en) Mining method and device based on blockchain, and computer readable storage medium
CN110188276B (en) Data transmission device, method, electronic device, and computer-readable storage medium
CN105260848A (en) Cigarette production management method based on two-dimensional code
CN112511535A (en) Equipment detection method, device, equipment and storage medium
CN111667317A (en) Service processing method, device and system
CN110347887B (en) Method and device for acquiring time sequence data of service scene
CN113837617A (en) Anti-bill-swiping risk management method and device
CN110580633B (en) Information pushing method and device and server
CN111898937B (en) Inventory management method, device, equipment and system
CN106919609B (en) Product information pushing method and device
CN112907263A (en) Abnormal order quantity detection method, device, equipment and storage medium
CN109688178A (en) Recommended method, device and equipment
CN110943903B (en) Information processing method and device
CN111292108A (en) Order counting method, device, equipment and computer readable storage medium
CN111709769A (en) Data processing method and device
CN111383109A (en) Copyright transaction method and device for picture
CN114187037A (en) Information pushing method and device and nonvolatile storage medium
CN108629610B (en) Method and device for determining popularization information exposure
CN112581161B (en) Object selection method and device, storage medium and electronic equipment

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
GR01 Patent grant
GR01 Patent grant