CN106779974B - Article transaction method and system - Google Patents

Article transaction method and system Download PDF

Info

Publication number
CN106779974B
CN106779974B CN201710011201.5A CN201710011201A CN106779974B CN 106779974 B CN106779974 B CN 106779974B CN 201710011201 A CN201710011201 A CN 201710011201A CN 106779974 B CN106779974 B CN 106779974B
Authority
CN
China
Prior art keywords
robot
transaction
information
quotation
item
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
CN201710011201.5A
Other languages
Chinese (zh)
Other versions
CN106779974A (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.)
Softisland Inc
Original Assignee
Softisland Inc
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 Softisland Inc filed Critical Softisland Inc
Priority to CN201710011201.5A priority Critical patent/CN106779974B/en
Publication of CN106779974A publication Critical patent/CN106779974A/en
Application granted granted Critical
Publication of CN106779974B publication Critical patent/CN106779974B/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/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0621Item configuration or customization
    • 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/0611Request for offers or quotes

Landscapes

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

Abstract

The invention discloses an article trading method and system, wherein the trading method comprises the following steps: s1, logging in the robot; s2, the robot server obtains the information of the article to be traded; s3, the robot server searches for the online robot and judges that the residual capacity of the backpack of the robot is not less than the number of the articles in the transaction; s4, sending a piece of quotation information to the user, calling back a status code of successful quotation information to the front-end service client after successful sending of the quotation information, and starting the robot server to inquire the user to confirm the quotation status; s5, judging whether the quantity of the newly acquired articles in the robot backpack is equal to the quantity of the articles to be traded; and S6, comparing the articles in the robot backpack, and finishing shelving after the comparison is successful. The invention realizes the real-time transaction of the articles in 7 x 24 hours, and enhances the experience of the user.

Description

Article transaction method and system
Technical Field
The invention relates to the technical field of virtual goods, in particular to a method and a system for trading goods.
Background
With the development of network games, virtual item transactions among players have become one of indispensable components in network games. At present, relevant data is obtained through a SteamAPI interface mode in a transaction process, once a SteamApi is hung, the transaction cannot be carried out, 7-24-hour real-time transaction of an article cannot be realized, the experience of a player is not facilitated, and how to realize 7-24-hour real-time article transaction becomes a difficult problem to be solved urgently at present.
Disclosure of Invention
The invention aims to at least solve the technical problems in the prior art, and particularly provides an article transaction method and system.
In order to achieve the above object, the present invention provides an article transaction method, which specifically includes the following steps:
s1, initializing the robot, reading the robot information and reading and writing the robot information into the corresponding node branches according to the configured robot information when the application is started, respectively performing automatic login, if the login is successful, writing the robot information into the node branches of the online robot, otherwise, writing the robot information into the node branches of the offline robot, and scheduling tasks at regular time to perform one-time automatic login;
s2, the front-end service client sends a goods-on-shelf request to the robot server, and packages and sorts request parameters;
s3, the robot server searches for the online robot, judges whether the robot is locked, belongs to the game robot and can be put on shelf, if the robot is locked, or does not belong to the game robot or can not be put on shelf, continues searching;
otherwise, judging whether the residual capacity of the robot backpack exceeds the quantity of the articles in the transaction, if the quantity of the articles in the transaction does not exceed the residual capacity of the robot backpack, executing the next step, recording data into a text file, and otherwise, continuously searching;
s4, locking the robot and not allowing the robot to be used by other racking requests; sending a piece of quotation information to a user, recording an execution state, calling back a state code of successful quotation information to a front-end service client after the quotation information is successfully sent, starting and inquiring the quotation state confirmed by the user by a robot server, cancelling the transaction if the user does not confirm the quotation within a specified time, and otherwise, executing the next step;
s5, comparing the data in the backpack with the data in the backpack to obtain the number of the newly acquired articles in the backpack, judging whether the number is equal to the number of the articles to be traded, if so, executing the next step, otherwise, continuously acquiring the data in the backpack;
and S6, comparing the articles in the backpack of the robot, completing shelving after successful comparison, releasing the robot, wherein the robot is in an unlocked state, updating the acquisition time of the robot, and acquiring the robot in the last sequence when the robot is shelved next time.
The method and the device realize the shelf-mounted article service within 24 hours of the user, and avoid the situation that the transaction cannot be carried out due to the hanging of the SteamaApi; enhancing the player's experience.
In a preferred embodiment of the present invention, the method further comprises the steps of:
s7, the front-end service client sends a retrieval request to the robot server through the encapsulated object, the robot server searches the robot with the article to be retrieved, judges whether the robot is on-line, if not, the automatic login function is started; otherwise, executing the next step;
s8, sending a quotation message to the user and recording the execution state, calling back the successful state code of the quotation message to the front-end service client after the quotation message is successfully sent, starting the automatic quotation confirmation function by the robot, inquiring whether the user confirms the quotation, canceling the transaction if the user does not confirm the quotation within the specified time, otherwise, finishing the retrieval.
The method and the device realize that the user can retrieve the goods service within 24 hours, and the condition that the transaction cannot be carried out due to the hanging of the SteamaApi is avoided; enhancing the gaming experience for the player.
In a preferred embodiment of the present invention, in step S6, the alignment comprises the following steps:
s31, acquiring certain attribute information of the to-be-traded articles, and sequencing the attribute information in sequence;
s32, acquiring the same attribute information of the newly acquired articles after the transaction as that in the step S31, and then sequentially arranging the attribute information of the newly acquired articles;
s33, corresponding the items to be traded in the step S31 and the newly obtained attribute information of the items in the step S32 one by one; find out the corresponding relation between the article to be traded and the newly obtained article.
S34, comparing whether the one or more fixed and unchangeable attribute information of the item to be traded and the newly acquired item corresponding to the item one to one is the same; if the two are the same, completing racking; otherwise, refusing to put on shelf. Such alignment is advantageous to prevent tampering with the article.
The comparison method is simple, fast and effective to find out whether the articles before and after the transaction are the same article.
In a preferred embodiment of the present invention, the pid information of the article is acquired in step S31.
In a preferred embodiment of the present invention, the classid and intanceid information, or the classid and markhashname information, of the item are compared in step S34.
In a preferred embodiment of the invention, the system further comprises error prompt information, wherein the error prompt information comprises one or a combination of overtime of user confirmation, expired transaction, busy robot, error in transaction link format, invalid robot session and invalid commodity.
The invention also discloses a trading system of the article trading method, the trading system comprises a management module, an inventory module and a trading module, wherein the management module is respectively connected with the inventory module and the trading module; the management module is used for managing the type, on-line, off-line and occupation of the robot; the inventory module is used for inquiring the user backpack service type and the article information; the transaction module is used for a user to carry out shelving and retrieving business operation; when the application is started, the management module, the inventory module and the transaction module respectively perform the following operation steps:
s71, the management module reads and writes the information of the configured robot into the corresponding node branches, respectively carries out automatic login, if the login is successful, the information is written into the node branches of the online robot, otherwise, the information is written into the node branches of the offline robot; scheduling the task at regular time to perform one-time automatic login;
s72, the front-end service client sends a goods-on-shelf request to the transaction module, and packages and sorts request parameters;
s73, the management module searches for an online robot, judges whether the robot is locked, belongs to the robot of the business and can be put on shelf, and continues to search if the robot is locked, does not belong to the robot of the business or cannot be put on shelf;
otherwise, judging whether the residual capacity of the robot backpack exceeds the quantity of the articles in the transaction, if the quantity of the articles in the transaction does not exceed the residual capacity of the robot backpack, executing the next step, recording data into a text file, and otherwise, continuously searching;
s74, locking the robot and not allowing the robot to be used by other racking requests; sending a piece of quotation information to a user, recording an execution state, calling back a state code of successful quotation information to a front-end service client after the quotation information is successfully sent, starting a trading module to inquire the quotation state confirmed by the user, cancelling the trading if the user does not confirm the quotation within a specified time, and otherwise, executing the next step;
s75, the inventory module compares the data in the robot backpack after the transaction with the data in the robot backpack before the transaction to obtain the number of the newly obtained articles in the robot backpack, judges whether the number is equal to the number of the articles to be transacted, if so, executes the next step, otherwise, continuously obtains the data in the robot backpack after the transaction;
s76, comparing the articles in the backpack of the robot, completing shelving after successful comparison, releasing the robot, wherein the robot is in an unlocked state, updating the acquisition time of the robot, and the sequence of acquiring the robot is the last when shelving next time;
s77, the front end service client sends a retrieval request to the transaction module through the encapsulated object, the transaction module searches for the robot with the article to be retrieved, the management module judges whether the robot is on-line, if not, the automatic login function is started; otherwise, executing the next step;
and S78, sending a piece of quotation information to the user, recording the execution state, calling back a status code of successful quotation information to the front-end service client after successful sending of the quotation information, starting an automatic quotation confirmation function by the robot, inquiring whether the user confirms the quotation, cancelling the transaction if the user does not confirm the quotation within the specified time, and otherwise, finishing the retrieval.
In summary, due to the adoption of the technical scheme, the invention has the beneficial effects that: the invention realizes the real-time transaction of the articles in 7 x 24 hours, and enhances the experience of the player.
Drawings
FIG. 1 is a schematic flow diagram of the present invention.
Fig. 2 is a schematic view of an article racking sequence of the present invention.
Fig. 3 is a schematic view of an item retrieval sequence of the present invention.
Fig. 4 is a schematic structural diagram of the robot system of the present invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the accompanying drawings are illustrative only for the purpose of explaining the present invention, and are not to be construed as limiting the present invention.
In the description of the present invention, it is to be understood that the terms "longitudinal", "lateral", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", and the like, indicate orientations or positional relationships based on those shown in the drawings, and are used merely for convenience of description and for simplicity of description, and do not indicate or imply that the referenced devices or elements must have a particular orientation, be constructed in a particular orientation, and be operated, and thus, are not to be construed as limiting the present invention.
In the description of the present invention, unless otherwise specified and limited, it is to be noted that the terms "mounted," "connected," and "connected" are to be interpreted broadly, and may be, for example, a mechanical connection or an electrical connection, a communication between two elements, a direct connection, or an indirect connection via an intermediate medium, and specific meanings of the terms may be understood by those skilled in the art according to specific situations.
The robot server is divided into a management module, two modules and four processes:
wherein, one management refers to robot management: type, online, offline, and occupancy robot management.
For example, the system is initialized, when the application is started, the robot information is written into different types of node branches according to configuration, the http RSA algorithm is used, cookie type automatic login is carried out, session is written into an online node branch after login is successful, and when a user carries out business operations such as shelf retrieval and the like, the robot is placed into an occupied node branch. When the robot is off-line, the program automatically performs login attempt on the off-line robot until the login is successful, and some occupied robots can also be automatically and manually released to perform the next business operation interaction.
Two modules refer to inventory modules: inquiring the backpack game type number and the article information of the step user; a transaction module: and the Steam user performs business operations such as shelf loading, retrieving and the like.
For example, the inventory module may query the information about different items of a game behind the user in real time, refresh oid the timing and wear values, and display the complete information about the user's backpack.
When a user carries out racking operation, the robot server can carry out the following steps:
s1, inquiring that the quantity of articles to be traded in a user backpack is not more than the residual capacity of a robot backpack and locking the robot (one robot can only carry out shelving trading for one user at the same time);
s2, verifying the effectiveness of the articles put on the shelf and the backpack articles of the user; that is, the item uploaded by the user may be a virtual item or a virtual item does not exist at all, so we need to go to his backpack to check whether he has the item (now for the performance, the item on the shelf of the user will be validated at the service server, the robot trusts the item on the shelf, if the item does not exist, we will return an error when sending a quote);
s3, when sending quotation to the user, sending a callback method to the service client, returning to the state (50), informing the verification code, so that the user can verify when accepting the quotation, at the moment, the robot server inquires the user to confirm the quotation, after the robot obtains the article, the robot backpack does not obtain the transaction article due to the steam transaction delay, performing matching transaction on the backpack data of the robot before transaction and after transaction to obtain the final article data of the robot, then, sequentially descending the newly added article pid (new pid at the moment) of the backpack of the robot one by one according to the descending order of the article pid (old pid at the moment) to be put on the shelf by the user, comparing the corresponding class and instanceid one by one, and after the class and instanceid are the same, and calling back the service system according to the correspondence of the new and old pids, returning to the state (100), and realizing 7-by-24-hour real-time transaction without depending on whether the state of the steamAPI is available or not.
When a user performs a retrieval operation, the robot performs the following steps:
s1, inquiring whether the robot is on line or not;
and S2, when the quotation is sent to the user, a callback method is sent to the service client, a state (50) is returned, the verification code is informed, so that the user can verify when accepting the quotation, the automatic quotation confirmation is started, the current quotation state is inquired, the user accepts the quotation, the robot calls back the service system after acquiring the state returned by the steam, and the state (100) is returned to finish the retrieval.
The four processes refer to the login process: the Zookeeper technology controls the robot to increase or decrease, and the robot is managed in states of login, offline, abnormal and use; and (3) inventory process: the Apache-ignite technology realizes that a cache mechanism inquires inventory data; OID wear value flow: the Redis technology realizes asynchronous grabbing of unique ID and wear value data of ornaments (articles); and (3) transaction flow: the idle robot is acquired in real time, and operation (secondary handshake mechanism) of putting on shelf and retrieving business required by the user is automatically completed.
This application internal interaction protocol: and (3) thread.
The invention discloses an article trading method, which specifically comprises the following steps:
the method comprises the steps of firstly, acquiring pid information of an article to be traded, wherein the pid information is an old pid of the article, and then sequencing the old pid information of the article in a descending order.
And secondly, acquiring the pid of the newly acquired article in the backpack of the robot, namely the new pid of the article, and then sequencing the new pid information of the article in a descending order.
And thirdly, the arranged new pids correspond to the old pids one by one.
Step four, comparing whether the class and the instanceid of the corresponding article are the same or not; if the two are the same, the shelving is successful; otherwise, the shelf loading fails.
The invention also provides an article trading method, as shown in fig. 1-2, the article trading method specifically comprises the following steps:
the method comprises the steps that firstly, a robot is initialized, when an application is started, robot information is read and written into corresponding node branches according to the configured robot information, wherein the robot information comprises a mail, an account, a password, a nickname, a ciphertext, an APIKEY, a server and a type where the robot is located, automatic login is carried out respectively, if the login is successful, the node branches of an online robot are written, and if the login is not successful, the node branches of the offline robot are written; and schedule (typically set for 20 minutes) the task for one auto-login. In this embodiment, the specific login implementation method is as follows: the method comprises the steps that a steam login account obtains RSAKey, wherein a common N value and an E value in a public key are obtained, a login password is encrypted, https// steamcommunicity.com generates a session ID to carry out cookie packaging, then https:// steamcommunicity.com/log is requested, parameters such as passwords and cookies are input to carry out login, the login succeeds in requesting a return value transfer _ urls again, steamloginSecure information in headers is obtained to carry out login storage, and finally whether a quotation request is obtained or not to verify the login is inquired.
In addition, the timing scheduling task (the following execution time data can be modified according to actual conditions) includes the following points:
1. detecting whether the robot is on-line or not, if the robot is off-line, writing off-line robot node data, and waiting for automatic login for 10 minutes to execute once
2. And checking whether the node of the off-line robot has data or not, if so, automatically logging in by the off-line robot, putting the robot into the node data of the on-line robot after logging in is successful, waiting for the transactions of putting on the shelf, taking back and the like of the user, and checking once in one minute.
3. All this timed task will check every 30 seconds for the robot to have no information on the auto-confirmed offer and, if so, auto-confirm it when the transaction is retrieved.
4. Detecting the state of the local robot, emptying the cache of the local robot, and obtaining the robot information from the zookeeper to the local cache again; typically set to be performed once in 10 minutes.
And secondly, the front-end service client sends a goods-on-shelf request to the robot server through the packaged object, the robot server acquires information of goods to be traded in the user backpack according to the user and the game type, the data source is packaged and returned, and the request parameters are packaged and sequenced, wherein the request parameters comprise classid, instanceid, markhashname, pid, oid and other information. In this embodiment, the information about the item includes which attribute information the item has in the game, where the attribute information includes changed attribute information (i.e., there is one before the transaction and the attribute information changes after the transaction) and fixed attribute information (i.e., the attribute information remains unchanged before and after the transaction, but it may occur that the player modifies the value of the fixed attribute information through a modifier), for example, in CSGO or DOTA2, we have obtained the attribute information about the item including: product ID (pid) is variable attribute information, object (oid), class ID (type ID, corresponding information such as belonging to a gun, dagger, etc.), instance ID (instance ID, corresponding information such as printing quality), mark _ hash _ name (mark _ name), wear value, and api (game in which the item is located) are all fixed attribute information.
Thirdly, the robot server searches for the online robot, judges whether the robot is locked, whether the robot belongs to the robot of the game and whether the robot can be put on the shelf, and continues to search if the robot is locked, or the robot does not belong to the robot of the game or the robot which cannot be put on the shelf (the robot which cannot be put on the shelf may be in a maintenance state at the moment or the robot is limited to be taken back and cannot be put on the shelf); otherwise, judging whether the residual capacity of the robot backpack exceeds the quantity of the articles in the transaction, if the quantity of the articles in the transaction does not exceed the residual capacity of the robot backpack, executing the fourth step, recording data into a text file, and otherwise, continuously searching.
Fourthly, locking the robot and not allowing the robot to be used by other racking requests; the robot sends a piece of quotation information to a user through steam, the quotation information comprises articles to be shelved, prices, verification codes and the like of the articles, execution states are recorded, after the quotation information is successfully sent, a state code of successful quotation information is called back to a front-end service client, the state code ensures that the user prevents imposition transaction when accepting quotation, a robot server starts to inquire the user and confirms the quotation state, wherein the quotation state comprises the quotation that the user responds to the accepted quotation first, and then the user confirms the quotation by using a mobile phone; if the user does not confirm the quote in the set time, the transaction is cancelled, otherwise, the fifth step is executed.
And fifthly, comparing the data in the robot backpack after the transaction with the data in the robot backpack before the transaction to obtain the number of newly obtained articles in the robot backpack, judging whether the number is equal to the number of the articles to be transacted, if so, executing the sixth step, otherwise, continuously obtaining the data in the robot backpack after the transaction.
And sixthly, comparing the articles in the backpack of the robot, completing shelving after successful comparison, releasing the robot, wherein the robot is in an unlocked state, updating the acquisition time of the robot, and acquiring the robot in the last time when shelving is performed next time. Wherein, the comparison specifically comprises: firstly, confirming that the robot is in a locked state, not allowing the robot to be used by other shelving requests, then acquiring certain attribute information of an article to be traded, and then sequencing the attribute information in sequence; preferably, the pids of the items to be traded are obtained and arranged in descending order, and other attribute information of the items, such as one of the oid, class, instanceid, and mark _ name, may also be obtained, or multiple attribute information, such as one or a combination of the pids and the oid, class, instanceid, and mark _ name. Secondly, acquiring the attribute information of newly acquired articles in the backpack of the robot after the transaction, which is the same as the articles to be traded in the user backpack, and sequentially arranging the attribute information of the newly acquired articles; preferably, the pids of the newly acquired items after the transaction are acquired and arranged in descending order, or they may be arranged in ascending order. Then the items to be traded correspond to the same attribute information obtained after the newly obtained items are sequenced one by one; finally, comparing whether the items to be traded and one or more fixed and unchangeable attribute information of the newly obtained items which are in one-to-one correspondence with the items to be traded are the same; preferably, the classid and instanceid of the article are compared, if the classid and instanceid are the same, the article to be traded is placed on the shelf, and the one-to-one corresponding relation between the pid (old pid) of the article to be traded and the pid (new pid) of the newly obtained article in the back pack of the robot after the trading is sent to the front-end service client; and if not, refusing to put on shelf, not responding to the front-end service client, and waiting for the negotiation and retrieval. In the present embodiment, as shown in fig. 3, the present invention further includes:
seventhly, the front-end service client sends a retrieval request (through a new pid) to the robot server through the packaged object, the robot server searches for the robot with the article to be retrieved, whether the robot is online or not is judged, and if the robot is not online, an automatic login function is started; otherwise, executing the seventh step.
And eighthly, sending a piece of quotation information to the user, wherein the quotation information comprises the articles to be retrieved, the prices of the articles and the like, recording the execution state, calling back a successful state code of the quotation information to the front-end service client after the quotation information is successfully sent, starting an automatic quotation confirmation function by the robot, inquiring whether the user confirms the quotation or not, cancelling the transaction if the user does not confirm the quotation within the specified time, and otherwise, completing the retrieval.
The following specific examples are given:
example 1 in a CSGO game, for example, user A has nine items in a backpack, item 1, item 2, item 3, item 4, item 5, item 6, item 7, item 8, item 9. When the user a wants to trade three items, namely, the item 2, the item 3 and the item 9, the robot server obtains pids before the trading of the three items, which respectively correspond to: 111 (item 2),8887 (item 3),999 (item 9), the pids of the three items are arranged in descending order: after the items 3, 9 and 2 are traded, the pids of three newly obtained items in the backpack of the robot are obtained and respectively correspond to 9997 (item 2'), 9999 (item 3'), and 9998 (item 9'), and the three obtained items are sorted in the descending order of pids, wherein the sorting order is as follows: article 3', article 9', article 2', which correspond one to one, are: if the class id of the article 3 is the same as that of the article 3', the class id of the article 9 is the same as that of the article 9', and the class id of the article 3 is the same as that of the article 3', the comparison is successful, the article is put on shelf, and the pids of the article 3(8887) corresponding to the article 3' (9999), the article 9(999) corresponding to the article 9'(9998), and the article 2(111) corresponding to the article 2' (9997) are sent to the front-end service client, otherwise, the front-end service client is not responded, and the front-end service client is waited for the deal and fetch.
Example 2 in a CSGO game, for example, user A has nine items in a backpack, item 1, item 2, item 3, item 4, item 5, item 6, item 7, item 8, item 9. When the user a wants to trade three items, namely, the item 2, the item 3 and the item 9, the robot server obtains pids before the trading of the three items, which respectively correspond to: 111 (item 2),8887 (item 3),999 (item 9), the pids of the three items are arranged in ascending order: after the items 2, 9 and 3 are traded, the pids of three newly obtained items in the backpack of the robot are obtained and respectively correspond to 9997 (item 2'), 9999 (item 3') and 9998 (item 9'), and the three obtained items are sorted in the descending order of pids, wherein the sorting order is as follows: article 3', article 9', article 2', which correspond one to one, are: if the class id of the article 3 is the same as that of the article 3', the class id of the article 9 is the same as that of the article 9', and the class id of the article 3 is the same as that of the article 3', the comparison is successful, the article is put on shelf at this time, and the pids of the article 3(8887) corresponding to the article 3' (9999), the article 9(999) corresponding to the article 9'(9998), and the article 2(111) corresponding to the article 2' (9997) are sent to the front-end service client; otherwise, the front-end service client is not responded, and the negotiation is waited for taking back.
Example 3 in a CSGO game, for example, user A has nine items in a backpack, item 1, item 2, item 3, item 4, item 5, item 6, item 7, item 8, item 9. When the user a wants to trade three items, namely, the item 2, the item 3 and the item 9, the robot server obtains pids before the trading of the three items, which respectively correspond to: 111 (item 2),8887 (item 3),999 (item 9), the pids of the three items are arranged in descending order: after the items 3, 9 and 2 are traded, the pids of three newly obtained items in the backpack of the robot are obtained and respectively correspond to 9997 (item 2'), 9999 (item 3'), and 9998 (item 9'), and the three obtained items are sorted in the descending order of pids, wherein the sorting order is as follows: article 3', article 9', article 2', which correspond one to one, are: if the instanceid of the article 3 is the same as that of the article 3', the instanceid of the article 9 is the same as that of the article 9', and the instanceid of the article 3 is the same as that of the article 3', the comparison is successful, the article is put on shelf this time, and pids of the article 3(8887) corresponding to the article 3' (9999), the article 9(999) corresponding to the article 9'(9998), and the article 2(111) corresponding to the article 2' (9997) are sent to the front-end service client; otherwise, the front-end service client is not responded, and the negotiation is waited for taking back.
Example 4 in a CSGO game, for example, user A has nine items in a backpack, item 1, item 2, item 3, item 4, item 5, item 6, item 7, item 8, item 9. When the user a wants to trade three items, namely, the item 2, the item 3 and the item 9, the robot server obtains pids before the trading of the three items, which respectively correspond to: 111 (item 2),8887 (item 3),999 (item 9), the pids of the three items are arranged in descending order: after the items 3, 9 and 2 are traded, the pids of three newly obtained items in the backpack of the robot are obtained and respectively correspond to 9997 (item 2'), 9999 (item 3'), and 9998 (item 9'), and the three obtained items are sorted in the descending order of pids, wherein the sorting order is as follows: article 3', article 9', article 2', which correspond one to one, are: if the class id of the article 3 is the same as that of the article 3', the class id of the article 9 is the same as that of the article 9', the class id of the article 3 is the same as that of the article 3', and the class ids of the article 3 is the same as that of the article 3', the comparison is successful, the article racking is completed, and the pids of the article 3(8887) corresponding to the article 3' (9999), the article 9(999) corresponding to the article 9' (9998), and the article 2(111) corresponding to the article 2' (9997) are transmitted to the front-end service client; otherwise, the front-end service client is not responded, and the negotiation is waited for taking back.
Example 5 in a CSGO game, for example, user A has nine items in a backpack, item 1, item 2, item 3, item 4, item 5, item 6, item 7, item 8, item 9. When the user a wants to trade three items, namely, the item 2, the item 3, and the item 9, the robot server obtains oid before trading the three items, which respectively correspond to: 111 (item 2),8887 (item 3),999 (item 9), then the oid of the three items are arranged in descending order: article 3, article 9, article 2, and after the transaction, oid for three newly acquired articles in the backpack of the robot are acquired, which correspond to article 111 (article 2), article 8887 (article 3), and article 999 (article 9), and the three acquired articles are sorted in descending order of oid, where the order is: article 3', article 9', article 2', which correspond one to one, are: if the class id of the article 3 is the same as that of the article 3', the class id of the article 9 is the same as that of the article 9', the class id of the article 3 is the same as that of the article 3', and the class ids of the article 3 is the same as that of the article 3', the comparison is successful, the article racking is completed, and the pids of the article 3(8887) corresponding to the article 3' (9999), the article 9(999) corresponding to the article 9' (9998), and the article 2(111) corresponding to the article 2' (9997) are transmitted to the front-end service client; otherwise, the front-end service client is not responded, and the negotiation is waited for taking back.
In a preferred embodiment of the invention, the system further comprises error prompt information, wherein the error prompt information comprises one or a combination of overtime of user confirmation, expired transaction, busy robot, error in transaction link format, invalid robot session and invalid commodity.
As shown in fig. 1, the user tells the front-end service client that goods are needed to be put on shelf, then the front-end service client sends a request to the robot, the robot sends a quote to the user and calls back a 50 status code of the front end, then the user accepts the quote and carries out mobile phone confirmation of the quote, the robot inquires that the user calls back a 100 status code of the front-end service client after confirming the status, and the transaction is successful.
As shown in fig. 2, the user tells the front-end service client that goods need to be retrieved, the front-end website sends a request to the robot, the robot sends a quote to the user and automatically confirms the quote with the mobile phone, then the state of one of the front-end service clients is called back, the user receives the quote, and the robot automatically calls back a state code of one of the front-end service clients 100 after inquiring the state of the quote received by the user, and the retrieval is successful.
FIG. 3 shows all components of the robot program, including mysql, ignite, zookeeper, redis; and the initiation sequence includes inventory inquiry, oid refresh, robot login, and their inter-collaboration.
The invention also discloses a trading system of the article trading method, the trading system comprises a management module, an inventory module and a trading module, the management module is respectively connected with the inventory module and the trading module; the management module is used for managing the type, on-line, off-line and occupation of the robot; the inventory module is used for inquiring the user backpack service type and the article information; the transaction module is used for the user to carry out shelving and retrieving business operation; when the application is started, the management module, the inventory module and the transaction module respectively perform the following operation steps:
s71, the management module reads and writes the information of the configured robot into the corresponding node branches, respectively carries out automatic login, if the login is successful, the information is written into the node branches of the online robot, otherwise, the information is written into the node branches of the offline robot; scheduling the task at regular time to perform one-time automatic login;
s72, the front-end service client sends a goods-on-shelf request to the transaction module, and packages and sorts request parameters;
s73, the management module searches for an online robot, judges whether the robot is locked, belongs to the robot of the business and can be put on shelf, and continues to search if the robot is locked, does not belong to the robot of the business or cannot be put on shelf;
otherwise, judging whether the residual capacity of the robot backpack exceeds the quantity of the articles in the transaction, if the quantity of the articles in the transaction does not exceed the residual capacity of the robot backpack, executing the next step, recording data into a text file, and otherwise, continuously searching;
s74, locking the robot and not allowing the robot to be used by other racking requests; sending a piece of quotation information to a user, recording an execution state, calling back a state code of successful quotation information to a front-end service client after the quotation information is successfully sent, starting a trading module to inquire the quotation state confirmed by the user, cancelling the trading if the user does not confirm the quotation within a specified time, and otherwise, executing the next step;
s75, the inventory module compares the data in the robot backpack after the transaction with the data in the robot backpack before the transaction to obtain the number of the newly obtained articles in the robot backpack, judges whether the number is equal to the number of the articles to be transacted, if so, executes the next step, otherwise, continuously obtains the data in the robot backpack after the transaction;
s76, comparing the articles in the backpack of the robot, completing shelving after successful comparison, releasing the robot, wherein the robot is in an unlocked state, updating the acquisition time of the robot, and the sequence of acquiring the robot is the last when shelving next time;
s77, the front end service client sends a retrieval request to the transaction module through the encapsulated object, the transaction module searches for the robot with the article to be retrieved, the management module judges whether the robot is on-line, if not, the automatic login function is started; otherwise, executing the next step;
and S78, sending a piece of quotation information to the user, recording the execution state, calling back a status code of successful quotation information to the front-end service client after successful sending of the quotation information, starting an automatic quotation confirmation function by the robot, inquiring whether the user confirms the quotation, cancelling the transaction if the user does not confirm the quotation within the specified time, and otherwise, finishing the retrieval.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
While embodiments of the invention have been shown and described, it will be understood by those of ordinary skill in the art that: various changes, modifications, substitutions and alterations can be made to the embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

Claims (7)

1. A method of trading an item, comprising the steps of:
s1, initializing the robot, reading the robot information and writing the robot information into the corresponding node branches according to the configured robot information when the application is started, respectively performing automatic login, if the login is successful, writing the node branches into the online robot, otherwise, writing the node branches into the offline robot; scheduling the task at regular time to perform one-time automatic login;
s2, the front-end service client sends a goods-on-shelf request to the robot server, and packages and sorts request parameters;
s3, the robot server searches for the online robot, judges whether the robot is locked, belongs to the robot of the business and can be put on shelf, if the robot is locked, or does not belong to the robot of the business or cannot be put on shelf, continues searching;
otherwise, judging whether the residual capacity of the robot backpack exceeds the quantity of the articles in the transaction, if the quantity of the articles in the transaction does not exceed the residual capacity of the robot backpack, executing the next step, recording data into a text file, and otherwise, continuously searching;
s4, locking the robot and not allowing the robot to be used by other racking requests; sending a piece of quotation information to a user, recording an execution state, calling back a state code of successful quotation information to a front-end service client after the quotation information is successfully sent, starting and inquiring the quotation state confirmed by the user by a robot server, cancelling the transaction if the user does not confirm the quotation within a specified time, and otherwise, executing the next step;
s5, comparing the data in the backpack with the data in the backpack to obtain the number of the newly acquired articles in the backpack, judging whether the number is equal to the number of the articles to be traded, if so, executing the next step, otherwise, continuously acquiring the data in the backpack;
and S6, comparing the articles in the backpack of the robot, completing shelving after successful comparison, releasing the robot, wherein the robot is in an unlocked state, updating the acquisition time of the robot, and acquiring the robot in the last sequence when the robot is shelved next time.
2. The item transaction method according to claim 1, further comprising the steps of:
s7, the front-end service client sends a retrieval request to the robot server through the encapsulated object, the robot server searches the robot with the article to be retrieved, judges whether the robot is on-line, if not, the automatic login function is started; otherwise, executing the next step;
and S8, sending a piece of quotation information to the user, recording the execution state, calling back a status code of successful quotation information to the front-end service client after successful sending of the quotation information, starting an automatic quotation confirmation function by the robot, inquiring whether the user confirms the quotation, cancelling the transaction if the user does not confirm the quotation within the specified time, and otherwise, finishing the retrieval.
3. The item transaction method according to claim 1, wherein in step S6, the comparison comprises the following steps:
s31, acquiring certain attribute information of the to-be-traded articles, and sequencing the attribute information in sequence;
s32, acquiring the same attribute information of the newly acquired articles in the backpack of the robot after the transaction as that in the step S31, and then sequentially arranging the attribute information of the newly acquired articles;
s33, corresponding the items to be traded in the step S31 and the newly obtained attribute information of the items in the step S32 one by one;
s34, comparing whether the one or more fixed and unchangeable attribute information of the item to be traded and the newly acquired item corresponding to the item one to one is the same; if the two are the same, completing racking; otherwise, refusing to put on shelf.
4. The item transaction method according to claim 3, wherein the pid information of the item is acquired in step S31.
5. The item transaction method according to claim 3, wherein in step S34, the classid and intanceid information of the item to be transacted and the classid and intanceid information of the newly obtained item are compared in a one-to-one correspondence, or the classid and markHashName information of the item to be transacted and the classid and markHashName information of the newly obtained item are compared in a one-to-one correspondence.
6. The item transaction method according to claim 1, further comprising error prompt information, wherein the error prompt information comprises one or a combination of user confirmation timeout, transaction expiration, robot busy, transaction link format error, robot session failure, and commodity invalidation.
7. A transaction system of the item transaction method according to claim 1, comprising a management module, an inventory module and a transaction module, wherein the management module is respectively connected with the inventory module and the transaction module;
the management module is used for managing the type, on-line, off-line and occupation of the robot;
the inventory module is used for inquiring the user backpack service type and the article information;
the transaction module is used for a user to carry out shelving and retrieving business operation;
when the application is started, the management module, the inventory module and the transaction module respectively perform the following operation steps:
s71, the management module reads and writes the information of the configured robot into the corresponding node branches, respectively carries out automatic login, if the login is successful, the information is written into the node branches of the online robot, otherwise, the information is written into the node branches of the offline robot; scheduling the task at regular time to perform one-time automatic login;
s72, the front-end service client sends a goods-on-shelf request to the transaction module, and packages and sorts request parameters;
s73, the management module searches for an online robot, judges whether the robot is locked, belongs to the robot of the business and can be put on shelf, and continues to search if the robot is locked, does not belong to the robot of the business or cannot be put on shelf;
otherwise, judging whether the residual capacity of the robot backpack exceeds the quantity of the articles in the transaction, if the quantity of the articles in the transaction does not exceed the residual capacity of the robot backpack, executing the next step, recording data into a text file, and otherwise, continuously searching;
s74, locking the robot and not allowing the robot to be used by other racking requests; sending a piece of quotation information to a user, recording an execution state, calling back a state code of successful quotation information to a front-end service client after the quotation information is successfully sent, starting a trading module to inquire the quotation state confirmed by the user, cancelling the trading if the user does not confirm the quotation within a specified time, and otherwise, executing the next step;
s75, the inventory module compares the data in the robot backpack after the transaction with the data in the robot backpack before the transaction to obtain the number of the newly obtained articles in the robot backpack, judges whether the number is equal to the number of the articles to be transacted, if so, executes the next step, otherwise, continuously obtains the data in the robot backpack after the transaction;
s76, comparing the articles in the backpack of the robot, completing shelving after successful comparison, releasing the robot, wherein the robot is in an unlocked state, updating the acquisition time of the robot, and the sequence of acquiring the robot is the last when shelving next time;
s77, the front end service client sends a retrieval request to the transaction module through the encapsulated object, the transaction module searches for the robot with the article to be retrieved, the management module judges whether the robot is on-line, if not, the automatic login function is started; otherwise, executing the next step;
and S78, sending a piece of quotation information to the user, recording the execution state, calling back a status code of successful quotation information to the front-end service client after successful sending of the quotation information, starting an automatic quotation confirmation function by the robot, inquiring whether the user confirms the quotation, cancelling the transaction if the user does not confirm the quotation within the specified time, and otherwise, finishing the retrieval.
CN201710011201.5A 2017-01-06 2017-01-06 Article transaction method and system Active CN106779974B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710011201.5A CN106779974B (en) 2017-01-06 2017-01-06 Article transaction method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710011201.5A CN106779974B (en) 2017-01-06 2017-01-06 Article transaction method and system

Publications (2)

Publication Number Publication Date
CN106779974A CN106779974A (en) 2017-05-31
CN106779974B true CN106779974B (en) 2020-12-29

Family

ID=58950172

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710011201.5A Active CN106779974B (en) 2017-01-06 2017-01-06 Article transaction method and system

Country Status (1)

Country Link
CN (1) CN106779974B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108888961A (en) * 2018-06-19 2018-11-27 北京翼晰科技有限公司 A kind of pure method of commerce and system based on Steam plateform system
CN108815852A (en) * 2018-06-19 2018-11-16 北京翼晰科技有限公司 A kind of automatic transaction method and system based on Steam plateform system
CN111444222A (en) * 2019-01-16 2020-07-24 苏宁易购集团股份有限公司 Data query method and system based on Ignite cache architecture
CN112054999B (en) * 2020-08-11 2022-10-25 广州点云科技有限公司 Method and system for detecting state of Steam platform account

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1319008C (en) * 2004-06-18 2007-05-30 华为技术有限公司 Game virtual-article data processing method, game platform system and game system
CN101425164A (en) * 2008-02-03 2009-05-06 好旺角(厦门)电子科技有限公司 Network game virtual property on-line trading management method and system
CN102332133A (en) * 2011-07-22 2012-01-25 深圳市财富万方信息技术有限公司 Virtual item trading method and system using electronic tags
CN103854191A (en) * 2012-12-06 2014-06-11 腾讯科技(深圳)有限公司 Online application virtual resource automatic transaction method and device
WO2014124648A1 (en) * 2013-02-15 2014-08-21 Jagtboe Ole Method by trading of services and/or products between users through exchange transactions.
CN105184575B (en) * 2015-07-17 2019-06-18 中国科学院计算技术研究所 Transaction system construction method, transaction flow control device and third party transaction platform

Also Published As

Publication number Publication date
CN106779974A (en) 2017-05-31

Similar Documents

Publication Publication Date Title
CN106779974B (en) Article transaction method and system
TWI706278B (en) Block chain-based transaction processing method and device, and electronic equipment
CN109081033A (en) Intelligent cargo cabinet control method and system
CN104767716B (en) Service request processing method and device
US8788374B2 (en) Method and system for account parallel processing
CN104219235B (en) A kind of distributed transaction requesting method and device
CN102999835A (en) System and method for self-service delivery
CN109450987A (en) Number generation method, apparatus and system and storage medium
CN109785042A (en) Abnormality eliminating method, server, storage medium and the device of distributed deployment
CN106303125A (en) Automated refill system, method and device
CN107330650B (en) Commodity delivery order transaction management system based on E-commerce platform
CN107273192A (en) A kind of propulsion method of product trading, server and system
CN107358426A (en) The method and apparatus for capturing malice reimbursement user
CN106445968A (en) Data merging method and device
CN107578327A (en) Method, equipment and the system that information pushes in a kind of link of bidding
CN107424001A (en) The control method and system of production marketing amount
CN109905459A (en) A kind of data transmission method and device
CN106485478A (en) Using the hyperphoric system of the hyperphoric object of resource, method and device
CN106530507B (en) Third party authorized empty box using system and method based on storage cabinet
CN113298513A (en) Method and system for processing payment request
CN106530509B (en) Third party authorized empty box using system and method based on storage cabinet
CN115659306A (en) Article acquisition permission sharing method and device, storage medium and electronic equipment
US20020072949A1 (en) Item allocation method, system and program for workflow system
US20050027605A1 (en) Method and system for shopping-cart identification
CN112669103A (en) Information processing method, computer-readable storage medium, and information processing apparatus

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