Code submission event processing method and device, equipment, medium and program product

By receiving and storing code submission events concurrently in high concurrency scenarios, and using a distributed architecture to process code submission events and code processing tasks, the problem of omission and inability to dynamically scale up the code submission events in the existing technology is solved, and the timely processing of code submission events and the stability and availability of the system are achieved.

CN119862012APending Publication Date: 2025-04-22INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411933217.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-04-22

AI Technical Summary

Technical Problem

In the large-scale code submission scenario, existing open source automation tools may not be able to listen to all commit codes when they are concurrency, resulting in failure of code inspection pipeline execution.

Method used

Concurrently receive code submission events through each event processing node in the first cluster, and write the listened events to the database. At the same time, a distributed architecture is adopted, the first cluster handles code submission events, and the second cluster executes code processing tasks to avoid single point of failure.

Benefits of technology

It effectively avoids the problem that some events are not recorded due to large concurrency, ensures that the code submission event is captured and stored in a timely manner, provides a complete data basis for subsequent processing, and avoids the impact of a single point of failure on the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119862012A_ABST
    Figure CN119862012A_ABST
Patent Text Reader

Abstract

The invention discloses a code submission event processing method, device and equipment, a medium and a program product, which are applied to the field of financial science and technology, and the method comprises the following steps: receiving each code submission event through each event processing node in a first cluster, and writing the monitored code submission event into a database; executing the code processing task through each task processing node in the second cluster; deleting the target code submission event after task processing from the database, and updating the processing state of the target code submission event; and additionally writing the abnormal code submission event into the database of the first cluster through the monitoring node in the first cluster when detecting that the abnormal code submission event which is not monitored exists. According to the embodiment of the invention, a distributed architecture that the first cluster processes the code submission event and the second cluster executes the code processing task is adopted, so that the code submission event can be ensured to be stored without omission even under the condition of high concurrency, and the stability and availability of the system are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of distributed technology, applicable to the field of financial technology, and in particular to a method, device, equipment, medium and program product for processing a code submission event. Background Art

[0002] In the field of software development, code quality is of vital importance. In order to ensure that the code written by developers meets certain quality standards, a series of inspections and verifications are usually required after the code development is completed and submitted to the code repository.

[0003] However, in actual development scenarios, especially when the number of concurrent code submissions is high, the open source plug-ins of existing open source automation tools may not be able to monitor all submitted codes during high concurrency, which directly affects the execution of subsequent code inspection pipelines. Because subsequent code inspections and other operations rely on accurate acquisition of code submission events, if some events are not monitored, the corresponding code cannot enter the normal inspection process, which in turn causes the developer's code to be unable to be stored normally. Summary of the invention

[0004] Based on this, the present invention provides a method, apparatus, device, medium and program product for processing code submission events to solve the problems of omissions in code submission event processing and inability to dynamically scale capacity in existing large-scale code submission scenarios.

[0005] In a first aspect, an embodiment of the present invention provides a method for processing a code submission event, the method comprising:

[0006] Concurrently receiving each code submission event through each event processing node in the first cluster, and writing the code submission event monitored through the remote login interface into the database of the first cluster;

[0007] Execute the code processing tasks matching the code submission events recorded in the database through each task processing node in the second cluster; delete the target code submission events that have completed the task processing from the database, and update the processing status of the target code submission events in the first cluster;

[0008] When detecting that there is an abnormal code submission event that has not been monitored in the first cluster through the monitoring node in the first cluster, the abnormal code submission event is additionally written into the database of the first cluster.

[0009] In a second aspect, an embodiment of the present invention provides a device for processing a code submission event, the device comprising:

[0010] A code submission event receiving module, used to concurrently receive each code submission event through each event processing node in the first cluster, and write the code submission event monitored through the remote login interface into the database of the first cluster;

[0011] The code processing task matching module is used to execute the code processing tasks matched with the code submission events recorded in the database through the task processing nodes in the second cluster; delete the target code submission events that have completed the task processing from the database, and update the processing status of the target code submission events in the first cluster;

[0012] The abnormal code submission event detection module is used to append the abnormal code submission event to the database of the first cluster through the monitoring node in the first cluster when detecting that there is an abnormal code submission event that has not been monitored in the first cluster.

[0013] In a third aspect, an embodiment of the present invention provides an electronic device, the electronic device comprising:

[0014] at least one processor; and

[0015] a memory communicatively connected to the at least one processor; wherein,

[0016] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute a method for processing a code submission event described in any embodiment of the present invention.

[0017] In a fourth aspect, a computer-readable storage medium is further provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement a method for processing a code submission event as described in any embodiment of the present invention when executed.

[0018] In a fifth aspect, a computer program product is also provided, the computer program product comprising a computer program, and when the computer program is executed by a processor, the method for processing a code submission event described in any embodiment of the present invention is implemented.

[0019] The technical solution of the embodiment of the present invention, through the event processing nodes in the first cluster concurrently receiving code submission events and writing the monitored events into the database, effectively avoids the problem that some events are not recorded due to a large concurrency. Even in the case of high concurrency, multiple nodes working simultaneously can ensure that the code submission events are captured and stored in a timely manner, providing a complete data basis for subsequent processing. The distributed architecture in which the first cluster processes code submission events and the second cluster executes code processing tasks avoids the impact of single point failures on the entire system. Even if a node fails, other nodes can continue to work, ensuring the overall stability and availability of the system.

[0020] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0022] Figure 1 is a flowchart of a method for processing a code submission event provided according to Embodiment 1 of the present invention;

[0023] Figure 2 is a flowchart of another method for processing a code submission event provided according to Embodiment 2 of the present invention;

[0024] Figure 3 is a structural diagram of a device for processing a code submission event provided according to Embodiment 3 of the present invention;

[0025] Figure 4 It is a structural diagram of an electronic device according to a method for processing a code submission event provided in a fourth embodiment of the present invention. DETAILED DESCRIPTION

[0026] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0028] Embodiment 1

[0029] Figure 1 This is a flowchart of a method for processing a code submission event provided in the first embodiment of the present invention. This embodiment is applicable to monitoring code submission events. The method can be executed by a device for processing code submission events. The device can be implemented in the form of hardware and / or software. The device can be configured in an enterprise-level code management platform. Figure 1 As shown, the method includes:

[0030] S110 . Concurrently receive each code submission event through each event processing node in the first cluster, and write the code submission event monitored through the remote login interface into the database of the first cluster.

[0031] In an embodiment of the present invention, various types of transaction processing nodes are distributed in the first cluster, and the transaction processing nodes refer to the independent units or components in the first cluster that are responsible for processing specific events, wherein multiple event processing nodes can simultaneously receive and process code submission events. The code submission event refers to the code submission event received by the event processing node from the developer, version control system or other sources, which may contain detailed information about the code change, such as the changed file, the submitted author, and the submission event, etc. Each transaction processing node can obtain a distributed transaction lock for a unique code submission event through an open source data structure server. When a code submission event occurs, only the transaction processing node that obtains the lock can process the target event, thereby avoiding processing conflicts caused by repeated processing of the same event by multiple event processing nodes.

[0032] The remote login interface is a mechanism for remotely accessing and monitoring code submission events. Through this interface, the event processing node can remotely connect to the code repository or version control system to monitor its code submission events.

[0033] S120, executing code processing tasks matching each code submission event recorded in the database through each task processing node in the second cluster; deleting the target code submission event that has completed task processing from the database, and updating the processing status of the target code submission event in the first cluster.

[0034] In the embodiment of the present invention, various types of task processing nodes are distributed in the second cluster, and the task processing nodes refer to the independent units or components in the second cluster that are responsible for processing specific events, and are used to process tasks related to code submission events. Specifically, the task processing node will query or receive code submission event records from the first cluster database, and for each recorded code submission event, the task processing node will execute the corresponding code processing task.

[0035] Once the processing task of a code submission event is completed, the corresponding task processing node will delete it from the database of the first cluster, indicating that the code submission event has been correctly processed and no longer needs to be stored in the database. Updating the processing status of the target code submission event in the first cluster helps to understand the current status of the code submission event and is biased towards further subsequent decisions.

[0036] S130: When detecting, through a monitoring node in the first cluster, that an abnormal code submission event exists in the first cluster and is not monitored, appending the abnormal code submission event to a database of the first cluster.

[0037] In addition, there is a special type of node in the first cluster, namely the monitoring node, which is used to continuously monitor various activities and states within the first cluster, especially the processing of code submission events. Specifically, the monitoring node can detect whether there are "unmonitored abnormal code submission events" in the first cluster through real-time inspection or regular scanning. Once the monitoring node detects such an abnormal code submission event, it will append it to the first cluster database to ensure that such events are recorded.

[0038] In the embodiment of the present invention, each event processing node in the first cluster concurrently receives code submission events and writes the monitored events into the database, which effectively avoids the problem that some events are not recorded due to a large concurrency. Even in the case of high concurrency, multiple nodes working at the same time can ensure that code submission events are captured and stored in a timely manner, providing a complete data basis for subsequent processing; the distributed architecture in which the first cluster processes code submission events and the second cluster executes code processing tasks avoids the impact of single point failures on the entire system. Even if a node fails, other nodes can continue to work, ensuring the overall stability and availability of the system and the continuous operation of the code submission event processing process.

[0039] Optionally, the method may further include:

[0040] Detecting the quantity of each historical code submission event recorded in each historical time interval by the scaling node in the second cluster;

[0041] By scaling up and down the nodes, based on the detected quantity values, the pre-built event prediction model is called to predict the quantity trend of code submission events in the future event interval;

[0042] By scaling the nodes, the number of nodes included in the second cluster is scaled up or down according to the number trend prediction value.

[0043] In an embodiment of the present invention, the second cluster also includes a scaling node, which is responsible for monitoring the database of the first cluster and collecting data on the number of historical code submission events, that is, the scaling node detects the number of historical code submission events recorded in the data of the first cluster at each historical time interval. The historical time interval refers to the time range corresponding to the code submission events that have occurred in the past and recorded in the database, which is used to analyze and predict the number trend of future code submission events; the future event interval refers to the time range corresponding to the code submission events that have not yet occurred but are predicted to occur based on historical data. By analyzing the data of the historical time interval, the number trend of code submission events in the future time interval can be predicted, thereby providing a basis for the dynamic expansion and contraction of cluster nodes.

[0044] The pre-built event prediction model can predict the quantity trend forecast value of code submission events in a future time interval based on historical data. The event prediction model can be a pre-trained model based on machine learning or statistics, which can capture the seasonality, periodicity or other patterns of code submission events. According to the quantity trend forecast value, the scaling node will dynamically scale the number of nodes included in the second cluster. Specifically, if it is predicted that the number of code submission events will increase in the future, the scaling node will increase the number of nodes in the second cluster accordingly to ensure that there are sufficient resources to handle these events. On the contrary, if it is predicted that the number of code submission events will decrease, the scaling node may reduce the number of nodes to optimize resource usage.

[0045] The processing efficiency of code submission events is optimized through an intelligent scaling mechanism, which not only ensures sufficient processing capacity during event peaks to avoid task accumulation and delays, but also reasonably releases resources during event troughs, improving the resource utilization and energy efficiency of the overall system, helping to maintain system stability and response speed, and optimizing the processing flow of code submission events.

[0046] Further, scaling the number of nodes included in the second cluster according to the number trend prediction value by scaling the nodes may include:

[0047] By scaling up and down nodes, the minimum number of nodes required to complete the code submission event of the quantity trend prediction value is obtained according to the quantity trend prediction value and the maximum number of tasks executed on a single node;

[0048] By scaling the nodes, if it is determined that the minimum number of nodes is greater than the number of nodes currently included in the second cluster, the number of nodes in the second cluster is expanded to the minimum number of nodes.

[0049] The maximum number of tasks executed by a single node reflects the processing capacity of each node in the cluster. That is, if the quantity trend prediction value is regarded as the total task volume, the maximum number of tasks executed by a single node is the maximum work efficiency. The minimum number of nodes can be obtained by calculating the ratio; and when the existing nodes in the second cluster are less than the minimum number of nodes, the number of nodes will be expanded.

[0050] By dynamically adjusting the cluster size, the embodiment of the present invention can effectively cope with the processing requirements of large-scale code submission events. When the number of code submission events increases, the cluster can quickly expand to meet the task requirements; when the number of code submission events decreases, the cluster can be reduced accordingly to save resources. This dynamic adjustment method improves the flexibility and adaptability of the cluster.

[0051] Optionally, after obtaining the minimum number of nodes required to complete the code submission event of the quantity trend prediction value according to the quantity trend prediction value and the maximum number of tasks executed on a single node by scaling the nodes, the following may also be included:

[0052] By scaling the nodes, when it is determined that the incremental number of nodes obtained by subtracting the minimum number of nodes from the current number of nodes in the second cluster is greater than the incremental threshold, the event prediction model is called again to predict multiple subsequent quantity trend prediction values ​​of code submission events within multiple subsequent future event intervals;

[0053] By scaling the nodes, when it is determined that the scaling-in condition is met according to a plurality of subsequent quantity trend prediction values, the number of scaled-in nodes is calculated, and the scaled-in nodes in the second cluster are scaled-in.

[0054] In an embodiment of the present invention, the incremental number of nodes refers to the difference between the number of nodes currently contained in the second cluster and the minimum number of nodes calculated according to the prediction, and the incremental threshold is a preset threshold used to determine whether capacity expansion planning is needed. Specifically, when the incremental number of nodes is greater than the incremental threshold, it means that the capacity expansion based on the current prediction may not be sufficient to cope with the increase in the number of code submission events in the future, or in order to schedule resources more smoothly and efficiently, the system requires a more detailed capacity expansion plan. In this case, the event prediction model is called again to predict multiple quantity trend prediction values ​​of code submission events in multiple subsequent future time intervals.

[0055] In general, by introducing the concepts of incremental node number and incremental threshold, and calling the event prediction model again for more detailed prediction and planning, the processing of code submission events in the embodiment of the present invention is more flexible and efficient in dynamic expansion and contraction. At the same time, by predicting and planning future resource requirements in advance, it can more smoothly cope with fluctuations in the number of code submission events.

[0056] Embodiment 2

[0057] Figure 2 This is a flowchart of another method for processing a code submission event provided in Embodiment 2 of the present invention. This embodiment is refined based on the above embodiment. Accordingly, Figure 2 As shown, the method specifically includes:

[0058] S210: Monitor the processing status of each code submission event in the first cluster in real time through the monitoring node, and obtain the processing waiting time of each code submission event according to the cluster receiving time of each code submission event.

[0059] The monitoring node continuously monitors the processing progress and status of all code submission events in the first cluster to ensure that all code submission events can be processed promptly and correctly without omissions or incorrect processing. The processing waiting time refers to the time from the time a code submission event is received to the start of processing the event.

[0060] S220 . By means of the monitoring node, whenever a candidate code submission event whose processing waiting time exceeds a preset time threshold is detected, detect whether the candidate code submission event is stored in the database of the first cluster.

[0061] The preset time threshold is used to determine whether the processing waiting time of the code submission event is too long. When the processing waiting time of a candidate code submission event exceeds the threshold, the monitoring node will further check whether the current event has been stored in the database of the first cluster to confirm whether there is an abnormal code submission event that has not been monitored or processed.

[0062] S230: When it is determined through the monitoring node that the candidate code submission event is not stored in the database of the first cluster, the candidate code submission event is determined to be an abnormal code submission event, and the abnormal code submission event is appended to the database of the first cluster.

[0063] When the monitoring node finds that a candidate code submission event exceeds the processing waiting time threshold and no record is found in the database of the first cluster, the candidate code submission event will be marked as an abnormal code event and written to the database of the first cluster to record the event.

[0064] Optionally, when it is determined by the monitoring node that the candidate code submission event is not stored in the database of the first cluster, determining that the candidate code submission event is an abnormal code submission event may include:

[0065] By monitoring the node, when it is determined that the alternative code submission event is not stored in the database of the first cluster, it is detected whether the alternative code submission event is an event in which the task processing node completes database deletion and does not update the processing status; if not, the alternative code submission event is determined to be an abnormal code submission event.

[0066] For ease of understanding, after determining that the candidate code submission event is not stored in the database, the monitoring node will further detect whether this event has been processed by the task processing node and has been deleted from the database, but the processing status has not been updated. The above situation may occur when the task processing node fails to update the processing status in time after processing the code submission event due to some reason (such as network delay, system error, etc.), causing the monitoring node to mistakenly believe that this event is an abnormal event that has not been monitored.

[0067] However, if the above detection determines that the candidate code submission event is neither stored in the database nor an event in which the task processing node has completed database deletion and has not updated the processing status, the monitoring node will determine it as an abnormal code submission event. These abnormal code submission events may be caused by system vulnerabilities, external attacks or other unknown reasons, and need to be appended to the database of the first cluster in a timely manner for further analysis and processing.

[0068] Before determining that the candidate code submission event is an abnormal event, the monitoring node will conduct multiple rounds of detection to ensure that only abnormal events that are not monitored are judged as abnormal, thereby reducing the false alarm rate. At the same time, by adding abnormal code submission events to the database in a timely manner, it is conducive to the timely discovery and processing of abnormal code submission events, improving processing efficiency.

[0069] S240, executing code processing tasks matching each code submission event recorded in the database through each task processing node in the second cluster; deleting the target code submission event that has completed task processing from the database, and updating the processing status of the target code submission event in the first cluster.

[0070] S250: When detecting, through the monitoring node in the first cluster, that there is an abnormal code submission event that has not been monitored in the first cluster, the abnormal code submission event is appended and written into the database of the first cluster.

[0071] The technical solution of the embodiment of the present invention, by refining the overall solution, focuses on the specific description of the determination of abnormal code events. Specifically, through real-time monitoring and calculation of processing waiting time, it can accurately identify abnormal code submission events that have not been monitored, thereby avoiding processing delays or errors caused by missed events; by timely appending abnormal code submission events to the database and updating the processing status, it can ensure that the system's processing flow will not be interrupted by abnormal events, thereby enhancing the stability and reliability of the system; by accurately identifying and processing abnormal events, unnecessary resource consumption and waste are avoided, and the utilization efficiency of system resources is improved.

[0072] Embodiment 3

[0073] Figure 3 This is a schematic diagram of the structure of a device for processing a code submission event provided by Embodiment 3 of the present invention. Figure 3 As shown, the device comprises:

[0074] The code submission event receiving module 310 is used to concurrently receive each code submission event through each event processing node in the first cluster, and write the code submission event monitored through the remote login interface into the database of the first cluster;

[0075] The code processing task matching module 320 is used to execute the code processing tasks matched with the code submission events recorded in the database through each task processing node in the second cluster; delete the target code submission events that have completed the task processing from the database, and update the processing status of the target code submission events in the first cluster;

[0076] The abnormal code submission event detection module 330 is used to append the abnormal code submission event to the database of the first cluster through the monitoring node in the first cluster when detecting that there is an abnormal code submission event that has not been monitored in the first cluster.

[0077] In the embodiment of the present invention, each event processing node in the first cluster concurrently receives code submission events and writes the monitored events into the database, which effectively avoids the problem that some events are not recorded due to a large concurrency. Even in the case of high concurrency, multiple nodes working at the same time can ensure that code submission events are captured and stored in a timely manner, providing a complete data basis for subsequent processing; the distributed architecture in which the first cluster processes code submission events and the second cluster executes code processing tasks avoids the impact of single point failures on the entire system. Even if a node fails, other nodes can continue to work, ensuring the overall stability and availability of the system and the continuous operation of the code submission event processing process.

[0078] Optionally, based on the above embodiments, the code submission event receiving module 310 may further include:

[0079] A processing waiting time acquisition unit, used to monitor the processing status of each code submission event in the first cluster in real time through a monitoring node, and acquire the processing waiting time of each code submission event according to the cluster receiving time of each code submission event;

[0080] A processing waiting time comparison unit is used to detect, through a monitoring node, whether the candidate code submission event is stored in the database of the first cluster whenever a candidate code submission event whose processing waiting time exceeds a preset time threshold is detected;

[0081] The abnormal code submission event determination unit is used to determine the alternative code submission event as an abnormal code submission event through the monitoring node when it is determined that the alternative code submission event is not stored in the database of the first cluster, and append the abnormal code submission event to the database of the first cluster.

[0082] Optionally, based on the above embodiments, the abnormal code submission event determination unit can be used to, through the monitoring node, detect whether the alternative code submission event belongs to an event in which the task processing node completes database deletion and does not update the processing status when it is determined that the alternative code submission event is not stored in the database of the first cluster; if not, the alternative code submission event is determined to be an abnormal code submission event.

[0083] Optionally, based on the above embodiments, the following may also be included:

[0084] A quantity value detection unit, used to detect the quantity value of each historical code submission event recorded in the database of the first cluster in each historical time interval through the scaling node in the second cluster;

[0085] A quantity trend prediction unit is used to call a pre-built event prediction model based on each detected quantity value by scaling nodes to predict the quantity trend prediction value of code submission events within a future event interval;

[0086] The expansion and contraction processing unit is used to expand and contract the number of nodes included in the second cluster according to the number trend prediction value by expanding and contracting the nodes.

[0087] Optionally, based on the above embodiments, the scaling processing unit may be used to obtain the minimum number of nodes required to complete the code submission event of the quantity trend prediction value according to the quantity trend prediction value and the maximum number of tasks executed by a single node by scaling the nodes;

[0088] By scaling the nodes, if it is determined that the minimum number of nodes is greater than the number of nodes currently included in the second cluster, the number of nodes in the second cluster is expanded to the minimum number of nodes.

[0089] Optionally, on the basis of the above embodiments, an event prediction model calling unit may also be included, which is used to, after obtaining the minimum number of nodes required to complete the code submission event of the quantity trend prediction value according to the quantity trend prediction value and the maximum execution number of a single node by scaling the nodes, when it is determined that the incremental number of nodes obtained by subtracting the minimum number of nodes from the number of nodes currently included in the second cluster is greater than the incremental threshold, call the event prediction model again by scaling the nodes to predict multiple subsequent quantity trend prediction values ​​of the code submission event in multiple subsequent future event intervals;

[0090] By scaling the nodes, when it is determined according to a plurality of subsequent quantity trend prediction values ​​that the scaling-down condition is met, the number of scaled-down nodes is calculated, and the nodes of the scaled-down number of nodes in the second cluster are scaled down.

[0091] A device for processing a code submission event provided in an embodiment of the present invention can execute a method for processing a code submission event provided in any embodiment of the present invention, and has functional modules and beneficial effects corresponding to the execution method.

[0092] Embodiment 4

[0093] Figure 4 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0094] like Figure 4 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0095] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0096] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a method for processing a code submission event.

[0097] That is, each event processing node in the first cluster concurrently receives each code submission event, and writes the code submission event monitored through the remote login interface into the database of the first cluster;

[0098] Execute the code processing tasks matching the code submission events recorded in the database through each task processing node in the second cluster; delete the target code submission events that have completed the task processing from the database, and update the processing status of the target code submission events in the first cluster;

[0099] When detecting that there is an abnormal code submission event that has not been monitored in the first cluster through the monitoring node in the first cluster, the abnormal code submission event is additionally written into the database of the first cluster.

[0100] In some embodiments, a method for processing a code submission event may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the method for processing a code submission event described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute a method for processing a code submission event in any other appropriate manner (e.g., by means of firmware).

[0101] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0102] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0103] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0104] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0105] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0106] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0107] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0108] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for processing a code submission event, characterized in that: include: Concurrently receiving each code submission event through each event processing node in the first cluster, and writing the code submission event monitored through the remote login interface into the database of the first cluster; Execute, through each task processing node in the second cluster, a code processing task matching each code submission event recorded in the database; Deleting the target code submission event that has completed task processing from the database, and updating the processing status of the target code submission event in the first cluster; When detecting that there is an abnormal code submission event that has not been monitored in the first cluster through the monitoring node in the first cluster, the abnormal code submission event is additionally written into the database of the first cluster.

2. The method according to claim 1, characterized in that When detecting, by the monitoring node in the first cluster, that an abnormal code submission event exists in the first cluster and is not monitored, appending the abnormal code submission event to a database of the first cluster, including: The processing status of each code submission event in the first cluster is monitored in real time through the monitoring node, and the processing waiting time of each code submission event is obtained according to the cluster receiving time of each code submission event; By means of the monitoring node, whenever a candidate code submission event whose processing waiting time exceeds a preset time threshold is detected, detecting whether the candidate code submission event is stored in a database of the first cluster; When it is determined through the monitoring node that the candidate code submission event is not stored in the database of the first cluster, the candidate code submission event is determined to be an abnormal code submission event, and the abnormal code submission event is appended and written into the database of the first cluster.

3. The method according to claim 2, characterized in that When it is determined by the monitoring node that the candidate code submission event is not stored in the database of the first cluster, determining that the candidate code submission event is an abnormal code submission event includes: By monitoring the node, when it is determined that the alternative code submission event is not stored in the database of the first cluster, it is detected whether the alternative code submission event is an event in which the task processing node completes database deletion and does not update the processing status; if not, the alternative code submission event is determined to be an abnormal code submission event.

4. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: Detecting the quantity of each historical code submission event recorded in each historical time interval by the scaling node in the second cluster; By scaling up and down the nodes, based on the detected quantity values, the pre-built event prediction model is called to predict the quantity trend of code submission events in the future event interval; By scaling the nodes, the number of nodes included in the second cluster is scaled up or down according to the number trend prediction value.

5. The method according to claim 4, characterized in that By scaling the nodes, the number of nodes included in the second cluster is scaled up or down according to the number trend prediction value, including: By scaling up and down nodes, the minimum number of nodes required to complete the code submission event of the quantity trend prediction value is obtained according to the quantity trend prediction value and the maximum number of tasks executed on a single node; By scaling the nodes, if it is determined that the minimum number of nodes is greater than the number of nodes currently included in the second cluster, the number of nodes in the second cluster is expanded to the minimum number of nodes.

6. The method according to claim 4, characterized in that After obtaining the minimum number of nodes required to complete the code submission event for the quantity trend prediction value by scaling the nodes according to the quantity trend prediction value and the maximum number of executions per node, it also includes: By scaling the nodes, when it is determined that the incremental number of nodes obtained by subtracting the minimum number of nodes from the current number of nodes in the second cluster is greater than the incremental threshold, the event prediction model is called again to predict multiple subsequent quantity trend prediction values ​​of code submission events within multiple subsequent future event intervals; By scaling the nodes, when it is determined that the scaling-in condition is met according to a plurality of subsequent quantity trend prediction values, the number of scaled-in nodes is calculated, and the scaled-in nodes in the second cluster are scaled-in.

7. A device for processing a code submission event, characterized in that: include: A code submission event receiving module, used to concurrently receive each code submission event through each event processing node in the first cluster, and write the code submission event monitored through the remote login interface into the database of the first cluster; A code processing task matching module, used to execute, through each task processing node in the second cluster, a code processing task matching each code submission event recorded in the database; Deleting the target code submission event that has completed task processing from the database, and updating the processing status of the target code submission event in the first cluster; The abnormal code submission event detection module is used to append the abnormal code submission event to the database of the first cluster through the monitoring node in the first cluster when detecting that there is an abnormal code submission event that has not been monitored in the first cluster.

8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute a method for processing a code submission event according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement a method for processing a code submission event according to any one of claims 1 to 6 when executed.

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the computer program implements a method for processing a code submission event according to any one of claims 1-6.