CN112308622A - Data processing method and device for virtual object, storage medium and electronic equipment - Google Patents

Data processing method and device for virtual object, storage medium and electronic equipment Download PDF

Info

Publication number
CN112308622A
CN112308622A CN202011229986.1A CN202011229986A CN112308622A CN 112308622 A CN112308622 A CN 112308622A CN 202011229986 A CN202011229986 A CN 202011229986A CN 112308622 A CN112308622 A CN 112308622A
Authority
CN
China
Prior art keywords
data
issuing
virtual object
interface
service
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.)
Pending
Application number
CN202011229986.1A
Other languages
Chinese (zh)
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.)
Guangzhou Boguan Information Technology Co Ltd
Original Assignee
Guangzhou Boguan Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Boguan Information Technology Co Ltd filed Critical Guangzhou Boguan Information Technology Co Ltd
Priority to CN202011229986.1A priority Critical patent/CN112308622A/en
Publication of CN112308622A publication Critical patent/CN112308622A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0207Discounts or incentives, e.g. coupons or rebates
    • G06Q30/0222During e-commerce, i.e. online transactions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • G06F9/548Object oriented; Remote method invocation [RMI]
    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/04Payment circuits
    • G06Q20/06Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme
    • G06Q20/065Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme using e-cash
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/549Remote execution

Landscapes

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

Abstract

The disclosure provides a data processing method of a virtual object, a data processing device of the virtual object, an electronic device and a computer readable storage medium, and relates to the technical field of computers. The data processing method of the virtual object comprises the following steps: responding to a plurality of issuing data aiming at the virtual object sent by a plurality of service terminals, and storing the plurality of issuing data; reading a target number of the release data from a plurality of stored release data according to a preset period; and serially calling a distribution interface for the distribution data of the target quantity in the preset period so as to send the virtual objects to corresponding user accounts according to the distribution data. The method and the system can distribute the virtual objects from a plurality of different service ends to the user account corresponding to each service through the unified calling interface, solve the problems of interface blockage, difficult regression and the like caused by the fact that each service needs to maintain a set of virtual object distribution process, simultaneously avoid repeated distribution and contribute to later maintenance.

Description

Data processing method and device for virtual object, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a data processing method for a virtual object, a data processing apparatus for a virtual object, an electronic device, and a computer-readable storage medium.
Background
In actual various services, for different reasons or purposes, a service end often needs to issue a virtual object to a certain target user, so as to achieve the effects of online transaction or promoting the participation and activity of a user corresponding to a target application. However, in the existing method for issuing virtual objects, each service needs to maintain a set of issuing process, and it may happen that two services call the virtual object method interface at the same time, which results in the situation of interface blockage.
Therefore, a data processing method for virtual objects is needed, the method can be used for distributing the virtual objects from a plurality of different service ends to user accounts corresponding to each service through a uniform calling interface, the problems of interface blockage, difficulty in returning and the like caused by the fact that each service needs to maintain a set of virtual object distribution process respectively are solved, meanwhile, repeated distribution can be avoided, and later maintenance is facilitated.
The information disclosed in the foregoing background section is only for enhancement of understanding of the background of the present disclosure and therefore may include information that does not constitute prior art that is known to a person of ordinary skill in the art.
Disclosure of Invention
An object of the embodiments of the present disclosure is to provide a data processing method for a virtual object, a data processing apparatus for a virtual object, an electronic device, and a computer-readable storage medium, so as to solve the problems of interface blockage, difficulty in returning, and the like caused by a set of virtual object issuing flows that need to be maintained for each service in the prior art, and meanwhile, avoid repeated issuing and facilitate later maintenance.
According to a first aspect of the present disclosure, there is provided a data processing method of a virtual object, including:
responding to a plurality of issuing data aiming at the virtual object sent by a plurality of service terminals, and storing the plurality of issuing data;
reading a target number of the release data from a plurality of stored release data according to a preset period;
and serially calling a distribution interface for the distribution data of the target quantity in the preset period so as to send the virtual objects to corresponding user accounts according to the distribution data.
In an exemplary embodiment of the present disclosure, the issue data is data generated according to a target field parameter of a service input.
In an exemplary embodiment of the present disclosure, the target field parameters include one or more of an account field parameter, a number of virtual objects field parameter, a type of change of virtual object field parameter, or a reason for issuance field parameter.
In an exemplary embodiment of the present disclosure, after the storing the plurality of issue data, the method further comprises:
and generating state records for the issuing data, wherein the state records are used for representing the sending state of the issuing data, and each state record corresponds to a unique number identifier.
In an exemplary embodiment of the present disclosure, the target amount is an amount of the issue data determined according to a data processing rate of the issue interface.
In an exemplary embodiment of the disclosure, the serially calling an issuance interface for the issuance data of the target number includes:
and setting a cache lock for the issuing data of the target quantity, wherein the cache lock is used for serially calling the issuing interface.
In an exemplary embodiment of the present disclosure, the serially invoking an issuing interface for the issuing data of the target number in the preset period to send the virtual object to a corresponding user account according to the issuing data further includes:
and the issuing interface performs data filtering on the issuing data according to the unique number identifier, removes repeated issuing data, and sends the virtual object to a corresponding user account according to the issuing data after the duplication is removed.
In an exemplary embodiment of the present disclosure, when the status record of the release data is a release failure, the method further includes:
and sending alarm information, wherein the alarm information comprises the number of the failed issuing data and the corresponding unique number identification of the state record.
According to a second aspect of the present disclosure, there is provided a data processing apparatus of a virtual object, comprising:
the receiving module is used for responding to a plurality of issuing data aiming at the virtual object sent by a plurality of service terminals and storing the plurality of issuing data;
the reading module is used for reading the issuing data of a target quantity from the stored plurality of issuing data according to a preset period;
and the issuing module is used for serially calling issuing interfaces for the issuing data of the target quantity in the preset period so as to send the virtual objects to corresponding user accounts according to the issuing data.
According to a third aspect of the present disclosure, there is provided an electronic device comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the method of any one of the above via execution of the executable instructions.
According to a fourth aspect of the present disclosure, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method of any one of the above.
Exemplary embodiments of the present disclosure may have some or all of the following benefits:
in the data processing method for a virtual object provided in the exemplary embodiment of the present disclosure, a plurality of pieces of issue data for the virtual object sent by a plurality of service terminals are responded, and the plurality of pieces of issue data are stored; reading a target number of release data from a plurality of stored release data according to a preset period; and serially calling the issuing interfaces for the issuing data of the target quantity in a preset period so as to send the virtual objects to the corresponding user account according to the issuing data. In one aspect, in the method provided in this exemplary embodiment, the issue data may be data corresponding to virtual object issue tasks from a plurality of different service ends. That is, the method can store the issuing data of different service terminals uniformly, and further read the stored issuing data according to the preset period and call the virtual object issuing interface to complete the corresponding virtual object issuing task according to the issuing data. Therefore, each service end does not need to independently maintain a set of virtual object distribution process, development difficulty is reduced, and development efficiency is improved. On the other hand, the method calls the issuing interfaces in series for the issuing data of the target quantity in the preset period, so that the problem of interface blockage caused by calling the interfaces simultaneously by a plurality of tasks can be avoided. In addition, because the virtual object issuing flows of all the services are uniform, when the virtual object issuing interface is changed, each service does not need to return to the issuing flow respectively, and later maintenance is facilitated.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure. It is to be understood that the drawings in the following description are merely exemplary of the disclosure, and that other drawings may be derived from those drawings by one of ordinary skill in the art without the exercise of inventive faculty.
Fig. 1 is a schematic diagram illustrating an exemplary system architecture of a data processing method and apparatus for a virtual object to which an embodiment of the present disclosure may be applied;
FIG. 2 illustrates a schematic structural diagram of a computer system suitable for use with the electronic device used to implement embodiments of the present disclosure;
FIG. 3 is a diagram schematically illustrating a flow of a data processing method of an existing virtual object;
FIG. 4 schematically shows a schematic diagram of a flow of a data processing method of a virtual object according to one embodiment of the present disclosure;
fig. 5 schematically shows a block diagram of a data processing apparatus of a virtual object according to an embodiment of the present disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the subject matter of the present disclosure can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and the like. In other instances, well-known technical solutions have not been shown or described in detail to avoid obscuring aspects of the present disclosure.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
Fig. 1 is a schematic diagram illustrating a system architecture of an exemplary application environment to which a data processing method and apparatus for a virtual object according to an embodiment of the present disclosure may be applied.
As shown in fig. 1, the system architecture 100 may include one or more of terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few. The terminal devices 101, 102, 103 may be various electronic devices having a display screen, including but not limited to desktop computers, portable computers, smart phones, tablet computers, and the like. It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation. For example, server 105 may be a server cluster comprised of multiple servers, or the like.
The data processing method of the virtual object provided by the embodiment of the present disclosure may be executed by the terminal devices 101, 102, and 103, and accordingly, the data processing apparatus of the virtual object may also be disposed in the terminal devices 101, 102, and 103. The data processing method of the virtual object provided by the embodiment of the present disclosure may also be executed by the terminal devices 101, 102, and 103 and the server 105 together, and accordingly, the data processing apparatus of the virtual object may be disposed in the terminal devices 101, 102, and 103 and the server 105. In addition, the data processing method of the virtual object provided by the present disclosure may also be executed by the server 105, and accordingly, the data processing apparatus of the virtual object may be disposed in the server 105, which is not particularly limited in this exemplary embodiment.
For example, in the present exemplary embodiment, each service end may input the issuing data of the virtual object through the mobile terminals 101, 102, and 103, after receiving the issuing data, the mobile terminals 101, 102, and 103 may send the issuing data to the server 105 through the network 104, after receiving the issuing data, the server 105 stores the received multiple issuing data, then reads the target number of issuing data from the stored multiple issuing data according to a preset period, and serially calls the issuing interfaces for the target number of issuing data in the preset period, so as to send the virtual object to the corresponding user account according to the issuing data.
FIG. 2 illustrates a schematic structural diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present disclosure.
It should be noted that the computer system 200 of the electronic device shown in fig. 2 is only an example, and should not bring any limitation to the functions and the scope of the application of the embodiments of the present disclosure.
As shown in fig. 2, the computer system 200 includes a Central Processing Unit (CPU)201 that can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)202 or a program loaded from a storage section 208 into a Random Access Memory (RAM) 203. In the RAM 203, various programs and data necessary for system operation are also stored. The CPU 201, ROM 202, and RAM 203 are connected to each other via a bus 204. An input/output (I/O) interface 205 is also connected to bus 204.
The following components are connected to the I/O interface 205: an input portion 206 including a keyboard, a mouse, and the like; an output section 207 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 208 including a hard disk and the like; and a communication section 209 including a network interface card such as a LAN card, a modem, or the like. The communication section 209 performs communication processing via a network such as the internet. A drive 210 is also connected to the I/O interface 205 as needed. A removable medium 211, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like, is mounted on the drive 210 as necessary, so that a computer program read out therefrom is installed into the storage section 208 as necessary.
In various real services, for different reasons or purposes, a service end often needs to issue a virtual object to a user. In order to implement the issuing process of the virtual object, the inventor tentatively proposes the following method:
and providing a release interface, and releasing the virtual object to the corresponding user account by calling the release interface. The method can provide two virtual object issuing modes of directly issuing to the user and issuing after verification, and when the virtual object is issued, the issuing mode needs to be determined firstly. Generally speaking, as the virtual object is issued by high-risk operation, the scenario of the manner of issuing after selected auditing is more, and the manner of manual auditing in the early stage and accessing to the automatic issuing interface after running for a period of time can be selected, so that the virtual object issuing efficiency can be improved, and the user experience can be improved.
Specifically, in the method, a timing script is developed for each service, the virtual object is stored in an application database corresponding to the service, then the data is read by the timing script and written into an issuing interface, and the virtual object is issued to a user account by calling the issuing interface. For example, in the scenario shown in fig. 3, three different services 310 to 330 are included, where the service 310 corresponds to the application database 311, reads data through the timing script 312, and calls the issuing interface 340 according to the read data; the service 320 corresponds to the application database 321, reads data through the timing script 322, and calls the issuing interface 340 according to the read data; the service 330 corresponds to the application database 331, reads data through the timing script 332, and calls the issuing interface 340 according to the read data. It should be noted that the above scenario is only an exemplary illustration, and the exemplary embodiment may further include a virtual object issuing process of more services, and when a service is newly added, a corresponding application database may be newly developed to store the virtual object issuing data of the service and develop a corresponding timing script.
However, this method has been proved to have the following problems in practice: (1) the issue interface may be blocked in a multiprocess or multithread scenario; (2) the development process is redundant, service developers need to maintain and release data respectively and develop timing scripts respectively, and some redundant codes are added; (3) each service developer needs to be familiar with the issuing process and is in butt joint with the issuing interface, so that the development time of the developer is increased; (4) the data storage fields are not unified, and the data format cannot be unified and standardized; (5) if the issuing interface is changed, each service needs to return to the issuing process; (6) the complexity of the business process also increases the difficulty of testing.
In order to solve the problems in the foregoing method, in this exemplary embodiment, the inventor further proposes a new technical solution to issue the foregoing virtual object, and the following describes in detail the technical solution of the embodiment of the present disclosure:
the present exemplary embodiment first provides a data processing method of a virtual object. The data processing method of the virtual object may be applied to one or more of the terminal apparatuses 101, 102, and 103, the server 105, and the terminal apparatuses 101, 102, and 103 and the server 105. Referring to fig. 4, the data processing method of the virtual object specifically includes the following steps:
step S410: responding to a plurality of issuing data aiming at the virtual object sent by a plurality of service terminals, and storing the plurality of issuing data;
step S420: reading a target number of release data from a plurality of stored release data according to a preset period;
step S430: and serially calling the issuing interfaces for the issuing data of the target quantity in a preset period so as to send the virtual objects to the corresponding user account according to the issuing data.
In the data processing method of the virtual object provided in the exemplary embodiment of the present disclosure, on one hand, in the method provided in the exemplary embodiment, the issue data may be data corresponding to virtual object issue tasks from a plurality of different service terminals. That is, the method can store the issuing data of different service terminals uniformly, and further read the stored issuing data according to the preset period and call the virtual object issuing interface to complete the corresponding virtual object issuing task according to the issuing data. Therefore, each service end does not need to independently maintain a set of virtual object distribution process, development difficulty is reduced, and development efficiency is improved. On the other hand, the method calls the issuing interfaces in series for the issuing data of the target quantity in the preset period, so that the problem of interface blockage caused by calling the interfaces simultaneously by a plurality of tasks can be avoided. In addition, because the virtual object issuing flows of all the services are uniform, when the virtual object issuing interface is changed, each service does not need to return to the issuing flow respectively, and later maintenance is facilitated.
Next, in another embodiment, the above steps are explained in more detail.
In step S410, a plurality of issue data for the virtual object sent by the plurality of service terminals are stored.
In the present exemplary embodiment, the virtual object is an electronic asset that circulates during an activity such as a transaction through an online channel. For example, the virtual object may be an electronic virtual object such as a red envelope, a card ticket, a credit, a virtual item, and the like, which is sent to the user account by an application to improve the participation degree and the activity degree of the user, may also be electronic money of a corresponding amount issued to the user account by the user being charged, and may also be equipment in a game and other forms of electronic assets meeting the above definition, which is not particularly limited in this exemplary embodiment.
In this exemplary embodiment, the service end is a caller initiating a virtual object issuance request. For example, the service end may be an operation platform of an internet service (such as a game service, a live broadcast service, and the like), and may specifically be a certain transaction application platform of the mobile terminal, and when the user charges the application in an online manner, the application platform needs to send electronic money of an amount equal to the user charged amount to a corresponding user account. When a certain service end needs to issue a virtual object to a user participating in the service, the issuing data of the virtual object corresponding to the task can be input through the terminal equipment, and the issuing interface is called according to the issuing data to issue the virtual object to the corresponding user account.
The issuing data corresponds to the virtual objects one to one, and the data generated for the target field parameters of the service input comprises information such as user accounts and issuing quantity required by sending the virtual objects. For example, the target field parameters include one or more of an account field parameter, a number of virtual objects field parameter, a type of change of virtual object field parameter, or a release reason field parameter, wherein information necessary for completing the release task, such as the account field parameter and the number of virtual objects field parameter, is a necessary parameter. It should be noted that the above scenario is only an exemplary illustration, the issue data may further include other parameters required by the issue task, and the necessary parameters may also be other parameters conforming to the definition, which all fall within the scope of protection of the present exemplary embodiment.
The data processing method for the virtual object provided by the present exemplary embodiment can be implemented as a TCP system service, a call function of the service is encapsulated in a common library, and a corresponding service interface is provided to the service caller, and the application code can implement a corresponding virtual object method flow only by calling the function. The service calling party only needs to input the issuing data, and can call the system service to realize the corresponding virtual object issuing task.
In the process, the system service responds to the plurality of the issuing data aiming at the virtual object sent by the plurality of the service terminals, and stores the plurality of the received issuing data so as to realize the issuing of the virtual object according to the issuing data. For example, the received issue data may be stored uniformly in a predefined database. For example, the database may be a mongo database, and the unnecessary parameter verification process may be reduced by storing the issuing data using the mongo database. In addition, the database may also be other types of databases, and this exemplary embodiment is not particularly limited in this respect.
When storing the issue data, it is also necessary to determine whether the received issue data meets a preset requirement. For example, the preset requirement may include whether the release data lacks necessary parameters, whether the format specification required by the system service is met, and the like, and when the release data does not meet the preset requirement, the system service returns a prompt message indicating that the release is failed to the service caller, so that the service caller performs analysis processing, and the service is called again by means of re-uploading the release data and the like. When the issuing data meets the preset requirement, the system service stores the issuing data into the database for subsequent reading and completes the corresponding virtual object issuing task according to the issuing data. It should be noted that the above scenario is only an exemplary illustration, and other preset conditions for determining whether to store the received issue data also belong to the protection scope of the present exemplary embodiment.
The virtual object issuing service provided by the exemplary embodiment can be obtained only by inputting issuing data meeting the preset requirements, and the issuing data transmitted to the system service can come from a plurality of different services, so that the issuing process of the virtual object is unified, and unified management and risk control are facilitated.
In step S420, a target number of issue data is read from the stored plurality of issue data according to a preset cycle.
In this exemplary embodiment, after storing the received plurality of issue data, a status record may be generated for each issue data, where the status record is used to indicate a sending status of the issue data, and each status record corresponds to a unique number identifier. The unique number identifier may be used to uniquely determine the issuing task corresponding to the issuing data, for example, the unique identifier may be a group of number identifiers, or may be other sequences that may function as a unique identifier, which is not particularly required in this example embodiment.
In this exemplary embodiment, the preset period is a time period for reading the issue data. For example, after the release data is stored in the database, the release data may be periodically and periodically read from the database according to the preset period.
The target number is the number of the issuing data read in each preset period, that is, the data of the issuing task to be completed in each preset period. The target number may be determined to be any integer larger than zero manually according to the actual service condition, or may be estimated by the system automatically according to the processing rate of the issuing interface in a preset period. For example, a pre-estimation module may be set in the system, where the pre-estimation module acquires the rate of the issuing interface before executing the issuing task, and pre-estimates the number of tasks that can be processed by the issuing interface in a period according to the rate, and uses the number as the target number of the issuing data to be read. Through the dynamic estimation, the data can be processed by a single thread in one period, the blockage is avoided, and the problems that the calling efficiency is low one by one and the serial cannot be guaranteed by a plurality of calls are solved.
Specifically, in a specific scenario, the process may be to acquire a rate of the issue interface, predict 100 pieces of issue data that can be issued in 5 minutes according to the rate, and determine to read 100 pieces of issue data, so that the 100 pieces of issue data are serially processed in the next 5 minutes. Compared with the prior art that the serial calling mode that the issuing data are read one by one and the issuing interfaces are called one by one, the exemplary embodiment can extract a plurality of issuing data at one time and serially call the issuing interfaces for the plurality of issuing data, and 100 issuing data are extracted only once, which is equivalent to only one io (input/output), so that the reading efficiency is higher and the overhead to the system is smaller.
Taking the preset period as 5 minutes and the target number as 100 as an example, the process of reading the target number of the release data from the stored plurality of release data according to the preset period may be: a timing task with a period of 5 minutes is set, and 100 pieces of unfinished issue data are read every 5 minutes. The timed task can be realized by writing a timed script and executing the timed script according to the preset period. In addition, the timing reading process may also be implemented in other manners, and this example embodiment is not particularly limited in this respect. It should be noted that the above scenario is only an exemplary illustration, and other duration periods or target numbers also belong to the protection scope of the present exemplary embodiment.
In the present exemplary embodiment, after the release data is read through the above process, the read release data may be filtered again, for example, release data corresponding to situations that necessary parameters are incomplete, parameter values are illegal, and a release task is completed may be filtered. It should be noted that the above-mentioned scenarios are only exemplary, the scope of protection of the present exemplary embodiment is not limited thereto, and the process may also filter out other non-canonical or non-legal issue data.
In step S430, the issuing interfaces are serially called for the target number of issuing data within a preset period, so as to send the virtual objects to the corresponding user accounts according to the issuing data.
In this exemplary embodiment, the issuing interface may implement a function of issuing the virtual object to a corresponding user account according to the read issuing data, where the user account is an account corresponding to the account field parameter in the issuing data.
In order to prevent the situations of interface blockage and the like in the calling process, the calling mode of the issuing interface is set to be a single-process or single-thread calling mode. Specifically, the method for implementing the single process or the single thread call may be: and setting a cache lock for the target number of issued data, wherein the cache lock is used for serially calling the issuing interface.
Taking the preset period as 5 minutes and the target number as 100, the above process may be: and adding a Redis cache lock to the calling process corresponding to each preset period when calling the issuing interface. That is, when the previous issuing data read in the 5 minute period is not executed, the process of periodically reading the issuing data and calling the issuing interface in the next 5 minutes is not performed, so that serial calling for a plurality of issuing data in the preset period can be realized. In an alternative embodiment, the cache lock is released when it is detected that the issuing interface has finished processing the target amount of issuing data in advance within a preset period. For example: the preset period is 5 minutes, and the issuing interface finishes processing the issuing data of the target quantity in 4 minutes, so that the cache lock can be released, and the next issuing data extraction can be carried out. It should be noted that the above scenarios are only exemplary, and the scope of protection of the present exemplary embodiment is not limited thereto.
In this exemplary embodiment, the invoking of the issue interface is performed according to the issue data read in step S420, and specifically may be: and sequentially sending the virtual objects of the target number to the corresponding user account according to the distribution data in the preset period, and entering the next period until the execution of the distribution tasks corresponding to the distribution data of the target number is completed.
For example, the process of sequentially sending the virtual objects to the corresponding user accounts according to each piece of issuing data may be to read the user accounts and the number to be issued included in the issuing data, and issue the corresponding number of virtual objects to the read user accounts by calling the issuing interface. According to the actual situation, before the part of the virtual objects are issued, manual review may be required, and at this time, the implementation of the process may further be: acquiring a parameter of the virtual object variation type in the read distribution data, and judging whether the distribution data is in a white list or a black list; when the issuing data is located in the white list, directly calling an issuing interface, and issuing the virtual object to the corresponding user account according to the issuing data; and when the issuing data is located in the blacklist, the issuing data is sent to manual review, and after the manual review is passed, the issuing interface is called to issue the virtual object to the corresponding user account.
In addition, according to the actual situation of the service, when the issuing task cannot be completed according to the current issuing data, other unknown parameters required for completing the issuing task also need to be acquired according to the existing parameters in the issuing data. For example, when a bonus is distributed to a certain anchor room, the read distribution data includes an anchor ID, and the distribution data needs to know the contract room of the anchor, the anchor contract room can be acquired according to the anchor ID to complete the final distribution of the bonus. It should be noted that the above scenarios are only exemplary, and the scope of protection of the present exemplary embodiment is not limited thereto.
In this exemplary embodiment, when the issue interface is called, the issue data may be filtered out again through the unique number identifier generated in step S420, and the specific implementation may be as follows: and the issuing interface performs data filtering on the issuing data according to the unique serial number identifier, removes repeated issuing data, and sends the virtual object to the corresponding user account according to the de-duplicated issuing data. Through the filtering and de-duplication process, the repeated issuing conditions of TCP re-issuing packets and the like without receiving return packets due to network fluctuation in the issuing process can be avoided.
In this exemplary embodiment, when the issuance task is successfully executed, the status record corresponding to the issuance data may be further sent to an operation background, so as to facilitate the operation export data to be checked, and mark the status of the issuance data in the database as issued. If the data of failed release exists in the whole release task, alarm information is sent to inform a responsible person of the number of failed release and the unique identifier corresponding to each task of failed release, so that the reason can be found and repaired in time.
It should be noted that although the various steps of the methods of the present disclosure are depicted in the drawings in a particular order, this does not require or imply that these steps must be performed in this particular order, or that all of the depicted steps must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions, etc.
Further, in the present exemplary embodiment, a data processing apparatus of a virtual object is also provided. Referring to fig. 5, the data processing apparatus 500 of the virtual object may include a receiving module 510, a reading module 520, and an issuing module 530. Wherein:
the receiving module 510 may be configured to store a plurality of release data for the virtual object, which are sent by a plurality of service terminals;
the reading module 520 may be configured to read a target number of release data from the stored plurality of release data according to a preset period;
the issuing module 530 may be configured to serially invoke the issuing interface for the target number of issuing data in a preset period, so as to send the virtual object to the corresponding user account according to the issuing data.
In this exemplary embodiment, the receiving module may further include a data processing unit, configured to determine whether the received issue data meets a preset requirement. For example, the preset requirement may include whether the release data lacks necessary parameters, whether the format specification required by the system service is met, and the like, and when the release data does not meet the preset requirement, the system service returns a prompt message indicating that the release is failed to the service caller, so that the service caller performs analysis processing, and the service is called again by means of re-uploading the release data and the like.
The issuing module further comprises a filtering unit and a prompting unit. The filtering unit is used for filtering out the sending data to avoid the situation that the TCP resends the packet without receiving the return packet due to network fluctuation in the sending process. The prompt unit is used for sending alarm information if the data failed to be issued exist in the whole issuing task, and informing a responsible person of the number of failed issuing and the unique identifier corresponding to each task failed to be issued so as to find the reason and repair the reason in time.
The details of each module or unit in the virtual object issuing apparatus have been described in detail in the data processing method of the corresponding virtual object, and therefore are not described herein again.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
As another aspect, the present application also provides a computer-readable medium, which may be contained in the electronic device described in the above embodiments; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by an electronic device, cause the electronic device to implement the method as described in the embodiments below. For example, the electronic device may implement the steps shown in fig. 3 to 4, and the like.
It should be noted that the computer readable media shown in the present disclosure may be computer readable signal media or computer readable storage media or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer-readable signal medium may include a propagated data signal with computer-readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (11)

1. A method for processing data of a virtual object, comprising:
responding to a plurality of issuing data aiming at the virtual object sent by a plurality of service terminals, and storing the plurality of issuing data;
reading a target number of the release data from a plurality of stored release data according to a preset period;
and serially calling a distribution interface for the distribution data of the target quantity in the preset period so as to send the virtual objects to corresponding user accounts according to the distribution data.
2. The method for processing the data of the virtual object according to claim 1, wherein the release data is generated according to a target field parameter of a service input.
3. The method of claim 2, wherein the target field parameters comprise one or more of an account field parameter, a number of virtual objects field parameter, a type of change of virtual object field parameter, or a reason for issuance field parameter.
4. The method for processing data of a virtual object according to claim 1, wherein after said storing of said plurality of release data, said method further comprises:
and generating state records for the issuing data, wherein the state records are used for representing the sending state of the issuing data, and each state record corresponds to a unique number identifier.
5. The data processing method of a virtual object according to claim 1, wherein the target amount is an amount of issue data determined according to a data processing rate of the issue interface.
6. The method for processing the data of the virtual object according to claim 1, wherein the serially calling the issuing interface for the issuing data of the target number comprises:
and setting a cache lock for the issuing data of the target quantity, wherein the cache lock is used for serially calling the issuing interface.
7. The data processing method of the virtual object according to claim 4, wherein the serially invoking an issuing interface for the issuing data of the target number in the preset period to send the virtual object to a corresponding user account according to the issuing data further comprises:
and the issuing interface performs data filtering on the issuing data according to the unique number identifier, removes repeated issuing data, and sends the virtual object to a corresponding user account according to the issuing data after the duplication is removed.
8. The data processing method of a virtual object according to claim 4, wherein when the status record of the release data is a release failure, the method further comprises:
and sending alarm information, wherein the alarm information comprises the number of the failed issuing data and the corresponding unique number identification of the state record.
9. A data processing apparatus for a virtual object, comprising:
the receiving module is used for responding to a plurality of issuing data aiming at the virtual object sent by a plurality of service terminals and storing the plurality of issuing data;
the reading module is used for reading the issuing data of a target quantity from the stored plurality of issuing data according to a preset period;
and the issuing module is used for serially calling issuing interfaces for the issuing data of the target quantity in the preset period so as to send the virtual objects to corresponding user accounts according to the issuing data.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method of any one of claims 1 to 8.
11. An electronic device, comprising:
a processor;
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the method of any of claims 1-8 via execution of the executable instructions.
CN202011229986.1A 2020-11-06 2020-11-06 Data processing method and device for virtual object, storage medium and electronic equipment Pending CN112308622A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011229986.1A CN112308622A (en) 2020-11-06 2020-11-06 Data processing method and device for virtual object, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011229986.1A CN112308622A (en) 2020-11-06 2020-11-06 Data processing method and device for virtual object, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN112308622A true CN112308622A (en) 2021-02-02

Family

ID=74326392

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011229986.1A Pending CN112308622A (en) 2020-11-06 2020-11-06 Data processing method and device for virtual object, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN112308622A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113469735A (en) * 2021-06-17 2021-10-01 北京达佳互联信息技术有限公司 Resource processing method and device, electronic equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101290692A (en) * 2008-05-13 2008-10-22 迈世亚(北京)科技有限公司 Multifunctional integral checking device
CN106095877A (en) * 2016-06-07 2016-11-09 中国建设银行股份有限公司 A kind of red packet data processing method and device
CN107451853A (en) * 2017-07-06 2017-12-08 广州唯品会网络技术有限公司 Method, apparatus, system and the storage medium that a kind of red packet distributes in real time
CN110163658A (en) * 2019-04-17 2019-08-23 深圳左邻永佳科技有限公司 Virtual resource data processing method, device, computer equipment and storage medium
CN110944219A (en) * 2019-11-20 2020-03-31 北京达佳互联信息技术有限公司 Resource allocation method, device, server and storage medium
CN111080429A (en) * 2018-10-18 2020-04-28 腾讯科技(深圳)有限公司 Virtual resource acquisition method, device and storage medium
CN111476598A (en) * 2020-03-20 2020-07-31 微民保险代理有限公司 Information prompting method and device, storage medium and electronic device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101290692A (en) * 2008-05-13 2008-10-22 迈世亚(北京)科技有限公司 Multifunctional integral checking device
CN106095877A (en) * 2016-06-07 2016-11-09 中国建设银行股份有限公司 A kind of red packet data processing method and device
CN107451853A (en) * 2017-07-06 2017-12-08 广州唯品会网络技术有限公司 Method, apparatus, system and the storage medium that a kind of red packet distributes in real time
CN111080429A (en) * 2018-10-18 2020-04-28 腾讯科技(深圳)有限公司 Virtual resource acquisition method, device and storage medium
CN110163658A (en) * 2019-04-17 2019-08-23 深圳左邻永佳科技有限公司 Virtual resource data processing method, device, computer equipment and storage medium
CN110944219A (en) * 2019-11-20 2020-03-31 北京达佳互联信息技术有限公司 Resource allocation method, device, server and storage medium
CN111476598A (en) * 2020-03-20 2020-07-31 微民保险代理有限公司 Information prompting method and device, storage medium and electronic device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113469735A (en) * 2021-06-17 2021-10-01 北京达佳互联信息技术有限公司 Resource processing method and device, electronic equipment and storage medium
CN113469735B (en) * 2021-06-17 2024-05-28 北京达佳互联信息技术有限公司 Resource processing method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN105939362A (en) User account management method and device
CA3059719C (en) Payment processing method, device, medium and electronic device
CN106685894B (en) Risk identification method, device and system
CN110677453A (en) ZooKeeper-based distributed lock service implementation method, device, equipment and storage medium
CN107220169B (en) Method and equipment for simulating server to return customized data
CN111221727A (en) Test method, test device, electronic equipment and computer readable medium
CN113361838A (en) Business wind control method and device, electronic equipment and storage medium
CN102866932A (en) Method and device for providing and collecting data related to abnormal terminal
CN113765942A (en) Cloud computing power distribution method, user terminal, cloud computing power platform and system
CN115599665A (en) Disaster recovery system testing method and device, electronic equipment and storage medium
CN111581077A (en) Intelligent contract testing method and device
CN112308622A (en) Data processing method and device for virtual object, storage medium and electronic equipment
CN112561690B (en) Method, system, equipment and storage medium for testing credit card staged service interface
CN109873731B (en) Test method, device and system
CN110347735A (en) The data forwarding of configurationization mends processing method, device and readable storage medium storing program for executing extremely
CN117194245A (en) Automatic test method, device, equipment and storage medium
CN111367694B (en) Event processing method, server and computer storage medium
CN117290255A (en) Batch interface performance test method based on Python and Locut frameworks
CN105550103A (en) Custom test script based automated testing method
CN112887355B (en) Service processing method and device for abnormal server
CN116467085A (en) Task processing method, system, electronic device and storage medium
CN115080449A (en) Test method, device, equipment, medium and program product
CN115983991A (en) Flow adjusting method, device, equipment and medium
CN112948195A (en) Interface testing method and device, electronic equipment and storage medium
US20230306344A1 (en) Information management apparatus, information management method, and program

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