CN107979643B - Data interaction method and device and readable storage medium - Google Patents

Data interaction method and device and readable storage medium Download PDF

Info

Publication number
CN107979643B
CN107979643B CN201711201084.5A CN201711201084A CN107979643B CN 107979643 B CN107979643 B CN 107979643B CN 201711201084 A CN201711201084 A CN 201711201084A CN 107979643 B CN107979643 B CN 107979643B
Authority
CN
China
Prior art keywords
issuing
server
servers
current
product
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
CN201711201084.5A
Other languages
Chinese (zh)
Other versions
CN107979643A (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.)
Yidianlingxi Information Technology Guangzhou Co ltd
Original Assignee
Alibaba China 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 Alibaba China Co Ltd filed Critical Alibaba China Co Ltd
Priority to CN201711201084.5A priority Critical patent/CN107979643B/en
Publication of CN107979643A publication Critical patent/CN107979643A/en
Application granted granted Critical
Publication of CN107979643B publication Critical patent/CN107979643B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • 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/0223Discounts or incentives, e.g. coupons or rebates based on inventory
    • 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/0239Online discounts or incentives
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Development Economics (AREA)
  • Strategic Management (AREA)
  • Finance (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Game Theory and Decision Science (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention provides a data interaction method and device and a readable storage medium, and belongs to the technical field of network data. The data interaction method is applied to a counting device of a distribution system, and comprises the following steps: determining whether a target issuing server with abnormal product issuing exists in the plurality of issuing servers; at the time of the determination, the total current number of the update requests of the plurality of the issuing servers is obtained, so that all the target issuing servers synchronize the current product number value in the data storage server to the cache counter when the total current number is zero. The method and the system ensure that the number value of the current products synchronized by the data storage server to the cache counter is consistent with the actually issued products, avoid the over-issuing of the prizes, avoid the malicious utilization of the over-issuing of the prizes by people, and effectively manage and control the risk of loss to companies caused by the over-issuing of the prizes.

Description

Data interaction method and device and readable storage medium
Technical Field
The invention relates to the technical field of network data, in particular to a data interaction method and device and a readable storage medium.
Background
In a networked system, the bonusing system is primarily interfaced to the gaming platform to provide the gaming platform with a basic award capability.
In the prior art, in order to reduce the database load of data during the award distribution and ensure that the award can not be overflowed during the award distribution, the stock in the storage counter is slowed down before the award distribution, and then the stock in the database is successfully synchronized with the cache counter. However, in practical applications, there is a case of losing the award, so after losing the award, the stock in the database needs to be returned to the cache counter to ensure that the cache counter can be used continuously. However, this approach and the tendency to cause the inventory returned to the buffer counter to be inconsistent with the actual current inventory causes the premium to be oversubscribed and the company to suffer a loss. And the excess prize is easy to be used by people to give out the prize maliciously, which causes the company to suffer more loss.
Disclosure of Invention
In view of the above, the present invention provides a data interaction method and apparatus, and a readable storage medium, so as to effectively overcome the above-mentioned drawbacks.
The embodiment of the invention is realized by the following modes:
in a first aspect, an embodiment of the present invention provides a data interaction method, which is applied to a counting apparatus of a distribution system, where the distribution system further includes: the device comprises a plurality of issuing servers connected with the counting device, and a cache counter and a data storage server which are connected with each issuing server in the plurality of issuing servers. The method comprises the following steps: determining whether a target issuing server with abnormal product issuing exists in the plurality of issuing servers; and when the current quantity sum of the updating requests of the plurality of issuing servers is judged to be zero, the current quantity sum of the updating requests of the plurality of issuing servers is obtained, so that all the target issuing servers synchronize the current product quantity value in the data storage server to the cache counter when the current quantity sum is zero.
In a second aspect, an embodiment of the present invention provides a data interaction method, which is applied to any one of a plurality of issuing servers in an issuing system, where the system further includes: and the counting device, the cache counter and the data storage server are connected with each issuing server. The method comprises the following steps: when the accessed cache counter is abnormal, the issuing server serves as a target issuing server to send a product issuing abnormal signal to the counting device; when the total sum of the current numbers of the updating requests of the plurality of issuing servers in the counting device is zero, the current product number value in the data storage server is synchronized to the cache counter.
In a third aspect, an embodiment of the present invention provides a data interaction method, which is applied to any one of a plurality of issuing servers in an issuing system, and a counting apparatus connected to each issuing server, where the system further includes: and the cache counter and the data storage server are connected with each issuing server. The method comprises the following steps: when the cache counter accessed by the issuing server is abnormal, the issuing server serves as a target issuing server to send a product issuing abnormal signal to the counting device; the counting device determines whether a target issuing server with abnormal product issuing exists in the plurality of issuing servers; the counting device obtains the total sum of the current number of the updating requests of the plurality of issuing servers when judging that the updating requests are in some cases; and when the total sum of the current numbers of the updating requests of the plurality of issuing servers in the counting device is zero, the target issuing server synchronizes the current product number value in the data storage server to the cache counter.
In a fourth aspect, an embodiment of the present invention provides a data interaction device, which is applied to a counting device of a distribution system, where the system further includes: the device comprises a plurality of issuing servers connected with the counting device, and a cache counter and a data storage server which are connected with each issuing server. The device comprises: and the determining module is used for determining whether a target issuing server with abnormal product issuing exists in the plurality of issuing servers. And the obtaining module is used for obtaining the total current quantity of the updating requests of the plurality of issuing servers when the current quantity is judged to be zero, so that all the target issuing servers synchronize the current product quantity value in the data storage server to the cache counter when the total current quantity is zero.
In a fifth aspect, an embodiment of the present invention provides a data interaction apparatus, which is applied to any one of a plurality of issuing servers in an issuing system, where the system further includes: and the counting device, the cache counter and the data storage server are connected with each issuing server. The device comprises: and the sending module is used for sending a product distribution abnormal signal to the counting device by taking the distribution server as a target distribution server when the accessed cache counter is abnormal. And the synchronization module is used for synchronizing the current product quantity value in the data storage server to the cache counter when the sum of the current quantity of the update requests of the plurality of issuing servers in the counting device is zero.
In a sixth aspect, embodiments of the present invention provide a readable storage medium stored in a computer, the readable storage medium comprising a plurality of instructions configured to cause the computer to perform the method.
The embodiment of the invention has the beneficial effects that:
when the counting device determines that the product of the target issuing server is abnormal, the counting device obtains the total current number of the updating requests in the plurality of issuing servers. Therefore, when the total sum of the updating request quantity in the computing device is zero, the target issuing server synchronizes the current product quantity value in the data storage server to the cache counter. The method effectively ensures that the number value of the current products synchronized by the data storage server to the cache counter is consistent with the actually issued products, avoids the overdissuring of the prize, avoids the malicious utilization of the overdissuring of the prize by a person, and effectively manages and controls the risk of loss to a company due to the overdissuring of the prize.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a block diagram showing a configuration of a dispensing system according to a first embodiment of the present invention;
FIG. 2 is a flow chart of a data interaction method according to a second embodiment of the present invention;
FIG. 3 is a flow chart of a data interaction method according to a third embodiment of the present invention;
FIG. 4 is a flow chart of a data interaction method according to a fourth embodiment of the present invention;
fig. 5 is a block diagram illustrating a data interaction apparatus according to a fifth embodiment of the present invention;
FIG. 6 is a block diagram illustrating a determining module in a data interaction apparatus according to a fifth embodiment of the present invention;
fig. 7 is a block diagram illustrating a structure of an obtaining module in a data interaction apparatus according to a fifth embodiment of the present invention;
fig. 8 is a block diagram illustrating a data interaction apparatus according to a sixth embodiment of the present invention;
fig. 9 is a block diagram illustrating a structure of a synchronization module in a data interaction device according to a sixth embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
First embodiment
Referring to fig. 1, a first embodiment of the present invention provides a distribution system 10, where the distribution system 10 includes: data storage server 11, cache counter 12 and a plurality of dispensing servers 13, and counting means 14 to which the plurality of dispensing servers 13 are connected. Wherein each issuing server 13 is further connected to cache counter 12 and data storage server 11.
The data storage server 11 is an integrated electronic device with signal processing and data storage capabilities. A data storage server 11 is applied to the dispensing system 10, and a database in the data storage server 11 stores a current total quantity value of products that can be delivered. When a product is delivered by a dispensing server 13, the current total quantity value in the data storage server 11 may be updated by the dispensing server 13 minus 1. The product in this embodiment may be a prize that needs to be distributed to the client.
The buffer counter 12 is an integrated electronic device with signal processing and data storage capabilities. In this embodiment, the cache counter 12 may be a distributed cache cluster, which can effectively alleviate the load of the data storage server 11 when the product is issued. For storing the current total quantity value of the deliverable products synchronized with the data storage server 11. Also after a product is delivered by a delivery server 13, the current total count value in cache counter 12 may be updated by the delivery server 13 minus 1 in preference to data storage server 11.
The issuing server 13 may be a conventional server with signal processing and data storage capabilities. When the prize is issued, the issuing server 13 obtains a product issuing request sent by the client through the connection with the client. The issuing server 13 processes the product issuing request, sends a product corresponding to the product issuing request to the client, and updates the current total number value of the products in the cache counter 12 by subtracting 1. After that, the issuing server 13 adds 1 to the total number of update requests in the issuing server 13 according to the update request corresponding to the processed product issuing request. For example, the dispensing server 13 generates an update request according to a processed product dispensing request; or generating the updating requests corresponding to the quantity of the product issuing requests according to the quantity of the product issuing requests processed in each preset period. The issuing server 13 updates the current total quantity value of the products in the issuing server 13 by subtracting 1 according to the updating request, and subtracts 1 from the total quantity of the updating request after the updating is successful. When a certain one of the plurality of dispensing servers 13 fails to access the cache counter 12, the dispensing server 13 may serve as the target dispensing server 13 to send a product dispensing exception signal for regression statistics of the number of products to the counting device 14.
The buffer counter 14 may be an integrated electronic device with signal processing and data computation capabilities. In this embodiment, the cache counter 14 may be a zookeeper cluster (distributed application coordination service). The cache counter 14 determines the target dispensing server 13 according to the obtained product dispensing exception signal. And monitors the total sum of the number of update requests in the remaining plurality of issuing servers 13 so that the target issuing server 13 synchronizes the current product quantity value in the data storage server 12 to the cache counter 11 when the total sum of the number of update requests is zero, thereby maintaining the synchronization of the data of the cache counter 11 and the data of the data storage server 12.
Second embodiment
Referring to fig. 2, a second embodiment of the present invention provides a data interaction method, where the data interaction method is applied to a counting device of a distribution system, and the data interaction method includes: step S100 and step S200.
Step S100: and determining whether a target issuing server with abnormal product issuing exists in the plurality of issuing servers.
The counting device is connected with each issuing server so as to realize data interaction with each issuing server. The counting device can detect whether a product dispensing abnormal signal is received in real time. When the judgment is negative, namely the abnormal signal of the product release is not received, the computing device keeps continuously detecting. When one of the target issuing servers is abnormal in product issuing, the counting device can determine that the product issuing abnormal signal sent by the target issuing server is received, namely the counting device can determine that the product issuing abnormal signal contains the ID of the issuing server sending the signal.
The counting device analyzes the product issuing abnormal signal to correspondingly obtain the ID of the issuing server in the product issuing abnormal signal. Furthermore, the counting device can determine the target issuing server with the ID value corresponding to the ID of the issuing server from the issuing servers according to the ID of the issuing server, and also determine that the product issuing of the target issuing server is abnormal and regression statistics of the number of the products needs to be executed.
It is understood that the determination of the corresponding target server by the ID is an implementation manner of the embodiment, and is not limited to the embodiment. For example, the links connecting each of the issuing servers may be correspondingly numbered, and if a product issuing abnormal signal is received through a certain link, the target issuing server connected to the link may be directly determined according to the link.
Step S200: and when the current quantity sum of the updating requests of the plurality of issuing servers is judged to be zero, the current quantity sum of the updating requests of the plurality of issuing servers is obtained, so that all the target issuing servers synchronize the current product quantity value in the data storage server to the cache counter when the current quantity sum is zero.
When the counting device determines yes and starts to execute the regression statistics of the product quantity, the counting device may notify each of the remaining issuing servers except the target issuing server so that each of the remaining issuing servers knows that the regression statistics needs to be executed. Thereafter, each issuing server continuously submits the number of update requests for updating the number of products in the current data storage server to the counting device in real time. It can be understood that the update request is correspondingly generated according to the product release request processed by the release server, and the update request is used for instructing the data storage server to increase or decrease the number of the products according to the number of the update requests.
For example, when the number of update requests in the issuing server a is 3, the current number of products in the data storage server needs to be correspondingly subtracted by 3. When the issuing server a processes a product issuing request again, the number of update requests in the issuing server a is +1, which is increased to 4, and the current number of products in the data storage server is required to be correspondingly reduced by 4. And then, when the issuing server A updates and subtracts 1 from the current product quantity in the data storage server according to an updating request, the issuing server A completes the processing of the updating request and updates the quantity of the requests from-1 to 3.
It is understood that the data storage server reduces the current number of products according to the number of update requests, which is a specific implementation manner of the present embodiment when products are issued. When the data storage server is in the superposition statistics, namely, when the products are stored in the stock, the data storage server can increase the current product quantity according to the quantity of the updating requests. For example, when the number of update requests in the issuing server a is 3, the current number of products in the data storage server needs to be increased by 3 correspondingly. When the issuing server a processes a product issuing request again, the number of update requests in the issuing server a is increased to +1, so that 4 update requests are added, and 4 update requests are added to the current number of products in the data storage server.
The counting device can correspondingly obtain the number of the update requests submitted by each issuing server in real time. The counting means may superimpose the number of the plurality of update requests so as to obtain the plurality of issuance servers. In this embodiment, the counting device continuously obtains the total sum of the number of the update requests in real time as a dynamic process, that is, when the number of the update requests of a certain issuing server is updated to be decreased by 1, the total sum of the current number of the update requests in the counting device is also decreased by 1 correspondingly. Because the total of the number of the update requests obtained by the counting device is dynamically updated, when the total of the number of the update requests is dynamically updated to zero, the target issuing server can also correspondingly obtain the total of the number of the update requests to be zero, at this time, the target issuing server synchronizes the current product number value in the data storage server to the cache counter, so that the current product number value in the cache counter after the regression statistics is performed corresponds to the actually issued product number value.
It should be noted that, the counting device notifies each issuing server of the number of update requests submitted in real time, so that the counting device obtains the total current number of update requests in real time as an optional implementation manner in this embodiment, which is not limited to this embodiment. In this embodiment, the counting device may also be used to obtain the number of the corresponding update requests from each issuing server in real time, so as to obtain the total current number of the update requests in real time. In addition, in this embodiment, each issuing server may be notified by the counting device, so that the number of update requests of each issuing server per se reaches zero, and then the number of update requests is sent to the counting device.
Third embodiment
Referring to fig. 3, a third embodiment of the present invention provides a data interaction method, where the data interaction method is applied to any one of a plurality of distribution servers in a distribution system, and the data interaction method includes: step S300 and step S400.
Step S300: when the accessed cache counter is abnormal, the issuing server serves as a target issuing server to send a product issuing abnormal signal to the counting device.
Each issuing server receives the product issuing request sent by the client and issues the product corresponding to the product issuing request to the client through the connection with the cache counter, and each issuing server needs to access the cache counter to correspondingly update the current product quantity value in the cache counter, namely, the current product quantity value in the cache counter is reduced by 1. But if the cache counter accessed by one issuing server is abnormal, the issuing server can be used as a target issuing server. Wherein, the cache counter being in an exception may be: the current product quantity value in the cache counter is 0 after the cache counter is in a power-on state or in a failure state and the access to the cache counter fails or the current product quantity value in the cache counter is updated and reduced by 1.
At this time, the target issuing server may trigger regression statistics of the product quantity according to a preset control program. Further, the target issuing server may generate a product issuing abnormality signal including its own ID to the counting means so that the counting means obtains a total current number of update requests of the plurality of issuing servers other than the target issuing server.
Step S400: when the total sum of the current numbers of the updating requests of the plurality of issuing servers in the counting device is zero, the current product number value in the data storage server is synchronized to the cache counter.
In order to facilitate the accuracy of subsequent synchronization, the target issuing server can monitor the total current number of the update requests in the counting device in real time. Specifically, the target issuing server determines whether the sum of the obtained current numbers of the update requests of the plurality of issuing servers in the counting apparatus is zero. If the target issuing server judges that the target issuing server is not the target issuing server, the target issuing server continues to monitor and judge according to the preset control program. If the current number of the update requests of each issuing server is zero, the target issuing server may determine that the sum of the current numbers of the update requests is zero. It can now be characterized that the current product quantity value in the data storage server remains in correspondence with the actually dispensed product quantity value. Further, the target issuing server further determines whether access to the cache counter is available at this time. If not, the target issuing server continues to wait and continues to judge whether the access of the cache counter is accessible. If so, the cache counter is indicated to restore or maintain the normal working state, and then the target issuing server reads the current product quantity value in the data storage server and synchronizes the read current product quantity value into the cache counter, so that the current product quantity value in the cache counter and the current product quantity value in the data storage server are kept synchronous and also correspond to the actually issued product quantity, and the over-issuing of the product is avoided.
It should be noted that, the target issuing server monitors the total current number of the update requests in the counting device to perform the supersending of the synchronization as an optional implementation manner in this embodiment, and is not limited to this embodiment. For example, the counting device may send a trigger signal to the target issuing server when the total current number of the update requests is zero, and the target issuing server may perform the synchronization superissue according to the trigger signal.
Fourth embodiment
Referring to fig. 4, a fourth embodiment of the present invention provides a data interaction method, where the data interaction method is applied to any one of a plurality of distribution servers in a distribution system, and a counting device connected to each distribution server. The data interaction method comprises the following steps: step S101, step S201, step S301, and step S401.
Step S101: when the accessed cache counter is abnormal, the issuing server serves as a target issuing server to send a product issuing abnormal signal to the counting device.
Step S201: the counting device determines whether a target issuing server with abnormal product issuing exists in the plurality of issuing servers.
Step S301: the counting means may obtain a total of the current number of update requests of the plurality of issue servers when it is determined that there is a case.
Step S401: and when the total sum of the current numbers of the updating requests of the plurality of issuing servers in the counting device is zero, the target issuing server synchronizes the current product number value in the data storage server to the cache counter.
It should be noted that, as those skilled in the art can clearly understand, for convenience and brevity of description, the specific working process of the method described above may refer to the corresponding process in the foregoing method embodiment, and is not described herein again.
Fifth embodiment
Referring to fig. 5, a fifth embodiment of the present invention provides a data interaction apparatus 100, which is applied to a counting apparatus of a distribution system. The data interaction device 100 comprises:
the determining module 110 is configured to determine whether there is a target issuing server with an abnormal product issuing function in the plurality of issuing servers.
An obtaining module 120, configured to, when it is determined that the current quantity sum of the update requests of the plurality of issuing servers is zero, obtain a current quantity sum of the update requests of the plurality of issuing servers, so that all the target issuing servers synchronize the current quantity value of the product in the data storage server to the cache counter when the current quantity sum is zero.
Referring to fig. 6, in a data interaction apparatus 100 according to a fifth embodiment of the present invention, a determining module 110 includes:
a determining unit 111 configured to determine, from the plurality of issuing servers, an issuing server corresponding to the issuing server ID as the target issuing server, according to the issuing server ID in the received product issuing abnormality signal.
Referring to fig. 7, in a data interaction apparatus 100 according to a fifth embodiment of the present invention, an obtaining module 120 includes:
an obtaining unit 121, configured to obtain, in real time, a current number of update requests of each of the plurality of issuing servers.
And a summing unit 122, configured to obtain a sum of the current number of the update requests according to the current number of the update requests of each issuing server.
Sixth embodiment
Referring to fig. 8, a sixth embodiment of the present invention provides a data interaction apparatus 200, which is applied to any one of a plurality of issuing servers in an issuing system. The data interaction device 200 comprises:
a sending module 210, configured to, when the accessed cache counter is abnormal, serve as a target issuing server to send a product issuing abnormal signal to the counting apparatus.
A synchronization module 220, configured to synchronize the current product quantity value in the data storage server to the cache counter when the total of the current number of update requests of the plurality of issuing servers in the counting apparatus is zero.
Referring to fig. 9, in a data interaction apparatus 200 according to a sixth embodiment of the present invention, a synchronization module 220 includes:
a first judging unit 221, configured to judge whether a sum of the obtained current numbers of the update requests of the plurality of issuing servers in the counting apparatus is zero.
A second determining unit 222, configured to determine whether access to the cache counter is reachable when the determination is zero.
A synchronizing unit 223, configured to synchronize the current product quantity value in the data storage server to the cache counter when it is determined that the current product quantity value is reachable.
It should be noted that, as those skilled in the art can clearly understand, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The computer program product of the computer-readable storage medium for performing the processor-executable nonvolatile program code according to the embodiment of the present invention includes a computer-readable storage medium storing the program code, where instructions included in the program code may be used to execute the method described in the foregoing method embodiment, and specific implementation may refer to the method embodiment, and is not described herein again.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and 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 units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In summary, embodiments of the present invention provide a data interaction method and apparatus, and a readable storage medium. The data interaction method is applied to a counting device of a distribution system, and the distribution system further comprises the following steps: the device comprises a plurality of issuing servers connected with the counting device, and a cache counter and a data storage server which are connected with each issuing server in the plurality of issuing servers. The method comprises the following steps: determining whether a target issuing server with abnormal product issuing exists in the plurality of issuing servers; at the time of the determination, the total current number of the update requests of the plurality of the issuing servers is obtained, so that all the target issuing servers synchronize the current product number value in the data storage server to the cache counter when the total current number is zero.
When the counting device determines that the product of the target issuing server is abnormal, the counting device obtains the total current number of the updating requests in the plurality of issuing servers. Therefore, when the total sum of the updating request quantity in the computing device is zero, the target issuing server synchronizes the current product quantity value in the data storage server to the cache counter. The method effectively ensures that the number value of the current products synchronized by the data storage server to the cache counter is consistent with the actually issued products, avoids the overdissuring of the prize, avoids the malicious utilization of the overdissuring of the prize by a person, and effectively manages and controls the risk of loss to a company due to the overdissuring of the prize.
The above is only a preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes will occur to those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (12)

1. A data interaction method is characterized in that the method is applied to a counting device of a distribution system, and the distribution system further comprises the following steps: a plurality of issuing servers connected to the counting device, and a cache counter and a data storage server connected to each of the plurality of issuing servers, the method comprising:
determining whether a target issuing server with abnormal product issuing exists in the plurality of issuing servers; when the accessed cache counter is abnormal, the issuing server issues an abnormal target issuing server for the product;
when the current quantity sum of the updating requests of the plurality of issuing servers is judged to be sometimes, the current quantity sum of the updating requests of the plurality of issuing servers is obtained, so that all the target issuing servers synchronize the current product quantity value in the data storage server to the cache counter when the current quantity sum is zero; the updating request is generated by the issuing server according to the processed product issuing request and is used for indicating the data storage server to increase or decrease the number of database products.
2. The data interaction method of claim 1, wherein obtaining the sum of the current number of update requests of the plurality of issuing servers comprises:
obtaining the current number of the updating requests of each issuing server in the plurality of issuing servers in real time;
and obtaining the total current number of the update requests according to the current number of the update requests of each issuing server.
3. The data interaction method of claim 1, wherein determining whether a target release server of the plurality of release servers has a product release exception comprises:
and according to the ID of the issuing server in the received product issuing abnormal signal, determining the issuing server corresponding to the ID of the issuing server from the issuing servers as the target issuing server.
4. A data interaction method, applied to any one of a plurality of issuing servers in an issuing system, the system further comprising: the counting device, the cache counter and the data storage server are connected with each issuing server, and the method comprises the following steps:
when the accessed cache counter is abnormal, the issuing server serves as a target issuing server to send a product issuing abnormal signal to the counting device;
when the total sum of the current numbers of the updating requests of the plurality of issuing servers in the counting device is zero, synchronizing the current product number value in the data storage server to the cache counter; the updating request is generated by the issuing server according to the processed product issuing request and is used for indicating the data storage server to increase or decrease the number of database products.
5. The data interaction method of claim 4, wherein synchronizing the current product quantity value in the data storage server to the cache counter when the sum of the current number of update requests of the plurality of issuing servers is zero comprises:
judging whether the sum of the obtained current numbers of the updating requests of the plurality of issuing servers in the counting device is zero or not;
when the access is judged to be zero, judging whether the access to the cache counter is accessible;
and when the current product quantity value is judged to be reachable, synchronizing the current product quantity value in the data storage server to the cache counter.
6. A data interaction method is applied to any one of a plurality of issuing servers in an issuing system and a counting device connected with each issuing server, and the system further comprises: the method comprises the following steps that a cache counter and a data storage server are connected with each issuing server, and the method comprises the following steps:
when the cache counter accessed by the issuing server is abnormal, the issuing server serves as a target issuing server to send a product issuing abnormal signal to the counting device;
the counting device determines whether a target issuing server with abnormal product issuing exists in the plurality of issuing servers;
the counting device obtains the total sum of the current number of the updating requests of the plurality of issuing servers when judging that the updating requests are in some cases;
when the total sum of the current numbers of the updating requests of the plurality of issuing servers in the counting device is zero, the target issuing server synchronizes the current product number value in the data storage server to the cache counter; the updating request is generated by the issuing server according to the processed product issuing request and is used for indicating the data storage server to increase or decrease the number of database products.
7. A data interaction device, characterized in that, the counting device is applied to a distribution system, and the system further comprises: a plurality of issuing servers connected to the counting apparatus, and a cache counter and a data storage server connected to each issuing server, the apparatus comprising:
the determining module is used for determining whether a target issuing server with abnormal product issuing exists in the plurality of issuing servers; when the accessed cache counter is abnormal, the issuing server issues an abnormal target issuing server for the product;
an obtaining module, configured to obtain a total current quantity of the update requests of the multiple issuing servers when the current quantity is determined to be zero, so that all the target issuing servers synchronize the current product quantity value in the data storage server to the cache counter when the total current quantity is zero; the updating request is generated by the issuing server according to the processed product issuing request and is used for indicating the data storage server to increase or decrease the number of database products.
8. The data interaction device of claim 7, wherein the obtaining module comprises:
an obtaining unit, configured to obtain, in real time, a current number of update requests of each of the plurality of issuing servers;
and the summation unit is used for obtaining the total sum of the current quantity of the update requests according to the current quantity of the update requests of each issuing server.
9. The data interaction device of claim 8, wherein the determining module comprises:
and the determining unit is used for determining the issuing server corresponding to the ID of the issuing server from the issuing servers as the target issuing server according to the ID of the issuing server in the received product issuing abnormal signal.
10. A data interaction apparatus, applied to any one of a plurality of issuing servers in an issuing system, the system further comprising: a counting device, a cache counter and a data storage server connected to each of the issuing servers, the device comprising:
the sending module is used for sending a product distribution abnormal signal to the counting device by taking the distribution server as a target distribution server when the accessed cache counter is abnormal;
the synchronization module is used for synchronizing the current product quantity value in the data storage server to the cache counter when the sum of the current quantity of the update requests of the plurality of issuing servers in the counting device is zero;
the updating request is generated by the issuing server according to the processed product issuing request and is used for indicating the data storage server to increase or decrease the number of database products.
11. The data interaction device of claim 10, wherein the synchronization module comprises:
a first judgment unit configured to judge whether or not a total of the obtained current numbers of the update requests of the plurality of issue servers in the counting apparatus is zero;
a second judging unit, configured to judge whether access to the cache counter is reachable when the judgment result is zero;
and the synchronization unit is used for synchronizing the current product quantity value in the data storage server to the cache counter when the current product quantity value is judged to be reachable.
12. A readable storage medium stored in a computer, the readable storage medium comprising a plurality of instructions configured to cause the computer to perform the method of any one of claims 1-5.
CN201711201084.5A 2017-11-23 2017-11-23 Data interaction method and device and readable storage medium Active CN107979643B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711201084.5A CN107979643B (en) 2017-11-23 2017-11-23 Data interaction method and device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711201084.5A CN107979643B (en) 2017-11-23 2017-11-23 Data interaction method and device and readable storage medium

Publications (2)

Publication Number Publication Date
CN107979643A CN107979643A (en) 2018-05-01
CN107979643B true CN107979643B (en) 2021-01-22

Family

ID=62011897

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711201084.5A Active CN107979643B (en) 2017-11-23 2017-11-23 Data interaction method and device and readable storage medium

Country Status (1)

Country Link
CN (1) CN107979643B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1384459A (en) * 2001-03-12 2002-12-11 香港大学 Radio purchasing and on-line stocking device and method for vendor
CN1745392A (en) * 2002-12-10 2006-03-08 通乐宝公司 Content creation, distribution, interaction, and monitoring system
CN106021338A (en) * 2016-05-06 2016-10-12 广州爱九游信息技术有限公司 A ranking list data extension processing system, device and method and an apparatus
CN106997546A (en) * 2016-01-26 2017-08-01 中国移动通信集团安徽有限公司 A kind of order processing method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070198992A1 (en) * 2006-01-26 2007-08-23 International Business Machines Corporation Changing submitted asynchronous business events to synchronous business events in a Business processing system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1384459A (en) * 2001-03-12 2002-12-11 香港大学 Radio purchasing and on-line stocking device and method for vendor
CN1745392A (en) * 2002-12-10 2006-03-08 通乐宝公司 Content creation, distribution, interaction, and monitoring system
CN106997546A (en) * 2016-01-26 2017-08-01 中国移动通信集团安徽有限公司 A kind of order processing method and device
CN106021338A (en) * 2016-05-06 2016-10-12 广州爱九游信息技术有限公司 A ranking list data extension processing system, device and method and an apparatus

Also Published As

Publication number Publication date
CN107979643A (en) 2018-05-01

Similar Documents

Publication Publication Date Title
US9911148B2 (en) Querying for business service processing status information
CN108615151B (en) Data processing method, block chain server and node equipment
KR102632194B1 (en) Resource allocation methods and apparatus, devices, and storage media
CN108744504B (en) Game data processing method and device, game server and game system
CN110716825B (en) Data disaster recovery processing method, device and system
CN111659126B (en) Distribution method, device, server, terminal and storage medium of matching process
CN107172182A (en) A kind of information push method, message push server and terminal
CN112449005B (en) Request distribution method, request distribution device, electronic equipment and readable storage medium
CN107451853A (en) Method, apparatus, system and the storage medium that a kind of red packet distributes in real time
CN109753243A (en) Copy dispositions method, Cloud Server and storage medium
US9405785B2 (en) Online propagation of data updates
CN109902103A (en) Service data management method, device, equipment and computer readable storage medium
CN113117326A (en) Frame rate control method and device
US20160196168A1 (en) Virtual resource control system and virtual resource control method
CN115544044A (en) Data consistency keeping method, device, equipment and storage medium
EP3301576A1 (en) Method and apparatus for monitoring logs of multi-tenant systems
CN107979643B (en) Data interaction method and device and readable storage medium
CN116032932A (en) Cluster management method, system, equipment and medium for edge server
US10067778B2 (en) Management system, recording medium and method for managing virtual machines
CN114143196B (en) Instance configuration updating method, device, equipment, storage medium and program product
JP6957194B2 (en) Service system, its control method, and its program
CN106878369B (en) Service processing method and device
CN107070742B (en) Service server health state checking method and system
JP2018093573A (en) Storage battery control device, storage battery control system, storage battery control method, and program
CN112015745B (en) Data management method and device

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
TA01 Transfer of patent application right

Effective date of registration: 20200526

Address after: 310052 room 508, floor 5, building 4, No. 699, Wangshang Road, Changhe street, Binjiang District, Hangzhou City, Zhejiang Province

Applicant after: Alibaba (China) Co.,Ltd.

Address before: 510000 Guangdong city of Guangzhou province Whampoa Tianhe District Road No. 163 Xiping Yun Lu Yun Ping square B radio tower 13 layer self unit 02 (only for office use)

Applicant before: GUANGZHOU AIJIUYOU INFORMATION TECHNOLOGY Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20220318

Address after: 510520 room 603, room 602, No. 38, Gaopu Road, Tianhe District, Guangzhou, Guangdong

Patentee after: Guangzhou Jianyue Information Technology Co.,Ltd.

Address before: 310052 room 508, 5th floor, building 4, No. 699 Wangshang Road, Changhe street, Binjiang District, Hangzhou City, Zhejiang Province

Patentee before: Alibaba (China) Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20220915

Address after: 510277 room 3701, No. 88, Dingxin Road, Haizhu District, Guangzhou City, Guangdong Province

Patentee after: Yidianlingxi information technology (Guangzhou) Co.,Ltd.

Address before: 510520 room 603, room 602, No. 38, Gaopu Road, Tianhe District, Guangzhou, Guangdong

Patentee before: Guangzhou Jianyue Information Technology Co.,Ltd.

TR01 Transfer of patent right