CN113760575A - Event processing method and device, terminal and computer readable storage medium - Google Patents

Event processing method and device, terminal and computer readable storage medium Download PDF

Info

Publication number
CN113760575A
CN113760575A CN202110852950.7A CN202110852950A CN113760575A CN 113760575 A CN113760575 A CN 113760575A CN 202110852950 A CN202110852950 A CN 202110852950A CN 113760575 A CN113760575 A CN 113760575A
Authority
CN
China
Prior art keywords
processing unit
event
processing
processed
determining
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
CN202110852950.7A
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 Huya Information Technology Co Ltd
Original Assignee
Guangzhou Huya 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 Huya Information Technology Co Ltd filed Critical Guangzhou Huya Information Technology Co Ltd
Priority to CN202110852950.7A priority Critical patent/CN113760575A/en
Publication of CN113760575A publication Critical patent/CN113760575A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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/542Event management; Broadcasting; Multicasting; Notifications
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation
    • 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/546Message passing systems or structures, e.g. queues

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Multimedia (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses an event processing method and device, a terminal and a computer readable storage medium, wherein the event processing mode comprises the following steps: acquiring a user code triggering a to-be-processed event; determining a processing unit identifier for processing the event to be processed by utilizing the corresponding relation between the number of the processing units of the intelligent equipment and the user code, and determining the processing unit corresponding to the processing unit identifier as a target processing unit; and processing the corresponding event to be processed by the target processing unit. Through the method, the lock-free serial processing of the high-concurrency events can be realized.

Description

Event processing method and device, terminal and computer readable storage medium
Technical Field
The present invention relates to the field of event processing applications, and in particular, to an event processing method and apparatus, a terminal, and a computer-readable storage medium.
Background
With the development of services, the number of push events is increased along with the diversification trend of push, and contents which are interested by users need to be screened in a large number of push events to control the number of push sent to the users, so that the aim of obtaining the highest profit by using the minimum number of push events is fulfilled.
When controlling such a service scenario, the conventional scheme usually adopts a scheme that a first arriving event holds a lock, and other later arriving events are busy and wait to achieve event serial processing, and the way of implementing serialized processing by locking not only consumes storage cost, but also consumes computing resources.
Disclosure of Invention
The technical problem mainly solved by the application is to provide an event processing method and device, a terminal and a computer readable storage medium, so as to reduce the consumption of memory resources and realize lock-free serial processing of high-concurrency events.
In order to solve the above problem, the present application provides an event processing method, including: acquiring a user code triggering a to-be-processed event; determining a processing unit identifier for processing the event to be processed by utilizing the corresponding relation between the number of the processing units of the intelligent equipment and the user code, and determining the processing unit corresponding to the processing unit identifier as a target processing unit; and processing the corresponding event to be processed through the target processing unit.
Wherein, the step of determining the processing unit identifier for processing the event to be processed by using the corresponding relationship between the number of the processing units of the intelligent device and the user code, and determining the processing unit corresponding to the processing unit identifier as the target processing unit, includes: determining a remainder of the user code and the number of processing units; and determining the processing unit identification for processing the event to be processed by using the remainder, and determining the processing unit corresponding to the processing unit identification as the target processing unit.
Wherein, the step of determining the processing unit identifier for processing the processing event by using the remainder, and determining the processing unit corresponding to the processing unit identifier as the target processing unit includes: determining a processing unit having a processing unit identification that is the same as the remainder as the target processing unit.
The step of acquiring the user code triggering the event to be processed includes: respectively acquiring the user codes through each processing unit of the intelligent equipment; the step of determining the processing unit identifier for processing the event to be processed by using the corresponding relationship between the number of the processing units of the intelligent device and the user code, and determining the processing unit corresponding to the processing unit identifier as the target processing unit, includes: judging whether the processing unit identification of each processing unit meets the corresponding relation or not through each processing unit; and determining the processing unit with the own processing unit identification meeting the corresponding relation as the target processing unit, and processing the event to be processed through the target processing unit.
Wherein, after the step of determining the processing unit whose own processing unit code satisfies the corresponding relationship as the target processing unit and processing the event to be processed by the target processing unit, the method includes: and in response to the completion of the target processing unit processing the event to be processed, deleting the event to be processed.
Wherein, the event processing method further comprises: and deleting the event to be processed in response to the fact that the processing unit identifications of the processing units do not satisfy the corresponding relationship.
Wherein, the step of acquiring the user code triggering the event to be processed further comprises: and acquiring at least one to-be-processed event, and storing the at least one to-be-processed event into a circular queue.
In order to solve the above problem, the present application also provides an event processing apparatus, including: the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a user code triggering a to-be-processed event; the determining unit is used for determining the processing unit identifier for processing the event to be processed by utilizing the corresponding relation between the number of the processing units of the intelligent equipment and the user code, and determining the processing unit corresponding to the processing unit identifier as a target processing unit; and the processing unit is used for processing the corresponding processing event.
In order to solve the above problem, the present application further provides a terminal, where the terminal includes a processor and a memory coupled to each other, the memory is used to store program instructions, and the processor is used to execute the program instructions stored in the memory to implement the event processing method of any of the above embodiments.
In order to solve the above problem, the present application further provides a computer-readable storage medium comprising a processor and a memory, the memory storing computer program instructions, the processor being configured to execute the program instructions to perform the event processing method of any of the above embodiments.
The beneficial effect of this application is: the method comprises the steps of obtaining a user code triggering an event to be processed, determining a processing unit identifier for processing the event to be processed by utilizing the corresponding relation between the number of processing units of the intelligent device and the user code, determining the processing unit corresponding to the processing unit identifier as a target processing unit, and processing the corresponding event to be processed by the target processing unit, so that the event to be processed can be sequentially processed by each processing unit of the intelligent device, serial processing of a lock-free event is realized, resource waste caused by the fact that the same event is processed by a plurality of processing units is avoided, and storage cost and consumption of computing resources are reduced.
Drawings
FIG. 1 is a schematic flow chart diagram illustrating an embodiment of an event processing method according to the present application;
FIG. 2 is a schematic flow chart diagram illustrating another embodiment of an event processing method according to the present application;
FIG. 3 is a flowchart illustrating an event processing method according to another embodiment of the present application
FIG. 4 is a schematic flow chart diagram illustrating yet another embodiment of an event processing method according to the present application;
FIG. 5 is a schematic structural diagram of an embodiment of an event processing apparatus according to the present application;
FIG. 6 is a schematic structural diagram of an embodiment of a terminal according to the present application;
FIG. 7 is a schematic structural diagram of an embodiment of a computer-readable storage medium according to the present application.
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. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a schematic flow chart of an embodiment of an event processing method according to the present application, and as shown in fig. 1, the method includes the following steps:
step S11: and acquiring a user code for triggering the event to be processed.
The to-be-processed event comprises a plurality of to-be-processed events. The embodiment can perform tandem processing on high concurrency events. Specifically, the intelligent device acquires the event to be processed and acquires the user code triggering the event to be processed through the sending position of the event to be processed. Wherein, the user code comprises a user ID for pushing/issuing the event to be processed.
The steps further include: acquiring at least one event to be processed, and storing the at least one event to be processed in a circular queue. The ring queue is a buffer queue which can be accessed by each processing unit of the intelligent device respectively so as to read the user code triggering the event to be processed.
Step S12: and determining the processing unit identifier for processing the event to be processed by utilizing the corresponding relation between the number of the processing units of the intelligent equipment and the user code, and determining the processing unit corresponding to the processing unit identifier as a target processing unit.
In this embodiment, the processing unit refers to a CPU of a computer, and the smart device refers to a computer/computer. In this embodiment, the processing unit of the smart device may include CPU processing units on multiple computers within the same system.
Wherein, the processing unit comprises a specific processing unit identification, and the processing unit identification can be a processing unit ID or a processing unit code and corresponds to the user code.
The method comprises the following steps: the processing unit identification of each processing unit is acquired.
The method also comprises the following steps: each processing unit is assigned a code or ID from 0 to n to identify the code or ID as the processing unit for the processing unit.
In one embodiment, the remainder of the number of the processing units and the user code is calculated, the processing unit identifier for processing the event to be processed is determined by using the remainder, and the processing unit corresponding to the processing unit identifier is determined as the target processing unit. In another embodiment, the processing unit identifier of the event to be processed is determined by the relationship between the mantissa encoded by the user and the number of the processing units, and the processing unit corresponding to the processing unit identifier is determined as the target processing unit. And is not limited herein.
Step S13: and processing the corresponding event to be processed by the target processing unit.
Specifically, the target processing unit is a certain processing unit of the smart device.
The method also comprises the following steps: and deleting the events to be processed from the ring queue in response to the completion of the processing of the events to be processed by the target processing unit or the condition that the processing unit identifications of the processing units do not meet the corresponding relation.
Specifically, in this embodiment, each processing unit respectively and sequentially determines whether its own processing unit identifier satisfies the corresponding relationship, if so, the processing unit processes the event to be processed, if not, another processing unit determines whether its own processing unit identifier satisfies the corresponding relationship, and if not, all the processing units do not process the event to be processed, and delete the event to be processed from the queue.
The beneficial effect of this embodiment is: the method comprises the steps of obtaining a user code triggering an event to be processed, determining a processing unit identifier for processing the event to be processed by utilizing the corresponding relation between the number of processing units of the intelligent device and the user code, determining the processing unit corresponding to the processing unit identifier as a target processing unit, and processing the corresponding event to be processed by the target processing unit, so that the event to be processed can be sequentially processed by each processing unit of the intelligent device, serial processing of a lock-free event is realized, resource waste caused by the fact that the same event is processed by a plurality of processing units is avoided, and storage cost and consumption of computing resources are reduced.
Referring to fig. 2, fig. 2 is a schematic flow chart illustrating another embodiment of an event processing method according to the present application. As shown in fig. 2, the method specifically includes:
step S21: and acquiring a user code for triggering the event to be processed.
The steps further include: acquiring at least one event to be processed, and storing the at least one event to be processed in a circular queue. The circular queue comprises a plurality of events to be processed.
Wherein, the user code comprises a user ID for pushing/issuing the event to be processed.
Step S22: a remainder of the user code and the number of processing units of the smart device is determined.
Specifically, the remainder of the user code divided by the total number of processing units is calculated using a division formula. Is formulated as follows: the user code is the total number of processing units × m + remainder, where m is a positive integer. For example, the user code of the unit to be processed is 222, and the total number of processing units is 10, then
Figure RE-GDA0003348008790000051
And obtaining that the remainder of the user codes of the unit to be processed and the number of the processing units is 2.
Step S23: and determining the processing unit identification for processing the event to be processed by using the remainder, and determining the processing unit corresponding to the processing unit identification as the target processing unit.
In one embodiment, a processing unit with the same processing unit identifier and remainder may be determined as the target processing unit, or a processing unit with the processing unit identifier and remainder satisfying the corresponding relationship may be determined as the target processing unit.
Specifically, the step of determining the processing unit with the same processing unit identification and remainder as the target processing unit further comprises: each processing unit is assigned a code or ID from 0 to n to identify the code or ID as the processing unit for the processing unit. The step of determining the processing unit having the same processing unit identification as the remainder as the target processing unit includes: if the current remainder is 0, the processing unit with the processing unit identification of 0 is determined as the target processing unit, and if the current remainder is 2, the processing unit with the processing unit identification of 2 is determined as the target processing unit.
In another embodiment, the step of determining the processing unit with the processing unit identifier and the remainder satisfying the corresponding relationship as the target processing unit is preceded by: each processing unit is assigned a code or ID from 1 to n to serve as the processing unit identification for the processing unit. The step of determining the processing unit whose processing unit identification and remainder satisfy the correspondence as the target processing unit includes: and performing re-operation based on the remainder to determine the processing unit identifier. Specifically, the processing unit identifier is determined by performing a +1 operation based on the remainder, or by performing a-1 operation based on the remainder. For example, if the current remainder is 2 and a +1 operation is performed based on the remainder to obtain a processing unit identifier of 3, the processing unit with the processing unit identifier of 3 is determined as the target processing unit. The processing unit identifier may also be obtained by a subtraction operation, which is not limited herein.
Step S24: and processing the corresponding event to be processed by the target processing unit.
The method also comprises the following steps: and deleting the events to be processed from the ring queue in response to the completion of the processing of the events to be processed by the target processing unit or the condition that the processing unit identifications of the processing units do not meet the corresponding relation.
Specifically, in this embodiment, each processing unit respectively and sequentially determines whether its own processing unit identifier satisfies the corresponding relationship, if so, the processing unit processes the event to be processed, if not, another processing unit determines whether its own processing unit identifier satisfies the corresponding relationship, and if not, all the processing units do not process the event to be processed, and delete the event to be processed from the queue.
The beneficial effect of this embodiment is: the target processing unit for processing the event to be processed is determined by using the remainder mode, and the only target processing unit can be obtained to process the event to be processed, so that the same event to be processed is prevented from being processed by a plurality of processing units under the condition of not locking, and the consumption of resources is reduced.
Referring to fig. 3, fig. 3 is a schematic flowchart illustrating another embodiment of an event processing method according to the present application. As shown in fig. 2, the method specifically includes:
step S31: and acquiring a user code for triggering the event to be processed.
The steps further include: acquiring at least one event to be processed, and storing the at least one event to be processed in a circular queue. The circular queue comprises a plurality of events to be processed.
Wherein, the user code comprises a user ID for pushing/issuing the event to be processed.
Step S32: a remainder of the user code and the number of processing units of the smart device is determined.
Specifically, the remainder of the user code divided by the total number of processing units is calculated using a division formula. Is formulated as follows: the user code is the total number of processing units × m + remainder, where m is a positive integer. For example, the user code of the unit to be processed is 222, and the total number of processing units is 10, then
Figure RE-GDA0003348008790000051
And obtaining that the remainder of the user codes of the unit to be processed and the number of the processing units is 2.
Step S33: and determining the processing unit with the same processing unit identification and remainder as the target processing unit.
The method also comprises the following steps: each processing unit is assigned a code or ID from 0 to n to identify the code or ID as the processing unit for the processing unit. Specifically, if the remainder is 0, the processing unit whose processing unit is identified as 0 is determined as the target processing unit, and if the current remainder is 2, the processing unit whose processing unit is identified as 2 is determined as the target processing unit.
Step S34: and processing the corresponding event to be processed by the target processing unit.
The method also comprises the following steps: and deleting the events to be processed from the ring queue in response to the completion of the processing of the events to be processed by the target processing unit or the condition that the processing unit identifications of the processing units do not meet the corresponding relation.
Specifically, in this embodiment, each processing unit respectively and sequentially determines whether its own processing unit identifier satisfies the corresponding relationship, if so, the processing unit processes the event to be processed, if not, another processing unit determines whether its own processing unit identifier satisfies the corresponding relationship, and if not, all the processing units do not process the event to be processed, and delete the event to be processed from the queue.
The beneficial effect of this embodiment is: the target processing unit for processing the event to be processed is determined by using the remainder mode, and the only target processing unit can be obtained to process the event to be processed, so that the same event to be processed is prevented from being processed by a plurality of processing units under the condition of not locking, and the consumption of resources is reduced.
Referring to fig. 4, fig. 4 is a schematic flowchart illustrating yet another embodiment of the event processing method according to the present application. As shown in fig. 4, includes:
step S41: and respectively acquiring the user codes through each processing unit of the intelligent equipment.
Specifically, each processing unit respectively reads a certain event to be processed in the circular queue and the user code of the event to be processed.
Step S42: and judging whether the processing unit identification of each processing unit meets the corresponding relation or not through each processing unit.
The corresponding relation is that the processing unit identification of each processing unit is the same as the remainder of the total number of the user codes and the processing units, or meets a certain operation relation with the remainder.
In this embodiment, each processing unit accesses each event to be processed in the circular queue, so as to determine whether its own processing unit identifier satisfies the corresponding relationship, and executes step S43.
Step S43: and determining the processing unit with the own processing unit identification meeting the corresponding relation as the target processing unit.
The method also comprises the following steps: and if the processing unit identification of the processing unit does not meet the corresponding relation, the processing unit does not process the event to be processed.
Step S44: and processing the event to be processed by the target processing unit.
After the target processing unit is determined, the event to be processed can be processed through the target processing unit.
In this embodiment, the method further includes: and in response to the processing unit identifications of the processing units not meeting the corresponding relation, deleting the event to be processed. Specifically, in this embodiment, each processing unit respectively and sequentially determines whether its own processing unit identifier satisfies the corresponding relationship, if so, the processing unit processes the event to be processed, if not, another processing unit determines whether its own processing unit identifier satisfies the corresponding relationship, and if not, all the processing units do not process the event to be processed, and delete the event to be processed from the queue.
The beneficial effects of the embodiment are as follows: the processing units respectively judge whether the identifiers of the processing units meet the corresponding relation or not, if so, the processing units process the events to be processed, and if not, all the processing units delete the events to be processed, so that the events to be processed can be effectively processed by the processing units, and the lock-free serial processing of the events to be processed is realized.
Please refer to fig. 5, wherein fig. 5 is a schematic structural diagram of an embodiment of an event processing apparatus according to the present application. As shown in fig. 5, the event processing device 50 includes: the acquisition unit 51: for obtaining a user code that triggers the pending event. The determining unit 52 determines the processing unit identifier for processing the event to be processed by using the corresponding relationship between the number of processing units of the smart device and the user code, and determines the processing unit corresponding to the processing unit identifier as the target processing unit. The processing unit 53 processes the corresponding processing event.
Referring to fig. 6, fig. 6 is a schematic structural diagram of an embodiment of a terminal of the present application, and as shown in fig. 6, the terminal 60 includes a processor 601 and a memory 602, which are coupled to each other, where the processor 601 is configured to execute program instructions stored in the memory 602 to implement steps in any one of the method embodiments or steps correspondingly executed by an intelligent device in any one of the method embodiments. The terminal 60 may include a touch screen, a printing component, a communication circuit, etc. according to requirements, in addition to the processor 601 and the memory 602, which is not limited herein.
In particular, the processor 601 is adapted to control itself and the memory 602 to implement the steps in any of the above-described method embodiments. Processor 601 may also be referred to as a CPU (Central Processing Unit). The processor 601 may be an integrated circuit chip having signal processing capabilities. The Processor 601 may also be a general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. In addition, the processor 601 may be commonly implemented by a plurality of integrated circuit chips.
The present application further provides a computer-readable storage medium, as shown in fig. 7, fig. 7 is a schematic structural diagram of an embodiment of the computer-readable storage medium of the present application.
The computer-readable storage medium 70 comprises a computer program 701 stored on the computer-readable storage medium 70, and the computer program 701, when executed by the processor, implements the steps of any of the above-described method embodiments or the steps correspondingly executed by the event processing method in the above-described method embodiments.
In particular, the integrated unit, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in a computer readable storage medium 70. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a computer-readable storage medium 70 and includes several instructions for causing a computer device (which may be a personal computer, a server, a network device, or the like) or a processor (processor) to execute all or part of the steps of the method of the embodiments of the present application. And the aforementioned computer-readable storage medium 70 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 the several embodiments provided in the present application, it should be understood that the disclosed method and apparatus may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a module or a unit is merely a logical division, and an actual implementation may have another division, 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 interfaces, and may be in an electrical, mechanical or other form.
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 embodiment.
In addition, functional units in the embodiments of the present application 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 integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit 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 application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in 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, a network device, or the like) or a processor (processor) to execute all or part of the steps of the method according to the embodiments of the present application. 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.
The above embodiments are merely examples and are not intended to limit the scope of the present disclosure, and all modifications, equivalents, and flow charts using the contents of the specification and drawings of the present disclosure or those directly or indirectly applied to other related technical fields are intended to be included in the scope of the present disclosure.

Claims (10)

1. An event processing method, characterized in that the event processing method comprises:
acquiring a user code triggering a to-be-processed event;
determining a processing unit identifier for processing the event to be processed by utilizing the corresponding relation between the number of the processing units of the intelligent equipment and the user code, and determining the processing unit corresponding to the processing unit identifier as a target processing unit;
and processing the corresponding event to be processed through the target processing unit.
2. The event processing method according to claim 1, wherein the step of determining, by using the correspondence between the number of processing units of the smart device and the user code, a processing unit identifier for processing the event to be processed, and determining a processing unit corresponding to the processing unit identifier as a target processing unit comprises:
determining a remainder of the user code and the number of processing units;
and determining the processing unit identification for processing the processing event by using the remainder, and determining the processing unit corresponding to the processing unit identification as the target processing unit.
3. The event processing method according to claim 2, wherein the step of determining, by using the remainder, a processing unit identifier for processing the processing event and determining a processing unit corresponding to the processing unit identifier as the target processing unit comprises:
determining a processing unit having a processing unit identification that is the same as the remainder as the target processing unit.
4. The event processing method according to claims 1 to 3, wherein the step of acquiring the user code triggering the event to be processed includes:
respectively acquiring the user codes through each processing unit of the intelligent equipment;
the step of determining the processing unit identifier for processing the event to be processed by using the corresponding relationship between the number of the processing units of the intelligent device and the user code, and determining the processing unit corresponding to the processing unit identifier as the target processing unit, includes:
judging whether the processing unit identification of each processing unit meets the corresponding relation or not through each processing unit;
and determining the processing unit with the own processing unit identification meeting the corresponding relation as the target processing unit, and processing the event to be processed through the target processing unit.
5. The event processing method according to claim 4, wherein the step of determining the processing unit whose own processing unit code satisfies the correspondence as the target processing unit and processing the event to be processed by the target processing unit is followed by:
and deleting the event to be processed in response to the fact that the processing unit identifications of the processing units do not satisfy the corresponding relationship.
6. The event processing method according to claim 4, further comprising:
and deleting the event to be processed in response to the fact that the processing unit identifications of the processing units do not satisfy the corresponding relationship.
7. The event processing method according to claim 1, wherein the step of acquiring the user code that triggers the event to be processed further comprises:
and acquiring at least one to-be-processed event, and storing the at least one to-be-processed event into a circular queue.
8. An event processing apparatus, characterized in that the event processing apparatus comprises:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a user code triggering a to-be-processed event;
the determining unit is used for determining the processing unit identifier for processing the event to be processed by utilizing the corresponding relation between the number of the processing units of the intelligent equipment and the user code, and determining the processing unit corresponding to the processing unit identifier as a target processing unit;
and the processing unit is used for processing the corresponding processing event.
9. A terminal, characterized in that the terminal comprises a processor and a memory coupled to each other, the memory is used for storing program instructions, and the processor is used for executing the program instructions stored in the memory to realize the event processing method according to any one of the preceding claims 1 to 7.
10. A computer-readable storage medium comprising a processor and a memory, the memory storing computer program instructions, the processor being configured to execute the program instructions to implement the event processing method of any of claims 1 to 7.
CN202110852950.7A 2021-07-27 2021-07-27 Event processing method and device, terminal and computer readable storage medium Pending CN113760575A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110852950.7A CN113760575A (en) 2021-07-27 2021-07-27 Event processing method and device, terminal and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110852950.7A CN113760575A (en) 2021-07-27 2021-07-27 Event processing method and device, terminal and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN113760575A true CN113760575A (en) 2021-12-07

Family

ID=78788002

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110852950.7A Pending CN113760575A (en) 2021-07-27 2021-07-27 Event processing method and device, terminal and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN113760575A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110716748A (en) * 2019-09-24 2020-01-21 深圳中集智能科技有限公司 Service processing method and device, computer readable medium and electronic equipment
CN112114976A (en) * 2020-08-19 2020-12-22 浙江大搜车融资租赁有限公司 Service processing method, device, equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110716748A (en) * 2019-09-24 2020-01-21 深圳中集智能科技有限公司 Service processing method and device, computer readable medium and electronic equipment
CN112114976A (en) * 2020-08-19 2020-12-22 浙江大搜车融资租赁有限公司 Service processing method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN107943828B (en) Service state query method and device, computer equipment and storage medium
CN109309712B (en) Data transmission method based on interface asynchronous call, server and storage medium
US20180262284A1 (en) Method, apparatus and terminal device for sending broadcast
CN110377369B (en) Method, device and computer storage medium for running small program
CN110413978B (en) Data paging export method, device, computer equipment and storage medium
CN111737300A (en) Service processing method, device, equipment and computer readable storage medium
CN112084068A (en) Database remote backup method and device and cloud server
CN110750498B (en) Object access method, device and storage medium
WO2018161535A1 (en) Method, apparatus and terminal device for sending broadcast
CN111913815A (en) Call request processing method and device, electronic equipment and readable storage medium
CN113760575A (en) Event processing method and device, terminal and computer readable storage medium
CN112988812B (en) Inventory data processing method, device, equipment and storage medium
CN112437125B (en) Information concurrent processing method and device, electronic equipment and storage medium
CN111061576B (en) Method and system for creating entity object
WO2022133656A1 (en) Data processing apparatus and method, and related device
CN112231090A (en) Application process management method and device and terminal equipment
CN112000462A (en) Data processing method and device based on shared peripheral resources
CN113779122A (en) Method and apparatus for exporting data
CN116861455B (en) Event data processing method, system, electronic device and storage medium
CN114168323A (en) IO resource limiting method, device, equipment and medium based on IO response time
CN108256989B (en) Data display method and system of fund preparation system
US7577712B1 (en) Efficient event completion in UDAPL
CN107911600B (en) Photographing method based on fingerprint touch, terminal and device with storage function
CN113901116A (en) Cloud member information management system, method and storage platform
CN117271331A (en) Method for testing functional module of application program product, related device and medium

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