Architecture problem repairing method and device and storage medium
By automatically identifying architectural problems and connecting them to preset functional modules, the problem of high cost and poor effectiveness of existing architecture repair methods is solved, achieving low-cost and efficient architecture repair.
Patent Information
- Application Number
- CN202511603235.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-04
- Publication Date
- 2026-02-06
AI Technical Summary
Existing architecture repair methods require significant costs to manually modify code, making it difficult to achieve a complete repair, resulting in poor repair effectiveness and issues related to logic, performance, and security.
Automated tools are used to identify architectural issues, determine the corresponding architectural functions, and select target functional modules from preset functional modules. The target functional modules are then directly accessed to achieve architectural function repair, including circuit breaker degradation, message processing adjustment, automatic SQL protection, and asynchronous message sending.
It significantly reduces repair costs, avoids incomplete repairs caused by manual modifications, improves the effectiveness of architecture repair, and ensures logic, performance, and security.
Smart Images

Figure CN121478313A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of architecture repair, in particular to an architecture problem repair method, device and storage medium. BACKGROUND
[0002] An architecture problem is a problem that affects the logic, performance and security of the entire system in software development and technical design.
[0003] Current architecture repair methods usually require a large amount of cost to manually modify the code of the architecture, and manual architecture problem repair often cannot completely repair various problems existing in the architecture, so that the repaired architecture still has problems in logic, performance and security, resulting in poor architecture repair effect. SUMMARY
[0004] The main purpose of the present application is to provide an architecture problem repair method, device and storage medium, which aims to solve the technical problem of poor architecture repair effect.
[0005] To achieve the above purpose, the present application provides an architecture problem repair method, which comprises: When detecting that the architecture has an architecture problem, determining the architecture function corresponding to the architecture problem; Based on the architecture function, determining a target function module from a preset architecture function module, wherein the target function module includes complete code that can implement the architecture function; The target function module is connected to the architecture to implement the architecture function through the target function module and repair the architecture problem.
[0006] In an embodiment, the architecture function includes cloud service fuse degradation, and the architecture function module includes a fuse degradation module, and after the step of connecting the architecture function module to the architecture, the method further comprises: If the target function module includes the fuse degradation module, when the cloud service fuse degradation needs to be implemented, determining the cloud service type of the cloud service; Based on the cloud service type, determining a target degradation module from a plurality of cloud service degradation schemes of the fuse degradation module; Based on the complete code encapsulated in the target degradation module, a corresponding fuse degradation scheme is implemented.
[0007] In an embodiment, the cloud service type includes a database service, and the database service includes a database service template, and the step of implementing a corresponding fuse degradation scheme based on the complete code encapsulated in the target degradation module comprises: If the cloud service type is the database service, a target operation method of the database service template call and a degradation processor corresponding to the database service template are acquired, wherein the degradation processor includes a corresponding target degradation rule, and the target degradation rule includes a target fuse threshold; The degradation processor, the target operation method, and the database service template are packaged into a new target template object, wherein the target template object has the same API interface as the database service template and implements the same target operation method; The API interface corresponding to the target operation method is monitored and buried to monitor abnormal data of the API interface; When the abnormal data is monitored to exceed the target fuse threshold, cloud service fuse degradation is performed based on the target degradation rule.
[0008] In an embodiment, the cloud service type includes a message queue service, the message queue service includes a message service template, and based on the complete code encapsulated in the target degradation module, the steps of implementing a corresponding fuse degradation scheme include: If the cloud service type is the message queue service, a degradation interceptor is created based on the message service template, wherein the degradation interceptor is used to intercept a message sending method of the message service template; The degradation interceptor is registered as a manageable instance object, and the priority of the degradation interceptor is set to the highest, wherein the priority is an execution order priority of the degradation interceptor when running; Based on the degradation interceptor, the message sending method of the message service template is intercepted, and the API interface corresponding to the intercepted message sending method is monitored and buried to monitor abnormal data of the API interface; It is judged whether the message service template exists a corresponding degradation processor, if exists, the degradation processor corresponding to the message service template is acquired, wherein the degradation processor includes a corresponding target degradation rule, and the target degradation rule includes a target fuse threshold; When the abnormal data is monitored to exceed the target fuse threshold, cloud service fuse degradation is performed based on the target degradation rule.
[0009] In an embodiment, the architecture function includes message processing adjustment, the message processing adjustment includes adjustment of an execution queue of message processing, the architecture function module includes a processing adjustment module, and after the step of connecting the architecture function module into the architecture, the steps further include: If the target function module includes the processing adjustment module, when it is needed to implement the message processing adjustment, a called message processing method and a preset processing adjustment rule are acquired, wherein the processing adjustment rule includes a processing adjustment threshold value; An API interface corresponding to the message processing method is monitored and buried to monitor processing traffic of the API interface; When it is detected that the processing traffic is greater than the processing adjustment threshold value, the execution queue is adjusted based on the processing adjustment rule.
[0010] In an embodiment, the architecture function includes SQL automatic protection, the architecture function module includes a SQL protection module, and after the step of connecting the architecture function module into the architecture, the method further includes: If the target function module includes the SQL protection module, when it is needed to implement SQL automatic protection, a SQL statement to be executed is intercepted based on a preset statement interceptor; It is judged whether the SQL protection module enables a SQL mode, if yes, the SQL statement is acquired and preset standardized processing is performed on the SQL statement to obtain a standard SQL statement; The standard SQL statement is subjected to a fuse flow control check, wherein the fuse flow control check includes checking processing traffic and processing time of the SQL statement; When a processing traffic proportion of a slow SQL is greater than a preset traffic proportion threshold value, execution of the SQL statement is degraded based on a preset custom degradation rule, wherein the slow SQL is the SQL statement whose processing time exceeds a preset processing time threshold value.
[0011] In an embodiment, the architecture function includes asynchronous message sending, the architecture function module includes an asynchronous sending module, and after the step of connecting the architecture function module into the architecture, the method further includes: If the target function module includes the asynchronous sending module, when a message writing operation is performed, a target cache position of message writing is determined in a preset ring-shaped lock-free queue through bit operation; If the target cache position has a written value, the asynchronous message sending is performed based on the target cache position and a preset lock-free concurrent operation.
[0012] In an embodiment, the message writing operation has a preset spin number of times, and the step of performing the asynchronous message sending based on the target cache position and the preset lock-free concurrent operation includes: The current spin number of times of the message writing operation is acquired; If the current spin number is not zero, a target cache location after a preset step number of the target cache location is taken as a target cache location, and it is determined whether the current target cache location has a written value; If yes, the spin number is reduced, and the step of obtaining the current spin number of the message write operation is returned until the target cache location has no written value, a message is written to the target cache location, or the spin number is zero, and a write failure identifier is returned.
[0013] In addition, to achieve the above-mentioned purpose, the present application also proposes an architecture problem repairing device, which comprises a memory, a processor, and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the architecture problem repairing method as described above.
[0014] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and the storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the architecture problem repairing method as described above.
[0015] The one or more technical solutions proposed in the present application have at least the following technical effects: When detecting that an architecture has an architecture problem, the present application determines an architecture function corresponding to the architecture problem, determines a target function module from preset architecture function modules based on the architecture function, and connects the target function module to the architecture to implement the architecture function through the target function module and repair the architecture problem.
[0016] The present method needs to manually modify the code of the architecture at a large cost, and it is difficult to completely repair various problems existing in the architecture, resulting in poor effect of the current architecture repair. When detecting an architecture problem, the present application determines an architecture function corresponding to the architecture problem to determine a target function module from preset architecture function modules. Since the target function module includes complete code that can implement the architecture function, the corresponding architecture function can be directly implemented through the target function module without manually modifying the code of the architecture at a large cost, and the complete code encapsulated can no longer have problems in logic, performance, and security when the architecture implements the corresponding function, thereby improving the effect of architecture repair. BRIEF DESCRIPTION OF DRAWINGS
[0017] The accompanying drawings, which are incorporated into and form part of the specification, illustrate embodiments consistent with the present application and, together with the specification, serve to explain the principles of the present application.
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the accompanying drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced. Obviously, for those skilled in the field, the other drawings can be obtained based on these drawings without any creative work.
[0019] Figure 1 The flowchart provided by the architecture problem repair method embodiment one of the present application; Figure 2 The first scene diagram provided by the architecture problem repair method embodiment one of the present application; Figure 3 The second scene diagram provided by the architecture problem repair method embodiment one of the present application; Figure 4 The third scene diagram provided by the architecture problem repair method embodiment one of the present application; Figure 5 The fourth scene diagram provided by the architecture problem repair method embodiment one of the present application; Figure 6 The fifth scene diagram provided by the architecture problem repair method embodiment one of the present application; Figure 7 The sixth scene diagram provided by the architecture problem repair method embodiment one of the present application; Figure 8 The seventh scene diagram provided by the architecture problem repair method embodiment one of the present application; Figure 9 The eighth scene diagram provided by the architecture problem repair method embodiment one of the present application; Figure 10 The ninth scene diagram provided by the architecture problem repair method embodiment one of the present application; Figure 11 The flowchart provided by the architecture problem repair method embodiment two of the present application; Figure 12 The first scene diagram provided by the architecture problem repair method embodiment two of the present application; Figure 13 The second scene diagram provided by the architecture problem repair method embodiment two of the present application; Figure 14 The third scene diagram provided by the architecture problem repair method embodiment two of the present application; Figure 15 The fourth scene diagram provided by the architecture problem repair method embodiment two of the present application; Figure 16 The fifth scene diagram provided by the architecture problem repair method embodiment two of the present application; Figure 17This is a schematic diagram of the sixth scenario provided in Embodiment 2 of the method for fixing architectural problems in this application; Figure 18 This is a schematic diagram of the device structure of the hardware operating environment involved in the architecture problem repair method in the embodiments of this application; Figure 19 This is a schematic diagram illustrating the data acquisition consent process involved in the architecture problem repair method in this application embodiment.
[0020] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0021] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0022] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0023] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device or architecture problem repair device capable of performing the above functions. The following description uses an architecture problem repair device as an example to illustrate this embodiment and the subsequent embodiments.
[0024] Architectural issues are problems that affect the logic, performance, and security of the entire system in software development and technical design.
[0025] Currently, fixing some architectural red-line issues is quite costly, involving significant code modifications, unreasonable design, performance problems, logical coupling, and incomplete fixes, which may lead to recurrence of the problem. These issues mainly include: The system suffers from incomplete degradation and recovery mechanisms for cloud services, databases, and remote service calls; the lack of advanced features such as circuit breaking, degradation, and flow control for cloud services and databases results in extremely high costs for circuit breaking and degradation modifications in these scenarios; the absence of proactive degradation mechanisms for business functions makes it unable to cope with sudden events such as downstream service outages and traffic surges, impacting system performance and stability; the Kafka (an open-source distributed stream processing platform) asynchronous messaging solution suffers from business logic coupling and low performance; and remote service call client timeouts and connection reactivation issues present problems such as cumbersome configuration and missing configurations.
[0026] Based on this, the embodiments of this application provide a method for fixing architectural problems, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the method for fixing architectural problems in this application.
[0027] In this embodiment, the architecture problem fixing method includes steps S10-S30. Step S10, when detecting that the architecture has an architecture problem, determining the architecture function corresponding to the architecture problem. It should be noted that the embodiment detects the system code, configuration or dependency relationship by using the automatic tool cloud effect dynamic specification detection tool (architecture daemon tool), identifies problems that do not conform to the established architecture specification or high-availability design principles, including not configuring fuse degradation, SQL (Structured Query Language, structured query language) without protection, HTTP (HyperText Transfer Protocol, Hypertext Transfer Protocol) client timeout missing, etc. The embodiment determines the architecture function corresponding to the architecture problem, which classifies the detected specific problem into a reusable and system-level architecture function, such as Redis (a kind of in-memory database software) call without fuse, corresponding to the cloud service fuse degradation function, and the slow SQL is not intercepted, corresponding to the SQL automatic protection function.
[0028] It can be understood that usually when developers face architecture problems, they often need to judge which design pattern should be used for modification, which has high decision cost and is prone to errors. The embodiment can automatically correspond the architecture problem to the function module by determining the function module corresponding to the architecture problem, thereby avoiding manual experience dependence and improving the consistency and accuracy of problem understanding.
[0029] Step S20, determining a target function module from a preset architecture function module based on the architecture function, wherein the target function module includes complete code that can implement the architecture function; It should be noted that the preset architecture function module refers to a standardized and reusable architecture function component that is designed and built-in in the system in advance. The target function module is a specific component that is matched and selected from the architecture function component and completely corresponds to the current architecture function. The core function structure diagram of the architecture function module of the embodiment can be referred to Figure 2 , and specifically includes a module layer, a function layer and a framework layer.
[0030] It can be understood that the embodiment accurately matches and determines a target function module containing complete implementation logic from the preset architecture function module according to the identified architecture function, so that the complex architecture logic that needs to be manually written and debugged can be directly implemented by calling mature components, thereby significantly reducing the cost of architecture repair and avoiding the problems of imperfect repair and high repair cost caused by manual modification of architecture code.
[0031] Further, the architecture function module of the embodiment is integrated based on the best practices in the industry, has high stability and high performance, and can repair architecture problems through out-of-box use, thereby solving the problem of incomplete architecture repair in the prior art.
[0032] In step S30, the target function module is connected to the architecture to implement the architecture function through the target function module and repair the architecture problem.
[0033] It should be noted that the selected packaged function module is integrated into the code structure or runtime environment of the current application system in a non-intrusive manner, so that the module is actually run in the system and plays a corresponding function, such as performing fuse judgment, intercepting slow SQL, and asynchronously sending messages.
[0034] It can be understood that the embodiment actually connects the selected target function module to the system architecture, so that the preset standardized architecture function takes effect in the runtime environment, thereby realizing the fundamental repair of the architecture problem without manual code writing by the developer.
[0035] Since the connection process of the architecture function module of the embodiment adopts a non-intrusive technical means, the key functions such as fuse, flow control, and asynchronous can be dynamically woven in without modifying the original business logic, thereby significantly reducing the disturbance risk of the repair process to the existing system, avoiding other architecture problems caused by large code changes, and realizing low-cost and high-reliability architecture problem repair.
[0036] In a feasible implementation, the architecture function includes message processing adjustment, the message processing adjustment includes adjustment of an execution queue of message processing, the architecture function module includes a processing adjustment module, and after the step of connecting the architecture function module to the architecture, the method further includes: If the target function module includes the processing adjustment module, when the message processing adjustment needs to be implemented, a called message processing method and a preset processing adjustment rule are acquired, the processing adjustment rule includes a processing adjustment threshold, an API (Application Programming Interface) interface corresponding to the message processing method is monitored and buried, to monitor the processing flow of the API interface, and when it is detected that the processing flow is greater than the processing adjustment threshold, the execution queue is adjusted based on the processing adjustment rule.
[0037] It should be noted that the message processing adjustment refers to dynamically adjusting the message processing according to the real-time load or traffic surge of the system during the message consumption process, so as to avoid overloading of the consumer system, response delay or even collapse caused by a large number of messages flowing in instantaneously. The adjustment of the execution queue refers to dynamically regulating the queue for temporarily storing the message tasks to be processed, including adjusting the message processing time and the message processing order, and the like, so as to realize the effect of "peak load regulation and valley fill" of the message processing.
[0038] The processing adjustment module is a sub-module in the preset architecture function module and is specially used for realizing the elastic control of the message processing. The processing adjustment module in the embodiment is a "peak load regulation and valley fill" component of the KafkaListener (message listening component of the Kafka consumer) consumer based on the ZA21 (a traffic protection module) traffic protection module and the Sentinel (a traffic control component).
[0039] The monitoring and burying refer to inserting the monitoring logic before and after the execution of the API interface corresponding to the message processing method through the AOP (Aspect-Oriented Programming) or the interceptor technology, and are used for collecting the traffic indexes such as the calling frequency, the processing time consumption and the concurrency of the interface in real time. The processing adjustment threshold is a preset traffic control critical value, such as the QPS (Queries Per Second) threshold, the queuing time threshold and the like. When the actual traffic exceeds the threshold, the adjustment action of the execution queue is triggered. The configuration example of the message processing peak load regulation and valley fill in the embodiment can be referred to Figure 3 , Figure 3 The QPS threshold of the message processing peak load regulation and valley fill, the flow control processing and the queuing time and the like are included.
[0040] It can be understood that when the target function module includes the processing adjustment module, the message processing method and the preset processing adjustment rule thereof are automatically acquired, the corresponding API interface is monitored and buried, the processing traffic is monitored in real time, the execution queue is dynamically adjusted when it is detected that the traffic exceeds the set threshold, and thus the intelligent traffic regulation in the message consumption process is realized. The principle diagram of the message processing peak load regulation and valley fill can be referred to Figure 4 , Figure 4 The control example of the message processing request is shown in the following table.
[0041] Since the above steps are based on real-time traffic data to make decisions, the message processing rate can be actively limited or the excess tasks can be queued for later processing when traffic surges, effectively preventing the system from collapsing due to instantaneous high load, improving the stability and resource utilization of the system. Meanwhile, the GroupId (Consumer Group ID, ID of the consumer group) and Topic (specific topic) are used as resource identifiers in the embodiment, and through fine-grained point setting and rule configuration, precise control at the consumer group level is supported, avoiding resource waste caused by global flow limiting. Moreover, the entire process does not require modification of business code and is completely completed automatically by the component, significantly reducing development and operation costs.
[0042] In an available implementation, the architecture function includes SQL automatic protection, the architecture function module includes a SQL protection module, and after the step of connecting the architecture function module to the architecture, the method further includes: If the target function module includes the SQL protection module, when SQL automatic protection is needed, based on a preset statement interceptor, the SQL statement to be executed is intercepted, it is judged whether the SQL protection module has enabled SQL mode, if yes, the SQL statement is obtained, and a preset standardization processing is performed on the SQL statement to obtain a standard SQL statement, and the standard SQL statement is subjected to a fuse flow control check. The fuse flow control check includes checking the processing flow and processing time of the SQL statement, and when the processing flow ratio of slow SQL is greater than a preset flow ratio threshold, the execution of the SQL statement is degraded based on a preset custom degradation rule, wherein the slow SQL is the SQL statement whose processing time exceeds a preset processing time threshold.
[0043] It should be noted that SQL automatic protection refers to intercepting, analyzing and controlling SQL statement execution during database access through automatic means. In the embodiment, the MyBatis (a kind of persistence layer framework) interceptor is used as a statement interceptor, and the interception logic is inserted before SQL execution, so as to intercept the SQL statement to be executed and its execution context. In the embodiment, normalization processing is used as the standardization processing of the SQL statement to generate a standard SQL statement in a unified format, so as to facilitate subsequent SQL fuse flow control check operations.
[0044] It should be further noted that in the embodiment, if the SQL mode is enabled, the SQL statement is obtained and normalized, and the SQL statement is executed as a resource name for fuse flow control check. If the SQL mode is not enabled, the MapperID (SQL mapping ID) corresponding to the current operation is obtained, and the obtained SQL mapping ID is executed as a resource name for fuse flow control check. The process of SQL automatic protection can refer to Figure 5 ,Figure 5 The whole process of the SQL automatic protection is included from the beginning to the end.
[0045] It can be understood that, in the target function module includes the "SQL protection module, based on the preset statement interceptor intercepts the SQL statement to be executed, and the SQL is standardized after the SQL mode is enabled, and then the processing flow and processing time are fused and controlled. When the flow proportion of slow SQL (SQL whose processing time exceeds the preset threshold) is detected to exceed the set proportion, the execution degradation mechanism based on the preset rule is automatically triggered, so that the SQL automatic protection at the database access level is realized. The slow SQL fuse example can refer to Figure 6 , Figure 6 The fuse degradation configuration including the slow SQL fuse.
[0046] The above steps of the embodiment complete semantic normalization before SQL execution, can accurately identify high-frequency slow queries, and judge the influence degree of the high-frequency slow queries on the overall performance of the system through the flow proportion threshold, avoid chain failures caused by concurrent calls of individual slow SQL, and combine the configurable degradation strategy to guarantee the availability of the business interface when the database response delay or overload, significantly improve the stability and fault tolerance of the system.
[0047] In a feasible embodiment, the architecture function includes asynchronous message sending, the architecture function module includes an asynchronous sending module, and after the step of connecting the architecture function module to the architecture, the step further includes: If the target function module includes the asynchronous sending module, when performing a message writing operation, a target cache position for message writing is determined in a preset ring-shaped lock-free queue through bit operation, and if the target cache position has a written value, the asynchronous message sending is performed based on the target cache position and a preset lock-free concurrent operation.
[0048] It should be noted that asynchronous message sending refers to converting the originally synchronous blocking message sending operation into an asynchronous non-blocking mode, and achieving high throughput and low delay message processing through buffering, queuing, background thread consumption and the like. The asynchronous sending module is a preset architecture function module of the embodiment, which encapsulates the complete logic of asynchronous message sending. The ring-shaped lock-free queue is a fixed-size array simulating a ring-shaped buffer, and the enqueue and dequeue under multi-thread concurrent access are realized through CAS (Compare-And-Swap, compare and swap) atomic operations, avoiding thread blocking and context switching overhead caused by traditional lock mechanism.
[0049] The bit operation determines the target cache position. The method needs the queue capacity to be a power of 2, that is, the method for quickly calculating the write index of the message in the ring queue by using bit operation can complete address mapping with extremely low CPU overhead, significantly improves the write efficiency, and better utilizes the CPU cache. The bit operation calculation formula in the embodiment is (index++) & (RingBufferNumber-1).
[0050] It should be further explained that the embodiment also realizes asynchronous sending of messages through a JDK (Java Development Kit) blocking queue structure. The JDK blocking queue structure and the ring lock-free queue structure of the embodiment are both adapted to two kinds of clients, namely, a native KafkaProducer (Kafka producer) and a Spring KafkaTemplate (Kafka template of the Spring framework), and realize eight kinds of high-performance Kafka asynchronous message sending clients of single channel / multi-channel, supporting three modes of asynchronous sending, sending after transaction submission, and sending after transaction rollback. The general JDK blocking queue asynchronous sending client of the embodiment can refer to Figure 7 , including a producer, a consumer, and a blocking queue. The client of the embodiment for asynchronous sending through the ring lock-free queue can refer to Figure 8 , including a producer, a consumer, and a ring lock-free queue.
[0051] It can be understood that when the target function module contains an asynchronous sending module, the embodiment adopts bit operation to quickly locate the target cache position in the ring lock-free queue during the message writing operation, and completes asynchronous message sending based on the lock-free concurrent mechanism when the position is occupied, thereby realizing ultra-high performance and low-delay asynchronous processing of messages.
[0052] The use of bit operation instead of traditional modulo operation greatly improves the index calculation speed, and the design of the ring lock-free queue avoids thread blocking caused by lock competition, and still maintains stable throughput capacity in a high-concurrency scenario. Even if multiple threads simultaneously attempt to write to the same position, safe retry or staggered writing can be realized through atomic operations such as CAS, thereby guaranteeing the integrity of data and the responsiveness of the system, and the entire process is automatically completed by the architecture component, without the need for the business party to care about the underlying concurrency details, thereby realizing out-of-the-box use of high-performance asynchronous message sending.
[0053] Further, since the ring array structure is prone to the problem of false sharing, the present embodiment does not use the JDK AtomicInteger (integer operation in the Java Development Kit) when performing the CAS operation, but uses the AtomicIntegerArray (atomic integer array) with a length of 31, and sets the array element position of the operation to 15. The ring array element and the index positioning element are not on the same Cache Line by using the alignment padding method, so as to avoid the cache false sharing problem. The schematic diagram of the present embodiment using the AtomicIntegerArray and performing element padding can be referred to Figure 9 , Figure 9 The index positioning element and the alignment padding element are included.
[0054] In a feasible embodiment, the message write operation has a preset spin count, and the step of performing the asynchronous message sending based on the target cache location and the preset lock-free concurrent operation comprises: The current spin count of the message write operation is obtained. If the current spin count is not zero, the target cache location is set to the target increment location after the target cache location by a preset step, and it is determined whether the current target cache location has a written value. If yes, the spin count is reduced, and the step of obtaining the current spin count of the message write operation is returned until the target cache location does not have a written value, the message is written to the target cache location, or the spin count is zero, and a write failure identifier is returned.
[0055] It should be noted that the spin count refers to the maximum number of active polling retries allowed by the system when attempting to write a message to the ring lock-free queue if the target location is occupied. The message write operation refers to the process of the producer thread writing the to-be-sent message to the ring lock-free queue. The target cache location is the initial write index location calculated by bit operation. The target increment location is the next available location found by searching backward by a fixed step when the initial target location is occupied.
[0056] It can be understood that the present embodiment sets a preset spin count for the message write operation, and automatically searches for a new available location backward when the target cache location is occupied, while reducing the spin count, until the message is successfully written or the spin count is exhausted, thereby significantly improving the write success rate of the ring lock-free queue and the system robustness in a high-concurrency scenario. The data production process of the ring lock-free queue of the present embodiment can be referred to Figure 10 , Figure 10 The data generation steps include bit operation positioning, spin count judgment, and increment positioning.
[0057] Since multiple producer threads can write messages to the same location at the same time, simple CAS failure will result in a large number of write failures, and after introducing the limited spinning mechanism, the thread can actively look for adjacent empty slots without blocking, improving resource utilization, avoiding message loss or degraded execution due to temporary conflicts, and preventing CPU resource waste caused by infinite loops by limiting the number of spins, achieving a balance between performance and stability.
[0058] Further, in the consumer end of the embodiment, each consumer is allocated one or more RingBuffer (ring lock-free queue) for consumption, there is no lock synchronization operation between multiple consumers, and the corresponding array elements are emptied after consumption, allowing the producer to continue producing data.
[0059] As can be seen from the above, when detecting an architecture problem, the embodiment determines an architecture function corresponding to the architecture problem, determines a target function module from preset architecture function modules based on the architecture function, and connects the target function module to the architecture to implement the architecture function through the target function module to repair the architecture problem.
[0060] The current method needs to manually modify the code of the architecture at a large cost, and it is difficult to completely repair various problems existing in the architecture, resulting in poor effect of the current architecture repair. When detecting an architecture problem, the embodiment determines an architecture function corresponding to the architecture problem to determine a target function module from preset architecture function modules. Since the target function module includes complete code that can implement the architecture function, the corresponding architecture function can be directly implemented through the target function module without manually modifying the code of the architecture at a large cost, and the complete code encapsulated can no longer have problems in logic, performance and security when the architecture implements the corresponding function, thereby improving the effect of architecture repair.
[0061] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as the above embodiment one can refer to the above introduction, and the following will not be repeated. On this basis, please refer to Figure 11 , after step S30, the architecture function includes cloud service fuse degradation, the architecture function module includes a fuse degradation module, and the architecture problem repair method further includes steps S100-S300: Step S100, if the target function module includes the fuse degradation module, when the cloud service fuse degradation needs to be implemented, the cloud service type of the cloud service is determined; It should be noted that the cloud service fuse degradation refers to automatically interrupting subsequent calls and executing preset degradation logic when the external cloud services such as Redis, Kafka, RabbitMQ, ES and the like on which the system depends have response delay, timeout or unavailability in the microservice architecture. The fuse degradation module is one of the preset architecture function modules, encapsulates the general fuse degradation capability for multiple cloud services, and is implemented based on Alibaba Sentinel or a self-developed traffic protection component in the embodiment. The cloud service type refers to the specific cloud service type that needs to be fused and degraded, such as Redis cache, Kafka message queue and the like. The client call mode, exception characteristics and degradation strategy of different types of cloud services are different and need to be processed respectively.
[0062] It can be understood that according to the provisions in the architecture specification, the cloud service should have a high-robustness fuse degradation strategy, but the current cloud service degradation has problems such as incomplete repair and high cost, and therefore the fuse degradation and peak clipping functions are provided for commonly used cloud services such as Redis, Kafka, RabbitMQ and ES to simplify the cloud service degradation transformation.
[0063] When the target function module contains the fuse degradation module, the embodiment further identifies the specific type of the cloud service that needs to be protected, so that the system can dynamically select the most matched fuse strategy and adaptation logic according to the characteristics of different cloud services, thereby realizing fine management and differentiated control of the fuse degradation capability.
[0064] Since the cloud services such as Redis, Kafka and ES are different in API structure, exception system and use scenario, using a unified fuse logic may lead to misjudgment or failure of protection, and by explicitly identifying the service type, a dedicated buried point aspect, exception capture mechanism and resource naming rule can be configured for each type of service, thereby improving the accuracy of fuse judgment and the reliability of degradation execution.
[0065] In step S200, a target degradation module is determined from a plurality of cloud service degradation schemes of the fuse degradation module based on the cloud service type. It should be noted that the target degradation module is a specific degradation component that is matched and selected from the above-mentioned multiple schemes and corresponds to the current cloud service type. For example, when the cloud service type is Redis, the target degradation module is the RedisTemplate (Redis template) fuse degradation flow control adaptation module.
[0066] It is understood that this embodiment accurately matches and determines a dedicated target degradation module from the various adaptation schemes built into the circuit breaker degradation module based on the identified cloud service type, so that the system can automatically activate the most suitable protection logic for the technical characteristics of different cloud services, avoiding misjudgment or failure caused by a generalized circuit breaker mechanism.
[0067] Step S300: Based on the complete code already encapsulated in the target degradation module, implement the corresponding circuit breaker degradation scheme.
[0068] It should be noted that in this embodiment, all the logic code required to implement circuit breaking and degradation, such as Spring AOP or interceptor-based instrumentation aspects, Sentinel resource definitions and rule bindings, exception handling and degradation handlers, exists out of the box and can take effect without developers writing anything extra.
[0069] In one feasible implementation, the cloud service type includes a database service, the database service includes a database service template, and the step of implementing the corresponding circuit breaker and degradation scheme based on the complete code already encapsulated in the target degradation module includes: If the cloud service type is the database service, then the target operation method called by the database service template and the degradation processor corresponding to the database service template are obtained. The degradation processor includes a corresponding target degradation rule, which includes a target circuit breaker threshold. The degradation processor, the target operation method, and the database service template are packaged into a new target template object. The target template object has the same API interface as the database service template and implements the same target operation method. Monitoring points are set on the API interface corresponding to the target operation method to monitor abnormal data of the API interface. When the abnormal data exceeds the target circuit breaker threshold, the cloud service is circuit-breaker degraded based on the target degradation rule.
[0070] It's important to note that the target operation method refers to the specific method called within the database service template, serving as the basic unit for circuit breaker implementation and monitoring. The degradation handler is a pre-encapsulated callback logic component used to handle database service unavailability or response timeouts, containing specific degradation rules. The target circuit breaker threshold is a preset condition parameter used to determine whether to initiate the degradation mechanism. The new target template object is a proxy object encapsulating the original database service template, target operation method, and degradation handler, with its exposed API interface completely identical to the original template. Monitoring implementation involves inserting monitoring code before and after the execution of the target operation method to collect abnormal data such as call success rate, response time, and concurrency, serving as the basis for circuit breaker judgment. The overall process of Redis circuit breaker degradation flow control can be found in [reference needed]. Figure 12 .
[0071] It should be noted that in the present embodiment, the corresponding fuse degradation rule is configured in the OAM (Operations and Maintenance) traffic protection module. The Redis fuse degradation rule configuration example of the present embodiment can refer to Figure 13 .
[0072] It can be understood that in the present embodiment, when the cloud service type is a database service, the target operation method and the corresponding degradation processor called by the service template are obtained, and the two are encapsulated with the template itself as a new target template object. On the premise of keeping the original API interface unchanged, the method call is monitored and buried, and when the abnormal data exceeds the preset fuse threshold, the degradation rule is automatically executed, thereby realizing the transparent fuse degradation of the database access layer.
[0073] Due to the above operation reconstruction template object of the present embodiment, the enhancement can be completed without modifying any business code, avoiding the tedious operation of manually adding annotations in the traditional way, and greatly reducing the modification cost. And since the target template object inherits all the behavior characteristics of the original template, compatibility and stability are guaranteed, and the embedded buried point logic can accurately capture each database call, combined with the configurable fuse threshold to realize dynamic protection, which can cut off the request and return the safe result in time when the database performance degrades or the connection pool is exhausted, effectively preventing service avalanche caused by single point failure, and significantly improving the fault tolerance and high availability of the system.
[0074] Further, in the Redis multi-data source scenario, the degradation processing of each RedisTemplate may be different, so a respective degradation processor is set for each RedisTemplate client, and the core API of commonly used operations such as ValueOperations (value operation), ListOperations (list operation), SetOperations (set operation), and ZSetOperations (ordered set operation) is buried through Sentinel to realize method-level fuse degradation, further reducing coupling. If the core API is not customized with global degradation logic, RedisTemplateFallbackException (Redis template degradation exception) exception will be thrown, which can be captured and processed individually.
[0075] In a feasible embodiment, the cloud service type includes a message queue service, the message queue service includes a message service template, and based on the complete code encapsulated in the target degradation module, the steps of implementing the corresponding fuse degradation scheme include: If the cloud service type is the message queue service, a downgrade interceptor is created based on the message service template, the downgrade interceptor is used to intercept the message sending method of the message service template, the downgrade interceptor is registered as a manageable instance object, and the priority of the downgrade interceptor is set to the highest, the priority is the execution order priority of the downgrade interceptor at runtime, based on the downgrade interceptor, the message sending method of the message service template is intercepted, and the API interface corresponding to the intercepted message sending method is monitored and buried to monitor the abnormal data of the API interface, it is judged whether the message service template exists corresponding downgrade processor, if exists, the corresponding downgrade processor of the message service template is acquired, wherein the downgrade processor includes corresponding target downgrade rule, the target downgrade rule includes target fuse threshold, when the abnormal data monitored exceeds the target fuse threshold, the cloud service is fused and degraded based on the target downgrade rule.
[0076] It should be noted that the downgrade interceptor refers to a component capable of inserting monitoring and control logic before / after message sending, for collecting performance indicators, determining whether to trigger fuse, and executing downgrade strategy when necessary.
[0077] Registering as a manageable instance object means that the downgrade interceptor is handed over to the Spring container or framework management, so that it has the ability of life cycle control, configuration injection, dynamic start and stop, etc., which is convenient for unified management. The priority is set to the highest, which means that when multiple interceptors coexist, the downgrade interceptor is ensured to be executed first through configuration. The Kafka fuse downgrade flow control process of the present embodiment can refer to Figure 14 , the configuration of the fuse downgrade rule is the same as the Redis service, which can refer to Figure 15 , Figure 15 is an example of Kafka fuse downgrade configuration in the present embodiment.
[0078] It should also be noted that in the present embodiment, when the KafkaTemplate doSend (Kafka template class sending method) method is fused and degraded, the default downgrade processor returns a SettableListenableFuture (settable listenable future object) object and fills in the corresponding exception, and the subsequent KafkaTemplate (Kafka template class) chain syntax can be used to handle the fuse degradation exception. The syntax example of Kafka downgrade processing in the present embodiment can refer to Figure 16 .
[0079] It can be understood that the embodiment implements pre-interception and comprehensive monitoring when a message sending method is called by creating a dedicated degradation interceptor based on a message service template and registering it as a manageable instance and setting the highest priority when the cloud service type is a message queue service.
[0080] Since the interceptor is set to the highest priority, abnormal data in the whole process can be completely captured, and when it is detected that the abnormal index exceeds the preset fuse threshold, the degradation processor is triggered to perform degradation, effectively preventing the producer thread from being blocked or the interface response from being delayed due to the unavailability of the message middleware. The above-mentioned embodiment uses the interceptor mode instead of modifying the template source code or business logic, and is completely transparently integrated, without the need for developers to change any existing code, thereby significantly reducing access costs and maintenance risks.
[0081] In an embodiment, the architecture function module further includes an active degradation module to implement active degradation of the business function.
[0082] It can be understood that the prior art can usually only passively deal with traffic peaks, and often cannot handle them in time when the downstream service is down, and the degradation strategy is usually fixed. The embodiment can actively degrade non-essential business functions when there is a traffic flood, reduce system resource consumption, and improve performance, and can configure the function to actively degrade when the downstream service is down, avoid passive waiting for fuse, and improve the response speed and stability of the system.
[0083] Further, the embodiment can select multiple degradation strategies when setting active degradation, so that developers can flexibly configure according to actual needs.
[0084] In an embodiment, the architecture function module further includes an HTTP timeout and connection keep-alive module, so that the architecture meets the requirements of the architecture specification. The HTTP timeout and connection keep-alive configuration tool of the embodiment can refer to Figure 17 .
[0085] It can be understood that when performing HTTP timeout and connection keep-alive, the prior art usually needs to be manually configured, which is relatively cumbersome and may also have compatibility problems. Therefore, the embodiment provides a connection protection tool supporting multiple HTTP clients, supporting three modes of automatic assembly, creation of tool classes, and processors, and by automatically configuring and tool classes, the workload of configuring timeout and connection keep-alive is significantly reduced, ensuring compatibility and ease of use under different frameworks.
[0086] In summary, if the target functional module in this embodiment includes the circuit breaker and degradation module, when it is necessary to implement the circuit breaker and degradation of the cloud service, the cloud service type of the cloud service is determined. Based on the cloud service type, the target degradation module is determined from the multiple cloud service degradation schemes of the circuit breaker and degradation module. Based on the complete code already encapsulated in the target degradation module, the corresponding circuit breaker and degradation scheme is implemented.
[0087] Because different cloud services differ in API structure, exception handling system, and usage scenarios, using a uniform circuit breaker logic may lead to misjudgments or protection failures. Therefore, this embodiment, when the target functional module includes a circuit breaker and degradation module, further identifies the specific type of cloud service that needs protection. This allows the system to dynamically select the most suitable circuit breaker strategy and adaptation logic based on the characteristics of different cloud services, thereby achieving refined management and differentiated control of circuit breaker and degradation capabilities. By clearly identifying service types, it ensures that each type of service is configured with dedicated data entry points, exception handling mechanisms, and resource naming rules, improving the accuracy of circuit breaker judgments and the reliability of degradation execution.
[0088] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the architectural problem repair method of this application. Any simple modifications based on this technical concept are within the protection scope of this application.
[0089] This application provides an architecture problem repair device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the architecture problem repair method in the first embodiment described above.
[0090] The following is for reference. Figure 18 The diagram illustrates a structural schematic suitable for implementing the architecture problem repair device in the embodiments of this application. The architecture problem repair device in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, tablets, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 18 The illustrated architecture problem repair device is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0091] like Figure 18As shown, the architecture problem fixing device can include a processing device 1001 (e.g., a central processing unit, a graphics processing unit, etc.) that can perform various appropriate actions and processes according to a program stored in a read only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. In the RAM 1004, various programs and data required for operation of the architecture problem fixing device are also stored. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; the storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the architecture problem fixing device to communicate with other devices wirelessly or by wire to exchange data. Although the architecture problem fixing device having various systems is shown in the figure, it should be understood that all the shown systems are not required to be implemented or possessed. More or less systems can be alternatively implemented or possessed.
[0092] In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network by a communication device, or installed from the storage device 1003, or installed from the ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the methods of embodiments of the present disclosure are performed.
[0093] The architecture problem fixing device provided by the present disclosure adopts the architecture problem fixing method in the above-mentioned embodiments, and can solve the technical problem of poor architecture fixing effect. Compared with the prior art, the architecture problem fixing device provided by the present disclosure has the same beneficial effects as the architecture problem fixing method provided by the above-mentioned embodiments, and other technical features in the architecture problem fixing device are the same as the features disclosed in the previous embodiment method, which will not be repeated here.
[0094] It should be understood that portions of the application disclosed can be implemented in hardware, software, firmware, or combinations thereof. In the description of the embodiments above, specific features, structures, materials or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0095] The above description is merely illustrative of the application and is not intended to limit the scope of the application. Any changes and modifications that can be made to the application in accordance with the principles of the application would be readily apparent to those skilled in the art and the present application is therefore not limited to the description and examples contained herein but is only limited by the claims.
[0096] The application provides a computer readable storage medium having stored thereon computer readable program instructions (i.e., a computer program) for performing the architecture problem fixing method in the above embodiments.
[0097] The computer readable storage medium provided by the application may, for example, be a U disk, but is not limited to an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, system, or device, or any combination of the above. More specific examples of the computer readable storage medium can include, but are not limited to, an electrical connection having one or more conductive wires, 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 above. In the present embodiment, the computer readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer readable storage medium can be transmitted in any suitable medium, including but not limited to electrical wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0098] The above computer readable storage medium can be included in the architecture problem fixing device; or can exist separately and not be assembled into the architecture problem fixing device.
[0099] The above computer readable storage medium carries one or more programs, which, when executed by the architecture problem fixing device, cause the architecture problem fixing device to perform the above architecture problem fixing method.
[0100] Computer program code for carrying out operations of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).
[0101] The flow diagrams and the block diagrams in the drawings are illustrations of architectures, functionalities, and operations of possible implementations of systems, methods, and computer program products according to various embodiments of the present application. In this regard, each block in the flow diagrams or block diagrams can represent a module, a procedure, or a part of code, which comprises one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or the blocks may
[0102] The modules involved in the embodiments of the present application can be implemented in software or hardware. In some cases, the names of the modules do not constitute a limitation on the modules themselves.
[0103] The readable storage medium provided by the present application is a computer readable storage medium, which stores computer readable program instructions (i.e. computer programs) for executing the above-mentioned architecture problem repairing method, and can solve the technical problem of poor architecture repairing effect. Compared with the prior art, the computer readable storage medium provided by the present application has the same beneficial effects as the architecture problem repairing method provided by the above-mentioned embodiments, which will not be described here.
[0104] The user-related data involved in the present application is obtained after obtaining the permission or consent of the user, with reference to Figure 19 That is, when the present application is applied to a specific product or technology, the user's permission is required to realize the acquisition and processing of relevant data, and the processing of relevant data needs to comply with relevant laws, regulations and supervision standards of relevant countries and regions.
[0105] The above is only some embodiments of the present application, and does not limit the protection scope of the present application. Any equivalent structural transformation made by using the content of the present application specification and drawings, or direct / indirect application in other related technical fields is included in the patent protection scope of the present application.
Claims
1. A method for fixing architectural problems, characterized in that, The method includes: When an architectural problem is detected, the corresponding architectural function is determined. Based on the architecture functions, a target functional module is determined from the preset architecture functional modules, wherein the target functional module includes encapsulated complete code that can implement the architecture functions; The target functional module is integrated into the architecture to implement the architecture's functions and fix the architecture's problems.
2. The method as described in claim 1, characterized in that, The architecture features include cloud service circuit breaking and degradation, and the architecture functional modules include a circuit breaking and degradation module. After the step of integrating the architecture functional modules into the architecture, the following is also included: If the target functional module includes the circuit breaker and degradation module, when it is necessary to implement the cloud service circuit breaker and degradation, the cloud service type of the cloud service shall be determined. Based on the cloud service type, the target degradation module is determined from multiple cloud service degradation schemes of the circuit breaker degradation module; Based on the complete code already encapsulated in the target degradation module, the corresponding circuit breaker degradation scheme is implemented.
3. The method as described in claim 2, characterized in that, The cloud service type includes a database service, the database service includes a database service template, and the steps to implement the corresponding circuit breaker and degradation scheme based on the complete code already encapsulated in the target degradation module include: If the cloud service type is the database service, then obtain the target operation method called by the database service template and the degradation processor corresponding to the database service template, wherein the degradation processor includes a corresponding target degradation rule and the target degradation rule includes a target circuit breaker threshold. The degradation processor, the target operation method, and the database service template are packaged into a new target template object, wherein the target template object has the same API interface as the database service template and implements the same target operation method; Monitoring points are installed on the API interface corresponding to the target operation method to monitor abnormal data of the API interface; When the abnormal data is detected to exceed the target circuit breaker threshold, the cloud service is circuit breaker and downgraded based on the target downgrade rule.
4. The method as described in claim 2, characterized in that, The cloud service type includes a message queue service, the message queue service includes a message service template, and the steps to implement the corresponding circuit breaker and degradation scheme based on the complete code already encapsulated in the target degradation module include: If the cloud service type is the message queue service, a degradation interceptor is created based on the message service template, wherein the degradation interceptor is used to intercept the message sending method of the message service template; Register the degradation interceptor as a manageable instance object and set the priority of the degradation interceptor to the highest, wherein the priority is the execution order priority of the degradation interceptor at runtime; Based on the degradation interceptor, the message sending method of the message service template is intercepted, and the API interface corresponding to the intercepted message sending method is monitored by setting monitoring points to monitor abnormal data of the API interface. Determine whether the message service template has a corresponding degradation processor. If it does, obtain the degradation processor corresponding to the message service template. The degradation processor includes a corresponding target degradation rule, and the target degradation rule includes a target circuit breaker threshold. When the abnormal data is detected to exceed the target circuit breaker threshold, the cloud service is circuit breaker and downgraded based on the target downgrade rule.
5. The method as described in claim 1, characterized in that, The architecture functionality includes message processing adjustment, which includes adjusting the execution queue for message processing. The architecture functional module includes a processing adjustment module. After the step of connecting the architecture functional module to the architecture, the system further includes: If the target functional module includes the processing adjustment module, when the message processing adjustment needs to be implemented, the message processing method to be invoked and the preset processing adjustment rules are obtained, wherein the processing adjustment rules include processing adjustment thresholds; Monitoring points are installed on the API interface corresponding to the message processing method to monitor the processing traffic of the API interface; When the processing traffic is detected to be greater than the processing adjustment threshold, the execution queue is adjusted based on the processing adjustment rules.
6. The method as described in claim 1, characterized in that, The architecture features include automatic SQL protection, and the architecture functional modules include an SQL protection module. After the step of integrating the architecture functional modules into the architecture, the following is also included: If the target functional module includes the SQL protection module, when automatic SQL protection is required, the SQL statements to be executed are intercepted based on a preset statement interceptor. Determine whether the SQL protection module has enabled SQL mode. If so, obtain the SQL statement and perform preset standardization processing on the SQL statement to obtain a standard SQL statement. The standard SQL statement is subjected to circuit breaker flow control checks, wherein the circuit breaker flow control checks include checking the processing traffic and processing time of the SQL statement; When the processing traffic ratio of slow SQL exceeds a preset traffic ratio threshold, the execution of the SQL statement is downgraded based on a preset custom downgrade rule, wherein the slow SQL is the SQL statement whose processing time exceeds a preset processing time threshold.
7. The method as described in claim 1, characterized in that, The architecture features include asynchronous message sending, and the architecture functional modules include an asynchronous sending module. After the step of integrating the architecture functional modules into the architecture, the following is also included: If the target functional module includes the asynchronous sending module, when performing a message writing operation, the target cache position for message writing is determined in a preset ring-shaped lockless queue through bit operations. If a written value exists at the target cache location, then the asynchronous message is sent based on the target cache location and the preset lock-free concurrent operation.
8. The method as described in claim 7, characterized in that, The message writing operation has a preset number of spins, and the step of sending the asynchronous message based on the target cache location and the preset lock-free concurrency operation includes: Obtain the current spin count for the message write operation; If the current number of spins is not zero, then the target increment position after the target cache position preset number of steps is taken as the target cache position, and it is determined whether there is a written value at the current target cache position; If it exists, reduce the number of spins and return to the step of obtaining the current number of spins for the message write operation until there is no written value at the target cache location, then write the message to the target cache location, or the number of spins is zero and return a write failure flag.
9. An architecture problem repair device, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the architectural problem repair method as described in any one of claims 1 to 8.
10. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the architecture problem repair method as described in any one of claims 1 to 8.