CN110852603B - High-throughput wind control data processing method, device, equipment and storage medium - Google Patents

High-throughput wind control data processing method, device, equipment and storage medium Download PDF

Info

Publication number
CN110852603B
CN110852603B CN201911084478.6A CN201911084478A CN110852603B CN 110852603 B CN110852603 B CN 110852603B CN 201911084478 A CN201911084478 A CN 201911084478A CN 110852603 B CN110852603 B CN 110852603B
Authority
CN
China
Prior art keywords
callback function
event
monitored
operating system
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911084478.6A
Other languages
Chinese (zh)
Other versions
CN110852603A (en
Inventor
许守明
谢强
陈国庆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Jiyi Network Technology Co ltd
Original Assignee
Wuhan Jiyi Network 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 Wuhan Jiyi Network Technology Co ltd filed Critical Wuhan Jiyi Network Technology Co ltd
Priority to CN201911084478.6A priority Critical patent/CN110852603B/en
Publication of CN110852603A publication Critical patent/CN110852603A/en
Application granted granted Critical
Publication of CN110852603B publication Critical patent/CN110852603B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0635Risk analysis of enterprise or organisation activities
    • 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)
  • Business, Economics & Management (AREA)
  • Human Resources & Organizations (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • General Physics & Mathematics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Economics (AREA)
  • Educational Administration (AREA)
  • Development Economics (AREA)
  • Game Theory and Decision Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention belongs to the technical field of internet wind control, and discloses a high-throughput wind control data processing method, device, equipment and storage medium. The method comprises the following steps: processing an event callback function corresponding to an initial callback function queue in a service system by receiving the initial callback function queue, selecting an event callback function to be processed according to a processing result, adding the request callback function into the event polling queue, traversing an operating system event signal list from the event polling queue, then judging whether target data information in the operating system event signal list has data variation or not, wherein the target data information is data information corresponding to the request callback function, and finally judging that the request callback function finishes processing if the target data information has data variation. By the method, the load capacity and the response speed of the service system are improved, and therefore user experience is improved.

Description

High-throughput wind control data processing method, device, equipment and storage medium
Technical Field
The invention relates to the technical field of internet wind control, in particular to a high-throughput wind control data processing method, device, equipment and storage medium.
Background
In the current technical field of enterprise wind control, when a user accesses a business system of an enterprise each time, the business system needs to send information related to the request to a wind control system and wait for the wind control system to perform operation, and before the wind control system completes the operation and gives a judgment result, the business system is continuously in a waiting state and cannot process an access request of a next user. The method has the advantages that the wind control system is accessed, so that the processing load capacity of the business system of an enterprise is greatly reduced, in addition, the business system can also search and match the characteristic data of a user in a certain threat information library, and the database query is very slow operation, so that the response speed of the business system to the user is very slow, and the user experience of a product is directly influenced.
The above is only for the purpose of assisting understanding of the technical solution of the present invention, and does not represent an admission that the above is the prior art.
Disclosure of Invention
The invention mainly aims to provide a high-throughput wind control data processing method, a high-throughput wind control data processing device, high-throughput wind control data processing equipment and a high-throughput wind control data processing storage medium, and aims to solve the technical problems of load capacity reduction and response delay caused by the fact that a business system is accessed into a wind control system in the prior art.
In order to achieve the above object, the present invention provides a high throughput wind-control data processing method, which includes the following steps:
receiving an initial callback function queue in a service system, and processing a corresponding event callback function in the initial callback function queue;
selecting a callback function of the event to be processed according to the processing result, and taking the callback function of the event to be processed as a request callback function;
adding the request callback function into an event polling queue, and traversing an operating system event signal list from the event polling queue;
judging whether data change exists in target data information in the operating system event signal list, wherein the target data information is data information corresponding to the request callback function;
and if the target data information has data variation, judging that the request callback function finishes processing.
Preferably, after the step of receiving the initial callback function queue in the service system, the method further includes:
acquiring a corresponding event callback function in the initial callback function queue;
according to the event callback function, acquiring an address of an object corresponding to the event callback function, a file descriptor to be monitored, an address of returned data and a monitored operating system signal;
establishing an operating system event signal table according to the address of the object, the descriptor of the file to be monitored, the address of the returned data and the monitored operating system signal;
wherein the data information comprises: the file descriptor to be intercepted and/or the address of the return data and/or the intercepted operating system signal.
Preferably, the step of processing the corresponding event callback function in the initial callback function queue includes:
traversing the event callback function in the initial callback function queue;
judging whether the file descriptor to be monitored and/or the address of the returned data corresponding to the event callback function have information change and/or the monitored operating system signal is sent out;
if the file descriptor to be monitored and/or the address of the returned data corresponding to the event callback function have data change and/or the monitored operating system signal is sent, determining that the event callback function completes processing;
and if the file descriptor to be monitored and/or the address of the returned data corresponding to the event callback function have no data change and/or the monitored operating system signal is not sent, selecting the event callback function from the initial callback function queue.
Preferably, the step of traversing the event callback function includes:
acquiring a file descriptor to be monitored corresponding to the event callback function according to the operating system signal list;
searching a corresponding calling interface according to the file descriptor to be monitored;
and traversing the event callback function in the calling interface.
Preferably, the step of determining whether there is data variation in target data information in the operating system signal list, where the target data information is data information corresponding to the request callback function, includes:
acquiring the address of an object corresponding to the request callback function, the file descriptor to be monitored, the address of returned data and the monitored operating system signal according to the operating system signal list;
searching a corresponding calling interface according to the file descriptor to be monitored;
traversing the request callback function in the calling interface according to the event polling queue;
and judging whether the file descriptor to be monitored and/or the address of the returned data corresponding to the request callback function have information change and/or the monitored operating system signal is sent out.
Preferably, after the step of determining whether there is information change in the file descriptor to be monitored and/or the address of the returned data corresponding to the request callback function and/or whether the monitored operating system signal is sent out, the method further includes:
if the file descriptor to be monitored and/or the address of the returned data corresponding to the request callback function have no data change and/or the monitored operating system signal is not sent, selecting the request callback function from the event polling queue;
and adding the selected request callback function into the event polling queue again until the file descriptor to be monitored and/or the address of the returned data corresponding to the request callback function have data change and/or the monitored operating system signal is sent out.
Preferably, the step of adding the request callback function to the event polling queue includes:
sequencing the request callback functions according to the initial callback function queue;
and sequentially adding the request callback functions into an event polling queue according to the sequencing result.
In addition, in order to achieve the above object, the present invention further provides a high-throughput wind-controlled data processing apparatus, including: the receiving module is used for receiving an initial callback function queue in a service system and processing a corresponding event callback function in the initial callback function queue;
the selecting module is used for selecting a callback function of the event to be processed according to the processing result and taking the callback function of the event to be processed as a request callback function;
the adding module is used for adding the request callback function into an event polling queue and traversing an operating system event signal list from the event polling queue;
the judging module is used for judging whether data change exists in target data information in the operating system event signal list, and the target data information is data information corresponding to the request callback function;
and the judging module is used for judging that the request callback function completes processing if the target data information has data change.
In addition, to achieve the above object, the present invention also provides an electronic device, including: the system comprises a memory, a processor and a high-throughput wind-control data processing program stored on the memory and operable on the processor, wherein the high-throughput wind-control data processing program is configured to realize the steps of the high-throughput wind-control data processing method according to any one of the above items.
In addition, in order to achieve the above object, the present invention further provides a storage medium, where a high-throughput wind-controlled data processing program is stored, and the high-throughput wind-controlled data processing program, when executed by a processor, implements the steps of the high-throughput wind-controlled data processing method according to any one of the above items.
The invention processes the corresponding event callback function in the initial callback function queue by receiving the initial callback function queue in a service system, selects the event callback function to be processed according to the processing result, takes the event callback function to be processed as the request callback function, then adds the request callback function into the event polling queue, traverses the event signal list of an operating system from the event polling queue, judges whether the target data information in the event signal list of the operating system has data variation, the target data information is the data information corresponding to the request callback function, if the target data information has data variation, the request callback function is judged to be finished, if the target data information has no data variation, the request function is added into the event polling queue again, and the request callback function is processed again until data change exists, and by the method, the load capacity of the service system is improved, so that the response speed of the service system is also improved.
Drawings
Fig. 1 is a schematic structural diagram of an electronic device in a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of a high-throughput wind-controlled data processing method according to a first embodiment of the present invention;
FIG. 3 is a schematic flow chart of a high throughput pneumatic control data processing method according to a second embodiment of the present invention;
fig. 4 is a block diagram of a high-throughput wind-controlled data processing apparatus according to a first embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the invention.
Referring to fig. 1, fig. 1 is a schematic structural diagram of an electronic device in a hardware operating environment according to an embodiment of the present invention.
As shown in fig. 1, the electronic device may include: a processor 1001, such as a Central Processing Unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a WIreless interface (e.g., a WIreless-FIdelity (WI-FI) interface). The Memory 1005 may be a Random Access Memory (RAM) Memory, or may be a Non-Volatile Memory (NVM), such as a disk Memory. The memory 1005 may alternatively be a storage device separate from the processor 1001 described previously.
Those skilled in the art will appreciate that the configuration shown in fig. 1 does not constitute a limitation of the electronic device, and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a storage medium, may include therein an operating system, a network communication module, a user interface module, and a high-throughput wind-controlled data processing program.
In the electronic apparatus shown in fig. 1, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 in the electronic device according to the present invention may be disposed in the electronic device, and the electronic device calls the high-throughput wind-controlled data processing program stored in the memory 1005 through the processor 1001 and executes the high-throughput wind-controlled data processing method according to the embodiment of the present invention.
An embodiment of the present invention provides a high-throughput wind control data processing method, and referring to fig. 2, fig. 2 is a flowchart illustrating a first embodiment of the high-throughput wind control data processing method according to the present invention.
In this embodiment, the high-throughput wind control data processing method includes the following steps:
step S10: and receiving an initial callback function queue in a service system, and processing a corresponding event callback function in the initial callback function queue.
It should be noted that, according to the requirement of the enterprise service system, an event polling queue composed of a service identifier and a corresponding processing function is predefined, then according to the service identifier transmitted by the service system, an event callback function is acquired in the service system, and the event callback function is added into an initial callback function queue, and then the service system transmits the event callback function to the wind-controlled data processing device for processing according to the sequence of the initial callback function queue.
It should be understood that when the event callback function is transferred to the wind control data processing device, the service system may reacquire a new batch of event callback functions, so as not to wait for the determination result of the wind control data processing, thereby avoiding the problems of reduced load capacity and increased response delay caused by blocking waiting.
In addition, it should be noted that, after the wind-controlled data processing device receives an initial callback function queue in a service system, the wind-controlled data processing device obtains an address of an object, a file descriptor to be monitored, an address of returned data, and a monitored operating system signal corresponding to an event callback function in the initial callback function queue, and establishes an operating system event signal list according to the address of the object, the file descriptor to be monitored, the address of returned data, and the monitored operating system signal.
In addition, it should be understood that, when the wind control processing device performs processing, it needs to traverse the event callback function in the initial callback function queue, then obtain the file descriptor to be monitored corresponding to the event callback function, and search for the interface corresponding to the event callback function according to the file descriptor to be monitored, for example, if the file descriptor is a read data operation, it is a corresponding read interface; if the event call back function is called by an external wind control system, the corresponding call interface is called, and the like, then data information in the external call interface is synchronized into a current memory, so that the delay of searching from an external database every time is reduced, then whether information change exists in the file descriptor to be monitored and/or the address of returned data corresponding to the event call back function within a preset time threshold range and/or whether the monitored operating system signal is sent out is judged according to the operating system event signal list, and if the data change exists in the file descriptor to be monitored and/or the address of returned data corresponding to the event call back function within the preset time threshold range and/or the monitored operating system signal is sent out, the event call back function is judged to be finished; and if the file descriptor to be monitored and/or the address of the returned data corresponding to the event callback function have no data change and/or the monitored operating system signal is not sent, selecting the event callback function from the initial callback function queue.
Further, for ease of understanding, the following is exemplified:
supposing that the initial callback function queue contains 3 event callback functions, the 3 event callback functions are named as a, b and c respectively, and are transferred to the wind-controlled data processing device for processing according to the initial callback function queue, when the a processing is carried out, the 3 event callback functions are processed in the wind-controlled processing device, a calling interface corresponding to the event callback function is found, and the address of the file descriptor to be monitored and/or the return data and/or the monitored operating system signal are/is sent out, the event callback function a processing is finished, when the b processing is carried out, when the wind-controlled processing device carries out the processing, the calling interface corresponding to the event callback function is found for recording, and meanwhile, the address of the file descriptor to be monitored and/or the return data and/or the monitored operating system signal are/is not sent out, and selecting the event callback function b from the initial callback function queue, searching a calling interface corresponding to the event callback function for recording when the event callback function b is processed in a wind control processing device during c processing, and selecting the event callback function c from the initial callback function queue if the file descriptor to be monitored does not exist and/or the address of returned data and/or the monitored operating system signal is not sent out.
Step S20: and selecting a callback function of the event to be processed according to the processing result, and taking the callback function of the event to be processed as a request callback function.
It should be noted that the to-be-processed event callback function is selected according to the processing result, the selected event callback function is used as a request callback function, and meanwhile, an outsource parameter transmitted by the service system is transmitted as an actual parameter of the request callback function.
In addition, the following is exemplified for ease of understanding:
according to the above example, the event callback functions b and c are selected from the initial callback function queue, and the event callback functions b and c are used as request callback functions.
Step S30: and adding the request callback function into an event polling queue, and traversing an operating system event signal list from the event polling queue.
It should be noted that, the request callback functions are sequenced according to the initial callback function queue, and according to the sequencing result, the request callback functions are sequentially added into the event polling queue, and register a specific operating system signal for the request callback functions, and add into the system time signal list, and in the event polling queue, the operating system event signal list is checked according to the sequencing result, where the operating system event signal list includes the address of the object corresponding to the event callback function, the file descriptor to be monitored, the address of the return data, and the operating system signal to be monitored.
Further, it is to be understood that the following is illustrative for ease of understanding:
according to the above example, if the order of the request callback functions b and c in the initial callback function queue is b and c, the request callback functions b and c are sequentially added into the event polling queue according to the order, the order in the event polling queue is also b and c, and then the operating system event signal list is circularly checked according to the order of b and c and the order corresponding to the request callback functions b and c.
Step S40: and judging whether data change exists in target data information in the operating system event signal list, wherein the target data information is data information corresponding to the request callback function.
It should be noted that, according to the operating system event signal list, the address of the object corresponding to the request callback function, the file descriptor to be monitored, the address of the returned data, and the monitored operating system signal are obtained, a corresponding call interface is searched according to the file descriptor to be monitored, according to the event polling queue, the request callback function is traversed in the call interface, whether information change exists in the file descriptor to be monitored and the address of the returned data corresponding to the request callback function and/or the monitored operating system signal is sent out is determined, and the file descriptor to be monitored, the address of the returned data, and the monitored operating system signal are used as data information.
In addition, it should be understood that the wind control processing device processes the request callback functions in the event polling queue one by one according to a first-in first-out principle, after finding the corresponding call interface, determines the request callback functions, checks whether the address of the returned data corresponding to the request callback function and the file descriptor to be monitored in the operating system event signal list have data return or complete data processing and/or the monitored operating system signal is sent within a preset time threshold range, and returns the returned wind control determination result to the service system if there is data return or complete data processing and/or the monitored operating system signal is sent.
In addition, when data processing is performed, it is not necessary to wait for the determination result in the wind control processing device and directly execute the processing of the next request callback function.
Step S50: and if the target data information has data variation, judging that the request callback function finishes processing.
It should be noted that, the operating system event signal list is subjected to cycle traversal, if data information corresponding to the request callback function has data change and/or the monitored operating system signal is sent out, it is determined that the request callback function completes processing, and if the file descriptor to be monitored and/or the address of the returned data corresponding to the request callback function has no data change and/or the monitored operating system signal is not sent out, the request callback function is selected from the event polling queue.
In this embodiment, an initial callback function queue in a service system is received, a corresponding event callback function in the initial callback function queue is processed, an event callback function to be processed is selected according to the processing result, the event callback function to be processed is used as a request callback function, an address of an object corresponding to the request callback function, a file descriptor to be monitored, an address of returned data and a monitored operating system signal are obtained according to the operating system event signal list, a corresponding calling interface is searched according to the file descriptor to be monitored, the request callback function is traversed in the calling interface according to the event polling queue, and then whether information change exists in the file descriptor to be monitored and the address of returned data corresponding to the request callback function and/or whether the monitored operating system signal is sent out are determined, if the file descriptor to be monitored and/or the address of the returned data corresponding to the event callback function do not have data change and/or the monitored operating system signal is not sent, selecting the event callback function from the initial callback function queue, adding the selected event callback function into the event polling queue, taking the selected event callback function as a request callback function, judging whether the data information corresponding to the request callback function has data change in the event polling queue, and if the data information corresponding to the request callback function has data change, judging that the request callback function completes processing, so that the load capacity and the response speed of a service system are improved, and the user experience is greatly improved.
Referring to fig. 3, fig. 3 is a flowchart illustrating a high throughput method for processing wind-controlled data according to a second embodiment of the present invention.
Based on the first embodiment, in step S10, the method for processing high-throughput wind control data according to this embodiment further includes:
step S101: and acquiring the corresponding event callback function in the initial callback function queue.
Step S102: and acquiring the address of an object corresponding to the event callback function, the file descriptor to be monitored, the address of returned data and the monitored operating system signal according to the event callback function.
Step S103: and establishing an operating system event signal table according to the address of the object, the descriptor of the file to be monitored, the address of the returned data and the monitored operating system signal.
Step S104: and in the initial callback function queue, acquiring a file descriptor to be monitored corresponding to the event callback function according to the operating system event signal list.
Step S105: and searching a corresponding calling interface according to the file descriptor to be monitored.
Step S106: and traversing the event callback function in the calling interface.
Step S107: and judging whether the file descriptor to be monitored and/or the address of the returned data corresponding to the event callback function have information change and/or the monitored operating system signal is sent out.
Step S108: and if the file descriptor to be monitored and/or the address of the return data corresponding to the event callback function have data change and/or the monitored operating system signal is sent, judging that the event callback function completes processing.
Step S109: and if the file descriptor to be monitored and/or the address of the returned data corresponding to the event callback function have no data change and/or the monitored operating system signal is not sent, selecting the event callback function from the initial callback function queue.
It should be noted that, according to the requirement of the enterprise service system, an event polling queue composed of a service identifier and a corresponding processing function is predefined, then, according to the service identifier transmitted by the service system, an event callback function is acquired in the service system, and is added into an initial callback function queue, and then, according to the sequence of the initial callback function queue, the service system transmits the event callback function to the wind-controlled data processing device for processing.
It should be understood that when the event callback functions are transferred to the wind control data processing apparatus, the service system may re-acquire a new batch of event callback functions, so that the determination result of the wind control data processing does not need to be waited, thereby avoiding the problems of reduced load capacity and increased response delay caused by blocking waiting.
In addition, it should be noted that, after the wind-controlled data processing device receives an initial callback function queue in a service system, the address of an object, a file descriptor to be monitored, an address of returned data, and a monitored operating system signal corresponding to an event callback function in the initial callback function queue are obtained, and an operating system event signal list is established according to the address of the object, the file descriptor to be monitored, the address of returned data, and the monitored operating system signal.
In addition, it should be understood that, when the wind control processing device performs processing, it needs to traverse the event callback function in the initial callback function queue, then obtain the file descriptor to be monitored corresponding to the event callback function, and search for the interface corresponding to the event callback function according to the file descriptor to be monitored, for example, if the file descriptor is a read data operation, it is a corresponding read interface; if the event call back function is called by an external wind control system, the corresponding call interface is called, and the like, then data information in the external call interface is synchronized into a current memory, so that the delay of searching from an external database every time is reduced, then whether information change exists in the file descriptor to be monitored and/or the address of returned data corresponding to the event call back function within a preset time threshold range and/or whether the monitored operating system signal is sent out is judged according to the operating system event signal list, and if the data change exists in the file descriptor to be monitored and/or the address of returned data corresponding to the event call back function within the preset time threshold range and/or the monitored operating system signal is sent out, the event call back function is judged to be finished; and if the file descriptor to be monitored and/or the address of the returned data corresponding to the event callback function have no data change and/or the monitored operating system signal is not sent, selecting the event callback function from the initial callback function queue.
Further, for ease of understanding, the following is exemplified:
supposing that the initial callback function queue contains 3 event callback functions, the 3 event callback functions are named as a, b and c respectively, and are transferred to the wind-controlled data processing device for processing according to the initial callback function queue, when the a processing is carried out, the 3 event callback functions are processed in the wind-controlled processing device, a calling interface corresponding to the event callback function is found, and the address of the file descriptor to be monitored and/or the return data and/or the monitored operating system signal are/is sent out, the event callback function a processing is finished, when the b processing is carried out, when the wind-controlled processing device carries out the processing, the calling interface corresponding to the event callback function is found for recording, and meanwhile, the address of the file descriptor to be monitored and/or the return data and/or the monitored operating system signal are/is not sent out, and selecting the event callback function b from the initial callback function queue, searching a calling interface corresponding to the event callback function for recording when the event callback function b is processed in a wind control processing device during c processing, and selecting the event callback function c from the initial callback function queue if the file descriptor to be monitored does not exist and/or the address of returned data and/or the monitored operating system signal is not sent out.
In this embodiment, by obtaining an event callback function corresponding to an initial callback function queue, according to the event callback function, obtaining an address of an object, a file descriptor to be monitored, an address of returned data, and an operating system signal to be monitored, which correspond to the event callback function, according to the event callback function, establishing an operating system event signal list according to the address of the object, the file descriptor to be monitored, the address of the returned data, and the operating system signal to be monitored, in the initial callback function queue, obtaining the file descriptor to be monitored, which corresponds to the event callback function, according to the file descriptor to be monitored, searching a corresponding call interface, in which the event callback function is traversed, and determining whether there is information variation and callback data variation in the file descriptor to be monitored and/or the address of the returned data, which correspond to the event callback function, and determining whether there is information variation and callback information variation in the callback function And/or whether the monitored operating system signal is sent, if the file descriptor to be monitored and/or the address of the returned data corresponding to the event callback function has data variation and/or the monitored operating system signal is sent, judging that the event callback function is finished processing, and if the file descriptor to be monitored and/or the address of the returned data corresponding to the event callback function does not have data variation and/or the monitored operating system signal is not sent, selecting the event callback function from the initial callback function queue, thereby improving the load capacity of the service system.
Furthermore, an embodiment of the present invention further provides a storage medium, where a high-throughput wind-control data processing program is stored, and when executed by a processor, the high-throughput wind-control data processing program implements the steps of the high-throughput wind-control data processing method as described above.
Referring to fig. 4, fig. 4 is a block diagram illustrating a first embodiment of a high-throughput wind-controlled data processing apparatus according to the present invention.
As shown in fig. 4, a high-throughput wind-controlled data processing apparatus according to an embodiment of the present invention includes: the receiving module 4001 is configured to receive an initial callback function queue in a service system, and process a corresponding event callback function in the initial callback function queue; the selecting module 4002 is configured to select a callback function of an event to be processed according to the processing result, and take the callback function of the event to be processed as a request callback function; a adding module 4003, configured to add the request callback function to an event polling queue, and traverse an operating system event signal list from the event polling queue; a determining module 4004, configured to determine whether there is data variation in target data information in the operating system event signal list, where the target data information is data information corresponding to the request callback function; a determining module 4005, configured to determine that the request callback function completes processing if there is a data change in the target data information.
The receiving module 4001 receives an initial callback function queue in a service system, and performs processing operation on a corresponding event callback function in the initial callback function queue.
It should be noted that, according to the requirement of the enterprise service system, an event polling queue composed of a service identifier and a corresponding processing function is predefined, then, according to the service identifier transmitted by the service system, an event callback function is acquired in the service system, and is added into an initial callback function queue, and then, according to the sequence of the initial callback function queue, the service system transmits the event callback function to the wind-controlled data processing device for processing.
It should be understood that when the event callback functions are transferred to the wind control data processing apparatus, the service system may re-acquire a new batch of event callback functions, so that the determination result of the wind control data processing does not need to be waited, thereby avoiding the problems of reduced load capacity and increased response delay caused by blocking waiting.
In addition, it should be noted that, after the wind-controlled data processing device receives an initial callback function queue in a service system, the address of an object, a file descriptor to be monitored, an address of returned data, and a monitored operating system signal corresponding to an event callback function in the initial callback function queue are obtained, and an operating system event signal list is established according to the address of the object, the file descriptor to be monitored, the address of returned data, and the monitored operating system signal.
In addition, it should be understood that, when the wind control processing device performs processing, it needs to traverse the event callback function in the initial callback function queue, then obtain the file descriptor to be monitored corresponding to the event callback function, and search the interface corresponding to the event callback function according to the file descriptor to be monitored, for example, if the operation is a read data operation, it is a corresponding read interface; if the event callback function is called by an external wind control system, the corresponding calling interface is called, and the like, then data information in the external calling interface is synchronized into a current memory, so that the delay of searching from an external database every time is reduced, then whether information change exists in the address of a file descriptor to be monitored and/or returned data corresponding to the event callback function within a preset time threshold range and/or whether a monitored operating system signal is sent out is judged according to the operating system event signal list, and if the data change exists in the address of the file descriptor to be monitored and/or returned data corresponding to the event callback function within the preset time threshold range and/or the monitored operating system signal is sent out, the event function is judged to be finished; and if the file descriptor to be monitored and/or the address of the returned data corresponding to the event callback function have/has no data change and/or the monitored operating system signal is not sent, selecting the event callback function from the initial callback function queue.
Further, for ease of understanding, the following is illustrated:
supposing that the initial callback function queue contains 3 event callback functions, the 3 event callback functions are named as a, b and c respectively, and are transferred to the wind-controlled data processing device for processing according to the initial callback function queue, when the a processing is carried out, the 3 event callback functions are processed in the wind-controlled processing device, a calling interface corresponding to the event callback function is found, and the address of the file descriptor to be monitored and/or the return data and/or the monitored operating system signal are/is sent out, the event callback function a processing is finished, when the b processing is carried out, when the wind-controlled processing device carries out the processing, the calling interface corresponding to the event callback function is found for recording, and meanwhile, the address of the file descriptor to be monitored and/or the return data and/or the monitored operating system signal are/is not sent out, and selecting the event callback function b from the initial callback function queue, searching a calling interface corresponding to the event callback function for recording when the event callback function b is processed in a wind control processing device during c processing, and selecting the event callback function c from the initial callback function queue if the file descriptor to be monitored does not exist and/or the address of returned data and/or the monitored operating system signal is not sent out.
The selecting module 4002 selects a callback function of the event to be processed according to the processing result, and takes the callback function of the event to be processed as an operation of requesting the callback function.
It should be noted that the to-be-processed event callback function is selected according to the processing result, the selected event callback function is used as a request callback function, and meanwhile, an outsource parameter transmitted by the service system is transmitted as an actual parameter of the request callback function.
Further, the following is exemplified for ease of understanding:
according to the above example, the event callback functions b and c are selected from the initial callback function queue, and the event callback functions b and c are used as request callback functions.
The adding module 4003 adds the request callback function to an event polling queue, and traverses the operation of an operating system event signal list from the event polling queue.
It should be noted that, the request callback functions are sequenced according to the initial callback function queue, and according to the sequencing result, the request callback functions are sequentially added into the event polling queue, and register a specific operating system signal for the request callback functions, and add into the system time signal list, and in the event polling queue, the operating system event signal list is checked according to the sequencing result, where the operating system event signal list includes the address of the object corresponding to the event callback function, the file descriptor to be monitored, the address of the return data, and the operating system signal to be monitored.
Further, it is to be understood that the following is illustrative for ease of understanding:
according to the above example, if the order of the request callback functions b and c in the initial callback function queue is b and c, the request callback functions b and c are sequentially added into the event polling queue according to the order, and then the order corresponding to the request callback functions b and c is checked according to the order of b and c to circularly check the operating system event signal list.
The determining module 4004 determines whether there is data variation in target data information in the operating system event signal list, where the target data information is an operation of data information corresponding to the request callback function.
It should be noted that, according to the operating system event signal list, the address of the object corresponding to the request callback function, the file descriptor to be monitored, the address of the returned data, and the operating system signal to be monitored are obtained, a corresponding call interface is searched according to the file descriptor to be monitored, according to the event polling queue, the request callback function is traversed in the call interface, and it is determined whether there is information change in the address of the file descriptor to be monitored and the returned data corresponding to the request callback function and/or whether the operating system signal to be monitored is sent out, and the address of the file descriptor to be monitored and the address of the returned data and the operating system signal to be monitored are used as data information.
In addition, it should be understood that the wind control processing device processes the request callback functions in the event polling queue one by one according to a first-in first-out principle, after finding the corresponding call interface, determines the request callback functions, checks whether the address of the returned data corresponding to the request callback functions and the file descriptor to be monitored in the operating system event signal list have data return or complete data processing and/or the monitored operating system signal is sent within a preset time threshold range, and returns the returned wind control determination result to the service system if the data return or complete data processing and/or the monitored operating system signal is sent.
In addition, when data processing is performed, it is not necessary to wait for the determination result in the wind control processing device and directly execute the processing of the next request callback function.
The determining module 4005 determines that the request callback function completes the processing operation if the target data information has data variation.
It should be noted that, the operating system event signal list is circularly traversed, if data information corresponding to the request callback function has data change and/or the monitored operating system signal is sent, it is determined that the request callback function completes processing, and if the file descriptor to be monitored and/or the address of the return data corresponding to the request callback function does not have data change and/or the monitored operating system signal is not sent, the request callback function is selected from the event polling queue.
It should be understood that the above is only an example, and the technical solution of the present invention is not limited in any way, and in a specific application, a person skilled in the art may set the technical solution as needed, and the present invention is not limited thereto.
In this embodiment, an initial callback function queue in a service system is received, a corresponding event callback function in the initial callback function queue is processed, an event callback function to be processed is selected according to the processing result, the event callback function to be processed is used as a request callback function, an address of an object corresponding to the request callback function, a file descriptor to be monitored, an address of returned data and a monitored operating system signal are obtained according to the operating system event signal list, a corresponding calling interface is searched according to the file descriptor to be monitored, the request callback function is traversed in the calling interface according to the event polling queue, and then whether information change exists in the file descriptor to be monitored and the address of returned data corresponding to the request callback function and/or whether the monitored operating system signal is sent out are determined, if the file descriptor to be monitored and/or the address of the returned data corresponding to the event callback function do not have data change and/or the monitored operating system signal is not sent, selecting the event callback function from the initial callback function queue, adding the selected event callback function into the event polling queue, taking the selected event callback function as a request callback function, judging whether the data information corresponding to the request callback function has data change in the event polling queue, and if the data information corresponding to the request callback function has data change, judging that the request callback function completes processing, so that the load capacity and the response speed of a service system are improved, and the user experience is greatly improved.
It should be noted that the above-described work flows are only exemplary, and do not limit the scope of the present invention, and in practical applications, a person skilled in the art may select some or all of them to achieve the purpose of the solution of the embodiment according to actual needs, and the present invention is not limited herein.
In addition, details of the technique that are not elaborated in this embodiment may refer to a high-throughput wind-controlled data processing method provided in any embodiment of the present invention, and are not described herein again.
Further, it is to be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention or a part contributing to the prior art may be embodied in the form of a software product, where the computer software product is stored in a storage medium (e.g. Read Only Memory (ROM)/RAM, magnetic disk, optical disk), and includes several instructions for enabling a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention, and all equivalent structures or equivalent processes performed by the present invention or directly or indirectly applied to other related technical fields are also included in the scope of the present invention.

Claims (9)

1. A high-throughput method for processing wind-controlled data, the method comprising:
receiving an initial callback function queue in a service system, and processing a corresponding event callback function in the initial callback function queue;
selecting a callback function of the event to be processed according to the processing result, and taking the callback function of the event to be processed as a request callback function;
adding the request callback function into an event polling queue, and traversing an operating system event signal list from the event polling queue;
judging whether data change exists in target data information in the operating system event signal list, wherein the target data information is data information corresponding to the request callback function;
if the target data information has data variation, judging that the request callback function completes processing;
after the step of receiving the initial callback function queue in the service system, the method further includes:
acquiring a corresponding event callback function in the initial callback function queue;
acquiring an address of an object corresponding to the event callback function, a file descriptor to be monitored, an address of returned data and a monitored operating system signal according to the event callback function;
establishing an operating system event signal table according to the address of the object, the descriptor of the file to be monitored, the address of the returned data and the monitored operating system signal;
wherein the data information comprises: the file descriptor to be intercepted and/or the address of the return data and/or the intercepted operating system signal.
2. The method of claim 1, wherein said step of processing the corresponding event callback function in the initial callback function queue comprises:
traversing the event callback function in the initial callback function queue;
judging whether information change exists in the file descriptor to be monitored and/or the address of the returned data corresponding to the event callback function and/or whether a monitored operating system signal is sent out;
if the file descriptor to be monitored and/or the address of the returned data corresponding to the event callback function have data change and/or the monitored operating system signal is sent, determining that the event callback function completes processing;
and if the file descriptor to be monitored and/or the address of the returned data corresponding to the event callback function have no data change and/or the monitored operating system signal is not sent, selecting the event callback function from the initial callback function queue.
3. The method of claim 2, wherein said step of traversing said event callback function comprises:
acquiring a file descriptor to be monitored corresponding to the event callback function according to the operating system signal list;
searching a corresponding calling interface according to the file descriptor to be monitored;
and traversing the event callback function in the calling interface.
4. The method of claim 1, wherein the step of determining whether there is a data change in the target data information in the os event signal list, wherein the target data information is the data information corresponding to the request callback function comprises:
acquiring the address of an object corresponding to the request callback function, a file descriptor to be monitored, the address of returned data and a monitored operating system signal according to the operating system event signal list;
searching a corresponding calling interface according to the file descriptor to be monitored;
traversing the request callback function in the calling interface according to the event polling queue;
and judging whether the file descriptor to be monitored and/or the address of the returned data corresponding to the request callback function have information change and/or the monitored operating system signal is sent out.
5. The method as claimed in claim 4, wherein after the step of determining whether there is information change in the address of the file descriptor and/or the return data to be snooped corresponding to the request callback function and/or whether the snooped os signal is issued, the method further comprises:
if the file descriptor to be monitored and/or the address of the returned data corresponding to the request callback function have no data change and/or the monitored operating system signal is not sent, selecting the request callback function from the event polling queue;
and adding the selected request callback function into the event polling queue again until the file descriptor to be monitored and/or the address of the returned data corresponding to the request callback function have data change and/or the monitored operating system signal is sent out.
6. The method of claim 1, wherein said step of adding said request callback function to an event poll queue comprises:
sequencing the request callback functions according to the initial callback function queue;
and sequentially adding the request callback functions into an event polling queue according to a sequencing result.
7. A high throughput, wind-controlled data processing apparatus, the apparatus comprising:
the receiving module is used for receiving an initial callback function queue in a service system and processing a corresponding event callback function in the initial callback function queue;
the selecting module is used for selecting a callback function of the event to be processed according to the processing result and taking the callback function of the event to be processed as a request callback function;
the adding module is used for adding the request callback function into an event polling queue and traversing an operating system event signal list from the event polling queue;
the judging module is used for judging whether data change exists in target data information in the operating system event signal list, wherein the target data information is data information corresponding to the request callback function;
the judging module is used for judging that the request callback function finishes processing if the target data information has data change;
the adding module is further configured to obtain a corresponding event callback function in the initial callback function queue; according to the event callback function, acquiring an address of an object corresponding to the event callback function, a file descriptor to be monitored, an address of returned data and a monitored operating system signal; establishing an operating system event signal table according to the address of the object, the descriptor of the file to be monitored, the address of the returned data and the monitored operating system signal; wherein the data information comprises: the file descriptor to be snooped and/or the address of the return data and/or the snooped operating system signal.
8. An electronic device, characterized in that the device comprises: a memory, a processor and a high-throughput wind-controlled data processing program stored on the memory and executable on the processor, the high-throughput wind-controlled data processing program being configured to implement the steps of the high-throughput wind-controlled data processing method according to any of claims 1 to 6.
9. A storage medium, characterized in that the storage medium has stored thereon a high-throughput wind-controlled data processing program, which when executed by a processor implements the steps of the high-throughput wind-controlled data processing method according to any one of claims 1 to 6.
CN201911084478.6A 2019-11-07 2019-11-07 High-throughput wind control data processing method, device, equipment and storage medium Active CN110852603B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911084478.6A CN110852603B (en) 2019-11-07 2019-11-07 High-throughput wind control data processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911084478.6A CN110852603B (en) 2019-11-07 2019-11-07 High-throughput wind control data processing method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110852603A CN110852603A (en) 2020-02-28
CN110852603B true CN110852603B (en) 2022-07-15

Family

ID=69599062

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911084478.6A Active CN110852603B (en) 2019-11-07 2019-11-07 High-throughput wind control data processing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110852603B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112749024A (en) * 2020-12-28 2021-05-04 深兰人工智能(深圳)有限公司 Data distribution method and device for multiple sensors
CN117311912B (en) * 2023-11-30 2024-02-02 成都融见软件科技有限公司 Data interaction method based on interaction debugging, storage medium and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104932932A (en) * 2014-03-20 2015-09-23 腾讯科技(深圳)有限公司 Asynchronous business processing method, device and system
CN106293969A (en) * 2016-08-09 2017-01-04 上海盈方微电子有限公司 Linux Inter-Process Communication method and device, process exit monitor method
CN108449405A (en) * 2018-03-13 2018-08-24 平安科技(深圳)有限公司 Event-prompting method, device, computer equipment and storage medium
CN108665174A (en) * 2018-05-16 2018-10-16 中国平安人寿保险股份有限公司 Method for prewarning risk, device, computer equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8006005B2 (en) * 2007-09-21 2011-08-23 Mitel Networks Corporation Centralized polling service

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104932932A (en) * 2014-03-20 2015-09-23 腾讯科技(深圳)有限公司 Asynchronous business processing method, device and system
CN106293969A (en) * 2016-08-09 2017-01-04 上海盈方微电子有限公司 Linux Inter-Process Communication method and device, process exit monitor method
CN108449405A (en) * 2018-03-13 2018-08-24 平安科技(深圳)有限公司 Event-prompting method, device, computer equipment and storage medium
CN108665174A (en) * 2018-05-16 2018-10-16 中国平安人寿保险股份有限公司 Method for prewarning risk, device, computer equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于事件驱动模型的计算机博弈系统战斗平台设计;范毅;《山西科技》;20160320(第02期);第132-137页 *

Also Published As

Publication number Publication date
CN110852603A (en) 2020-02-28

Similar Documents

Publication Publication Date Title
CN109564566B (en) Discovery of calling applications for controlling file hydration behavior
CN110852603B (en) High-throughput wind control data processing method, device, equipment and storage medium
CN109451020B (en) Timeout management method, timeout management device, and computer-readable storage medium
CN107807841B (en) Server simulation method, device, equipment and readable storage medium
CN114553762A (en) Method and device for processing flow table items in flow table
CN111159131A (en) Performance optimization method, device, equipment and computer readable storage medium
CN111221742B (en) Test case updating method and device, storage medium and server
CN111736761A (en) Data distribution method, device, storage system and computer readable storage medium
CN109951549B (en) Network page access method and device and computer readable storage medium
CN110704498A (en) Data extraction method, device, equipment and computer readable storage medium
CN111061637A (en) Interface test method, interface test device and storage medium
CN110933070A (en) User identification method, system, equipment and computer readable storage medium
CN113535439B (en) Service request processing method, device, equipment and storage medium
CN110515718B (en) Batch task breakpoint continuous method, device, equipment and medium
CN111078571B (en) Test method for analog response, terminal equipment and computer readable storage medium
CN113542073A (en) Product testing method, system, program product and storage medium based on P2P
CN112950370A (en) Service processing method, device, equipment and storage medium
CN112988160B (en) Server compiling method, device, equipment and computer readable storage medium
CN111008066A (en) Server-side interface analysis system, method, interface analysis device and medium
CN114090269B (en) Service scheduling balancing method, device, equipment and storage medium
CN117640363B (en) Micro-service configuration and management and control method and system
CN112559920B (en) Hook method, device and equipment based on jump instruction and storage medium
US10313438B1 (en) Partitioned key-value store with one-sided communications for secondary global key lookup by range-knowledgeable clients
CN111984341B (en) Project monitoring method and device, electronic equipment and storage medium
CN112416547A (en) Calling method and device of application program, terminal equipment and readable storage 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
GR01 Patent grant
GR01 Patent grant