WO2019192103A1 - 并发访问控制方法、装置、终端设备及介质 - Google Patents
并发访问控制方法、装置、终端设备及介质 Download PDFInfo
- Publication number
- WO2019192103A1 WO2019192103A1 PCT/CN2018/096262 CN2018096262W WO2019192103A1 WO 2019192103 A1 WO2019192103 A1 WO 2019192103A1 CN 2018096262 W CN2018096262 W CN 2018096262W WO 2019192103 A1 WO2019192103 A1 WO 2019192103A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- function interface
- sub
- access request
- service access
- concurrent
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 37
- 230000006870 function Effects 0.000 claims description 55
- 230000004044 response Effects 0.000 claims description 42
- 108010001267 Protein Subunits Proteins 0.000 claims description 2
- 230000003213 activating effect Effects 0.000 claims description 2
- 230000000977 initiatory effect Effects 0.000 claims 2
- 230000004913 activation Effects 0.000 claims 1
- 238000012545 processing Methods 0.000 description 13
- 238000010586 diagram Methods 0.000 description 4
- 238000012795 verification Methods 0.000 description 4
- 206010033799 Paralysis Diseases 0.000 description 2
- 238000011217 control strategy Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000005265 energy consumption Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/20—Traffic policing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/52—Program synchronisation; Mutual exclusion, e.g. by means of semaphores
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/60—Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
- H04L67/61—Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources taking into account QoS or priority requirements
Definitions
- the present application belongs to the field of computer technologies, and in particular, to a concurrent access control method, apparatus, terminal device, and computer readable storage medium.
- the embodiments of the present application provide a concurrent access control method, apparatus, terminal device, and computer readable storage medium to solve the problem of low system reliability in the prior art.
- a first aspect of the embodiment of the present application provides a concurrent access control method, including:
- a second aspect of the embodiments of the present application provides a concurrent access control apparatus, the identification apparatus comprising means for performing the concurrent access control method of the first aspect described above.
- a third aspect of the embodiments of the present application provides a terminal device, including a memory and a processor, where the computer stores computer readable instructions executable on the processor, the processor executing the computer
- the steps of the concurrent access control method as described in the first aspect are implemented when the instruction is read.
- a fourth aspect of the embodiments of the present application provides a computer readable storage medium storing computer readable instructions, the computer readable instructions being executed by a processor to implement the first aspect as described in the first aspect The steps of the concurrent access control method.
- the service access needs to be responded to by the service interface and the sub-function interface that are required to be called by the service access request, and whether the current real-time access number of the sub-function interface is greater than the maximum allowed concurrent number.
- the request implements fine-grained access control for multiple concurrent requests, and avoids a situation in which the business system is paralyzed due to simultaneous response to multiple access requests.
- the maximum allowed concurrent number of different sub-function interfaces can be different, it can be flexibly set according to the pre-added concurrency control component, so different access control strategies for different sub-function interfaces are obtained.
- FIG. 1 is a flowchart of an implementation of a concurrent access control method provided by an embodiment of the present application
- FIG. 3 is a flowchart of an implementation of a concurrent access control method according to another embodiment of the present application.
- FIG. 4 is a flowchart of an implementation of a concurrent access control method according to another embodiment of the present application.
- FIG. 5 is a flowchart of a specific implementation of a concurrent access control method S403 according to an embodiment of the present application
- FIG. 6 is a structural block diagram of a concurrent access control apparatus according to an embodiment of the present application.
- FIG. 7 is a schematic diagram of a terminal device according to an embodiment of the present application.
- FIG. 1 shows an implementation flow of a concurrent access control method provided by an embodiment of the present application, where the method flow includes steps S101 to S105.
- the specific implementation principles of each step are as follows:
- S101 Receive a service access request initiated by a client.
- the client may refer to various types of terminal devices, such as a mobile phone, a tablet computer, and a server, and may also be an application running in the above-mentioned various types of terminal devices, which is not limited herein.
- the business interface with each client is implemented according to the pre-provided access interface or access link. If it is detected that the above access interface or access link is invoked, it is determined that the service access request sent by the client is received.
- S102 Determine, according to the service parameter carried in the service access request, a function interface that is required to be invoked by the service access request and a sub-function interface under the function interface.
- each service access request sent by the client carries a service parameter.
- the above service parameters include a first-level identification code of a function interface that the client needs to invoke, and a secondary identification code of a sub-function interface that the client needs to invoke.
- the received service access request is parsed to extract the function interface flag bit and the identifier code recorded on the sub-function interface flag bit.
- the function interface called by the service access request is determined according to the preset primary identification code and the corresponding relationship of the function interface.
- the sub-function interface identifier code comparison table is used to record the second-level identification code corresponding to each sub-function interface of the function interface. Therefore, the sub-function interface that is required to be called by the business access request can be determined from the table.
- each sub-function interface under the function interface may be, for example, a payment sub-interface, an information query sub-interface, and a transaction record verification sub-interface.
- S103 Start a pre-added concurrency control component, and read an access control parameter stored by the concurrency control component about the sub-function interface under the function interface, where the access control parameter includes a maximum allowed concurrency number.
- a pre-customized development concurrency control component is acquired and installed. After starting the added concurrency control component, the parameter setting page of each sub-function interface is displayed. In each parameter setting page of the sub-function interface, according to the received parameter setting instruction, various access control parameters are set for the sub-function interface.
- the access control parameters include, but are not limited to, a maximum allowed concurrency number, a concurrent weight coefficient, an access control list, and the like.
- FIG. 2 shows a specific implementation process of the concurrent access control method S103 provided by the embodiment of the present application, which is described in detail as follows:
- S1031 Acquire a concurrency control time interval.
- the concurrent control time interval input by the management personnel on the task setting page is obtained in advance in the embodiment of the present application.
- the concurrency control time interval is used to indicate a startup time period of the concurrent control component, and the startup time period is a statistical time period of high concurrent service access.
- step S1032 is performed; if it is detected that the current system time is within the concurrency control time interval, step S1033 is performed.
- the pre-installed concurrency control component is not activated, that is, the concurrent control components are in a closed state.
- the concurrent access control function provided by the concurrency control component is no longer provided, when each service access request is received, steps S104 and S105 are not executed, but the service access request is directly processed in response.
- each service access request is received according to the order of receiving time after receiving each service access request.
- Each thread sequentially acquires a service access request in the message queue to perform a response operation to the service access request, thereby implementing an orderly response to the service access request and avoiding a contention conflict.
- S1033 If it is detected that the current system time is within the concurrency control time interval, start a preset concurrency control component, and read the sub-function interface stored by the concurrency control component with respect to the function interface. Access control parameters.
- the pre-installed concurrency control component is started only when the current system time belongs to the concurrency control time interval, and the concurrent control group component is kept in the startup state to be stored in the read concurrency control component.
- the subsequent steps S104 and S105 are executed.
- the process returns to the above step S1031; or, after the concurrent control component is started, when the concurrent control time interval ends, the process returns to the above step S1031. .
- the access control parameters corresponding to the sub-function interface of the function interface are read.
- the first-level identifier corresponding to the function interface and the second-level identifier corresponding to the sub-function interface may be spliced and combined to obtain a query identifier.
- the query identifier is used as an index word, so that the matched access control parameters are quickly retrieved in the information repository in which the access control parameters are stored.
- the secondary identifiers corresponding to the payment sub-interface and the transaction record verification sub-interface are “01” and “02”, respectively.
- the query identifier of the access control parameter for querying the payment sub-interface is “101”
- the query identifier for querying the access control parameter of the transaction record verification sub-interface is “102”.
- the maximum allowed concurrency number of the payment sub-interface obtained based on the query identifier "101" is a
- the maximum allowable concurrency number of the transaction record verification sub-interface based on the query identifier "102" is b.
- S104 Acquire a total number of real-time accesses of the sub-function interface.
- step S105 the total number of real-time accesses of each sub-function interface under each functional interface is monitored. If the total number of real-time accesses of the sub-function interface to be called by the currently received service access request is greater than the maximum allowed concurrent number of the sub-function interface, step S105 is performed.
- the maximum allowed concurrency number is the access control parameter set by the user in the concurrency control component, and the maximum allowed concurrency number is the state in which the system has the best performance, the number of service access requests that can be simultaneously processed, therefore, in order to avoid the load If the total number of real-time accesses of the sub-function interface is greater than the maximum allowable number of concurrent connections, the service access request received at the current time is rejected, thereby saving system resources. And can effectively intercept a large number of service access requests generated based on distributed denial of service attacks, to a certain extent, guarantee the bandwidth resources of legitimate service access requests.
- the embodiment of the present application implements fine-grained access control for multiple concurrent requests, and avoids a situation in which the business system is paralyzed due to simultaneous response to multiple access requests. Moreover, since the maximum allowed concurrent number of different sub-function interfaces can be different, it can be flexibly set according to the pre-added concurrency control component, so different access control strategies for different sub-function interfaces are obtained. Even if a large number of service access requests call the same sub-function interface, it can ensure that the normal access of other sub-function interfaces is not affected, and the possibility of the entire system is not improved due to the high concurrent access of a sub-function interface. Therefore, the stability and reliability of the business system are improved.
- the method further includes:
- S106 If the total number of real-time accesses is less than or equal to the maximum allowed concurrent number, and the difference between the maximum allowed concurrent number and the total number of real-time accesses is less than a preset threshold, acquiring the service access request in the sub- The first resource data requested to be loaded under the function interface.
- the total number of real-time accesses of the sub-function interface to be called by the currently received service access request is less than or equal to the maximum allowed concurrent number of the sub-function interface, further determine the maximum allowed concurrent number and the total number of implemented accesses. Whether the difference is less than a preset threshold. If the result of the determination is yes, in the service parameters carried in the service access request, the flag bit for storing the storage path of the resource data is read to obtain the uniform resource locator (Uniform) of the resource data that is requested to be loaded. Resource Locator, URL).
- Uniform uniform resource locator
- S107 In the preset resource relationship database, detecting each second resource data associated with the first resource data, and determining, according to a preset correspondence between the second resource data and the sub-function interface, The sub-function interfaces corresponding to the second resource data respectively.
- the resource relationship library stores an association relationship between each resource data that is provided for external access. For example, if the resource data to be loaded is A, and the resource data A must be displayed in the client according to the existence of the resource data B, the resource data A and the resource data B have an association relationship. Since the resource data is usually various types of data such as icons, characters, or files, in order to facilitate searching and storage, the association relationship of the URLs of the resource data is recorded in the resource relation library. That is, when the resource data A is associated with the resource data B, there is one piece of record information for describing the correspondence relationship between the URL of the resource data A and the URL of the resource data B.
- the URL of the resource data identified in the service access request is searched for the URL of each resource data corresponding to the URL in the resource relation library, and the associated resource data is read according to the URL obtained by the search.
- each resource data provides an external calling service based on one or more sub-function interfaces
- each sub-function interface corresponding to each resource data associated with the resource data requested by the service access request is acquired.
- the resource data to be invoked by the service access request is the first resource data
- the other resource data associated with the resource data is the second resource data
- S108 Detect, for each of the sub-function interfaces corresponding to the second resource data, whether a service access request originating from the client is received simultaneously under the sub-function interface.
- each service access request received under the sub-function interface is obtained, and whether the source identifier exists and the real-time receiving is detected The source of the business access request identifies the same business access request. If the determination result is yes, the response processing is performed on the real-time received service access request. If the result of the determination is no, step S109 is performed.
- the first resource data is determined.
- the sub-function interface corresponding to each of the associated second resource data and detecting that the service access request originating from the client is not received simultaneously under the sub-function interface, rejecting the response to the current service access request, and ensuring
- the service access request sent by the client is not responded, and the situation that the client cannot load the resource data after the response processing is avoided. Therefore, the reservation of the partial processing thread is realized, and the effective response rate of the service access request is improved.
- the request for the service access can be performed in response.
- the process of the response processing is specifically as shown in FIG. 4, and includes:
- S401 Determine the total number of created threads if the total number of real-time accesses is less than or equal to the maximum allowed concurrent number.
- each thread is divided into multiple parts, so that each part contains one or more threads for processing corresponding to a sub-function interface.
- the response task for a business access request In order to respond to the received service access requests, multiple threads are created in advance, and each thread is divided into multiple parts, so that each part contains one or more threads for processing corresponding to a sub-function interface.
- the total number of real-time accesses of the sub-function interface is less than or equal to the maximum allowed concurrent number, the total number of pre-created threads for processing the service access request is obtained.
- S402 Allocate, according to the total number of created threads, the number of threads matching the concurrent weight coefficient for the sub-function interface.
- the pre-set weighting coefficient corresponding to the sub-function interface in the concurrent control group component is read.
- the concurrent weight coefficient indicates the number of threads that process the service access request from the sub-function interface, and the weight ratio thereof.
- the number of threads to be allocated by the current sub-function interface is calculated according to the total number of created threads.
- the concurrent weight coefficient of the sub-function interface to be called by the currently received service access request is 3
- the total number of created threads is 10
- the number of threads allocated for the sub-function interface that is called for the current business access request is 3. That is, the three threads created in advance specifically respond to the service access request from the sub-function interface.
- S403 Start, in each thread corresponding to the number of threads, any idle thread, and control the idle thread to execute a response task corresponding to the service access request.
- an idle thread represents each thread that is in a task wait state. If there is an idle thread, one of the idle threads performs a response task corresponding to the current service access request. If there is no idle thread, the service access request is stored in a preset message queue, and the monitoring of the allocated threads is maintained. When the listener gets a thread to switch to the idle state, a task response message is issued to enable the thread to read and execute the response task corresponding to the service access request in the message queue.
- the concurrent control weight corresponding to the function interface may be increased in the concurrent control component according to the received scheduling instruction.
- the business function with relatively low importance can appropriately reduce the concurrent weight coefficient corresponding to its functional interface. For example, suppose the total number of threads that can be scheduled by the service system is 12, and the payment sub-function should have a higher priority than the transaction information query sub-function, so the concurrent weight coefficient corresponding to the payment function sub-interface can be set to 3.
- the concurrency weight coefficient corresponding to the transaction information query function sub-interface is set to 1, thereby realizing the flexible allocation of threads, so that different sub-function interfaces can be allocated with the number of threads that are adapted to the importance of their services, so that each sub-function interface
- the received service access request can be processed in time, and does not occupy all the thread resources due to the excessive number of concurrent sub-function interfaces, thereby improving the reliability and stability of the system.
- FIG. 5 shows a specific implementation flow of the concurrent access control method S403 provided by the embodiment of the present application, which is described in detail as follows:
- S4031 Obtain a pre-established access control list, where the access control list is used to store a feature condition of an authorized access host, where the authorized access host has a receiving right of the service access request response information.
- the access control list is used to store the characteristic conditions of the authorized access host, that is, to record the characteristic conditions that the client needs when loading the required resource data.
- the resource data is an access object authorized to access the host, and includes data of each service type.
- Feature conditions include, but are not limited to, the network address, device identification number, request account number, and other hardware and software authentication information of the authorized access host.
- the access control list is read; otherwise, another access control list preset in the system is read.
- S4032 Perform parsing processing on the received service access request to extract a feature identifier of the service access request.
- the flag bit matching the identifier is identified, and Read the feature identifier on this flag.
- the client that sends the service access request does not have access to the resource data, but the service access request still needs to be performed.
- Response processing At this time, in each thread allocated by the sub-function interface requested by the client, any idle thread is started, and one of the idle threads is controlled to make an unauthorized feedback response to the service access request.
- the preset access control list is obtained, and it is determined whether the feature identifier extracted in the service access request matches the feature condition of the authorized access host in the access control list, and is not matched.
- the feedback response is not authorized, so that after receiving the response information, the client can know the reason for the failure of the current interface call, improve the debugging efficiency, and avoid repeatedly issuing the service access request because the response information cannot be received, thus saving
- the data transmission bandwidth resource of the data also improves the response efficiency of the system.
- FIG. 6 is a structural block diagram of a concurrent access control apparatus provided by an embodiment of the present application. For the convenience of explanation, only the parts related to the present embodiment are shown.
- the apparatus includes:
- the receiving unit 61 is configured to receive a service access request initiated by the client.
- the first determining unit 62 is configured to determine, according to the service parameter carried in the service access request, a function interface that is required to be invoked by the service access request and a sub-function interface under the function interface.
- a startup unit 63 configured to start a pre-added concurrency control component, and read an access control parameter stored by the concurrency control component with respect to the sub-function interface under the function interface; wherein the access control parameter includes a maximum Allow concurrent numbers.
- the first obtaining unit 64 is configured to acquire the total number of real-time accesses of the sub-function interface.
- the first rejecting unit 65 is configured to refuse to respond to the service access request if the total number of real-time accesses is greater than the maximum allowed concurrent number.
- the concurrent access control device further includes:
- a second obtaining unit configured to acquire the service access if the total number of real-time accesses is less than or equal to the maximum allowed concurrent number, and the difference between the maximum allowed concurrent number and the total number of real-time accesses is less than a preset threshold Requesting the first resource data requested to be loaded under the sub-function interface.
- a second determining unit configured to detect, in the preset resource relationship library, the second resource data associated with the first resource data, and according to the correspondence between the preset second resource data and the sub-function interface, Determining, respectively, the sub-function interfaces corresponding to the respective second resource data.
- a detecting unit configured to detect, according to the sub-function interface corresponding to each of the second resource data, whether a service access request originating from the client is received simultaneously under the sub-function interface.
- the second rejecting unit is configured to refuse to respond to the service access request if the service access request originating from the client is not received simultaneously under the sub-function interface.
- the access control parameter includes a concurrent weighting coefficient
- the concurrent access control device further includes:
- a third determining unit configured to determine, if the total number of real-time accesses is less than or equal to the maximum allowed concurrent number, determine the total number of created threads.
- An allocating unit configured to allocate, according to the total number of created threads, the number of threads matching the concurrent weight coefficient to the sub-function interface
- the control unit is configured to start any idle thread in each thread corresponding to the number of threads, and control the idle thread to execute a response task corresponding to the service access request.
- control unit includes:
- a first obtaining sub-unit configured to acquire a pre-established access control list, where the access control list is used to store a feature condition of the authorized access host, where the authorized access host has the receiving right of the service access request response information.
- a parsing subunit configured to parse the received service access request to extract a feature identifier of the service access request.
- Activating a subunit configured to start any idle thread in each thread corresponding to the number of threads, if the feature identifier does not match the feature condition stored in the access control list, and control the The idle thread responds to the service access request with an unauthorized feedback.
- the foregoing starting unit 63 includes:
- the second obtaining subunit is configured to acquire a concurrent control time interval.
- a response subunit configured to: if the current system time is not within the concurrency control time interval, the preset concurrency control component is in a closed state, and each activated thread is in accordance with each received service
- the order of access requests sequentially responds to each of the service access requests.
- Reading the subunit if it is detected that the current system time is within the concurrency control time interval, starting a preset concurrency control component, and reading the information about the function interface stored by the concurrency control component The access control parameters of the sub-function interface.
- FIG. 7 is a schematic diagram of a terminal device according to an embodiment of the present application.
- the terminal device 7 of this embodiment includes a processor 70 and a memory 71 in which computer readable instructions 72, such as concurrent access control programs, executable on the processor 70 are stored.
- the processor 70 when executing the computer readable instructions 72, implements the steps in the various embodiments of the various concurrent access control methods described above, such as steps 101 through 105 shown in FIG.
- the processor 70 when executing the computer readable instructions 72, implements the functions of the various modules/units in the various apparatus embodiments described above, such as the functions of the units 61-65 shown in FIG.
- the computer readable instructions 72 may be partitioned into one or more modules/units that are stored in the memory 71 and executed by the processor 70, To complete this application.
- the one or more modules/units may be a series of computer readable instruction segments capable of performing a particular function for describing the execution of the computer readable instructions 72 in the terminal device 7.
- the terminal device 7 may be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server.
- the terminal device may include, but is not limited to, the processor 70 and the memory 71. It will be understood by those skilled in the art that FIG. 7 is only an example of the terminal device 7, and does not constitute a limitation of the terminal device 7, and may include more or less components than those illustrated, or combine some components or different components.
- the terminal device may further include an input/output device, a network access device, a bus, and the like.
- the so-called processor 70 can be a central processing unit (Central Processing Unit, CPU), can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc.
- the general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
- the memory 71 may be an internal storage unit of the terminal device 7, such as a hard disk or a memory of the terminal device 7.
- the memory 71 may also be an external storage device of the terminal device 7, for example, a plug-in hard disk provided on the terminal device 7, a smart memory card (SMC), and a secure digital (SD). Card, flash card, etc. Further, the memory 71 may also include both an internal storage unit of the terminal device 7 and an external storage device.
- the memory 71 is configured to store the computer readable instructions and other programs and data required by the terminal device.
- the memory 71 can also be used to temporarily store data that has been output or is about to be output.
- each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
- the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
- the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
- a computer readable storage medium A number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present application.
- the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like, which can store program codes. .
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer And Data Communications (AREA)
- Debugging And Monitoring (AREA)
Abstract
本方案提供了一种并发访问控制方法、装置、终端设备及介质,适用于计算机技术领域,该方法包括:接收客户端发起的业务访问请求;基于所述业务访问请求所携带的业务参数,确定所述业务访问请求所需调用的功能接口以及所述功能接口下的子功能接口;启动预先添加的并发控制组件,并读取所述并发控制组件所存储的关于所述功能接口下所述子功能接口的访问控制参数;其中,所述访问控制参数包括最大允许并发数;获取所述子功能接口的实时访问总数;若所述实时访问总数大于所述最大允许并发数,则拒绝响应所述业务访问请求。本方案降低了整个系统瘫痪的可能性,保证了其他各个子功能接口的正常访问不受影响,提高了业务系统的稳定性以及可靠性。
Description
本申请要求于2018年04月03日提交中国专利局、申请号为201810288988.4 、发明名称为“并发访问控制方法、终端设备及介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请属于计算机技术领域,尤其涉及一种并发访问控制方法、装置、终端设备及计算机可读存储介质。
面向多用户的分布式网络的普及,促进了网络应用的发展。网络应用更多依赖于后台业务系统所提供的网络资源,由此导致了不同网络应用在同一时刻对于业务系统的并发访问。然而,业务系统所能支持的最大信息点数是有限的,若在同一时刻所需处理的并发访问请求的数目过多,则容易引起业务系统阻塞;并且,业务系统同时响应数目较多的访问请求时,也会导致其中央处理器(Central
Processing Unit,CPU)能耗剧增,这种情况下,提高了业务系统瘫痪的风险。现有技术中,往往是在检测到高并发流量时,就直接阻断后续所接收到的各个访问请求。然而,业务系统所能够提供的网络资源是多样化的,不同的网络资源需要通过不同的接口服务来调取,故现有的并发访问控制策略使得后续所有接口服务均无法正常响应,由此降低了业务系统的可靠性。
有鉴于此,本申请实施例提供了一种并发访问控制方法、装置、终端设备及计算机可读存储介质,以解决现有技术中系统可靠性较为低下的问题。
本申请实施例的第一方面提供了一种并发访问控制方法,包括:
接收客户端发起的业务访问请求;
基于所述业务访问请求所携带的业务参数,确定所述业务访问请求所需调用的功能接口以及所述功能接口下的子功能接口;
启动预先添加的并发控制组件,并读取所述并发控制组件所存储的关于所述功能接口下所述子功能接口的访问控制参数;其中,所述访问控制参数包括最大允许并发数;
获取所述子功能接口的实时访问总数;
若所述实时访问总数大于所述最大允许并发数,则拒绝响应所述业务访问请求。
本申请实施例的第二方面提供了一种并发访问控制装置,所述识别装置包括用于执行上述第一方面所述的并发访问控制方法的单元。
本申请实施例的第三方面提供了一种终端设备,包括存储器以及处理器,所述存储器中存储有可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如第一方面所述的并发访问控制方法的步骤。
本申请实施例的第四方面提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令,所述计算机可读指令被处理器执行时实现如第一方面所述的并发访问控制方法的步骤。
本申请实施例中,通过识别出业务访问请求具体所需调用的功能接口以及子功能接口,并判断当前该子功能接口的实时访问数是否大于最大允许并发数,才确定是否需要响应该业务访问请求,实现了对多并发请求精细化地访问控制,避免了因同时响应多个访问请求而导致业务系统瘫痪的情况发生。并且,由于不同子功能接口的最大允许并发数可以不同,其可根据预先添加的并发控制组件来灵活设置,故得到了针对不同子功能接口的各异的访问控制策略。即使数目较多的业务访问请求均调用相同的子功能接口,也能保证其他子功能接口的正常访问不受影响,不会因一子功能接口的高并发访问而提高整个系统瘫痪的可能性,因此,提高了业务系统的稳定性以及可靠性。
图1是本申请实施例提供的并发访问控制方法的实现流程图;
图2是本申请实施例提供的并发访问控制方法S103的具体实现流程图;
图3是本申请另一实施例提供的并发访问控制方法的实现流程图;
图4是本申请又一实施例提供的并发访问控制方法的实现流程图;
图5是本申请实施例提供的并发访问控制方法S403的具体实现流程图;
图6是本申请实施例提供的并发访问控制装置的结构框图;
图7是本申请实施例提供的终端设备的示意图。
为了说明本申请所述的技术方案,下面通过具体实施例来进行说明。
图1示出了本申请实施例提供的并发访问控制方法的实现流程,该方法流程包括步骤S101至S105。各步骤的具体实现原理如下:
S101:接收客户端发起的业务访问请求。
本申请实施例中,客户端可以是指手机、平板电脑以及服务器等各类终端设备,也可以是指运行于上述各类终端设备中的应用程序,在此不做限定。根据预先提供的访问接口或访问链接,实现与各个客户端之间的业务对接。若检测到上述访问接口或访问链接被调用,则确定接收到客户端所发出的业务访问请求。
S102:基于所述业务访问请求所携带的业务参数,确定所述业务访问请求所需调用的功能接口以及所述功能接口下的子功能接口。
本申请实施例中,客户端所发出的每一业务访问请求均携带有业务参数。上述业务参数包括客户端所需调用的功能接口的一级标识码以及客户端所需调用的子功能接口的二级标识码。
本申请实施例中,对接收到的业务访问请求进行解析处理,以提取出其所包含的功能接口标志位以及子功能接口标志位上所分别记录的标识码。根据预设的一级标识码以及功能接口的对应关系,确定出该业务访问请求所需调用的功能接口。
基于上述确定出的功能接口,获取该功能接口所对应的子功能接口标识码对照表。上述子功能接口标识码对照表用于记录该功能接口下每一个子功能接口所对应的二级标识码。因此,可从该表中确定出业务访问请求所需调用的子功能接口。
示例性地,若对外开放的功能接口为在线交易接口,则该功能接口下的各个子功能接口例如可以是支付子接口、信息查询子接口以及交易记录核实子接口等。
S103:启动预先添加的并发控制组件,并读取所述并发控制组件所存储的关于所述功能接口下所述子功能接口的访问控制参数;其中,所述访问控制参数包括最大允许并发数。
本申请实施例中,为了在原本不具备并发数访问控制功能的系统中增添并发数访问控制功能,获取并安装预先定制开发的并发控制组件。在启动添加完成的并发控制组件后,展示各项子功能接口的参数设置页面。在每一子功能接口的参数设置页面中,根据接收到的参数设置指令,为该子功能接口设置各项访问控制参数。其中,访问控制参数包括但不限于最大允许并发数、并发权重系数以及访问控制列表等。
作为本申请的一个实施例,图2示出了本申请实施例提供的并发访问控制方法S103的具体实现流程,详述如下:
S1031:获取并发控制时间区间。
由于业务访问请求的高并发访问时间段往往是规律性存在的,例如,在每天早上8:00至10:00这一时间段才会接收到数目较多的业务访问请求,因此,为了准确定位并发控制组件的启动时间,避免每时每刻都需要对正常业务访问请求进行并发数判断及控制,本申请实施例中,预先获取管理人员在任务设置页面所输入的并发控制时间区间。上述并发控制时间区间用于表示并发控件组件的启动时间段,则该启动时间段为高并发业务访问的统计时间段。
在任一时刻,若检测到当前的系统时间不在该并发控制时间区间之内,则执行步骤S1032;若检测到当前的系统时间在该并发控制时间区间之内,则执行步骤S1033。
S1032:若检测到当前系统时间不在所述并发控制时间区间之内,则令预设的所述并发控制组件处于关闭状态,并使已启动的各个线程依照已接收到的各个业务访问请求的先后顺序,依序响应各个所述业务访问请求。
本申请实施例中,若当前的系统时间不在并发控制时间区间之内,则不启动预先安装的并发控制组件,即,令并发控制组件之间处于关闭状态。此时,由于不再具备并发控制组件所提供的并发访问控制功能,故在接收到每一业务访问请求时,不再执行步骤S104和S105,而是直接对该业务访问请求进行响应处理。
优选地,由于用于处理业务访问请求的线程的数目可能小于当前时刻所接收到的业务访问请求的数目,故在接收到各个业务访问请求后,依照接收时间的先后顺序,将各个业务访问请求依序存至预先建立的消息队列。令每一线程依次获取消息队列中的一个业务访问请求,以执行对该业务访问请求的响应操作,由此实现了对业务访问请求的有序响应,避免产生竞争冲突。
S1033:若检测到当前系统时间在所述并发控制时间区间之内,则启动预设的并发控制组件,并读取所述并发控制组件所存储的关于所述功能接口下所述子功能接口的访问控制参数。
本申请实施例中,仅在当前的系统时间属于并发控制时间区间之内时,才启动预先安装的并发控制组件,并保持并发控组组件处于启动状态,以在读取并发控制组件所存储的关于功能接口下子功能接口的访问控制参数后,执行后续的步骤S104以及S105。
优选地,在并发控制组件启动后,在检测到并发控组组件的关闭指令时,返回执行上述步骤S1031;或者,在并发控制组件启动后,在并发控制时间区间结束时,返回执行上述步骤S1031。
对于步骤S102中所确定出的功能接口以及功能接口下的子功能接口,在上述并发控制组件所存储的各项访问控制参数中,读取与该功能接口下子功能接口相对应的访问控制参数。具体地,可将功能接口所对应的一级标识符以及子功能接口所对应的二级标识符进行拼接组合,得到查询标识。以该查询标识作为索引词,从而在存储有访问控制参数的信息库中,快速检索出匹配的访问控制参数。
例如,在上一示例中,若在线交易接口所对应的一级标识符为“1”,支付子接口以及交易记录核实子接口所分别对应的二级标识符为“01”以及“02”,则用于查询支付子接口的访问控制参数的查询标识为“101”,用于查询交易记录核实子接口的访问控制参数的查询标识为“102”。基于查询标识“101”所得到的支付子接口的最大允许并发数为a,基于查询标识“102”所得到的交易记录核实子接口的最大允许并发数为b。
S104:获取所述子功能接口的实时访问总数。
本申请实施例中,对各功能接口下每一子功能接口的实时访问总数进行监控。若当前所接收到的业务访问请求所需调用的子功能接口的实时访问总数大于该子功能接口的最大允许并发数,则执行步骤S105。
S105:若所述实时访问总数大于所述最大允许并发数,则拒绝响应所述业务访问请求。
由于最大允许并发数为用户在并发控制组件中所设置的访问控制参数,且最大允许并发数为系统具有最佳性能的状态下,其所能够同时处理的业务访问请求数,因此,为了避免负荷过大而导致系统出现宕机的情况发生,当子功能接口的实时访问总数大于其最大允许并发数时,对当前时刻所接收到的业务访问请求进行拒绝响应处理,由此,节约了系统资源,且能够有效地拦截基于分布式拒绝服务攻击而产生的大量业务访问请求,在一定程度上保障了合法业务访问请求的带宽资源。
本申请实施例实现了对多并发请求精细化地访问控制,避免了因同时响应多个访问请求而导致业务系统瘫痪的情况发生。并且,由于不同子功能接口的最大允许并发数可以不同,其可根据预先添加的并发控制组件来灵活设置,故得到了针对不同子功能接口的各异的访问控制策略。即使数目较多的业务访问请求均调用相同的子功能接口,也能保证其他子功能接口的正常访问不受影响,不会因一子功能接口的高并发访问而提高整个系统瘫痪的可能性,因此,提高了业务系统的稳定性以及可靠性。
作为本申请的另一个实施例,如图2所示,在上述S104之后,还包括:
S106:若所述实时访问总数小于或等于所述最大允许并发数,且所述最大允许并发数与所述实时访问总数的差值小于预设阈值,则获取所述业务访问请求在所述子功能接口下所请求加载的第一资源数据。
本申请实施例中,若当前接收到的业务访问请求所需调用的子功能接口的实时访问总数小于或等于该子功能接口的最大允许并发数,则进一步判断其最大允许并发数与实施访问总数的差值是否小于预设阈值。若判断结果为是,则在业务访问请求所携带的各项业务参数中,读取用于记载资源数据的存储路径的标志位,以获取其请求加载的资源数据的统一资源定位符(Uniform
Resource Locator,URL)。
S107:在预设的资源关系库中,检测所述第一资源数据所关联的各项第二资源数据,并根据预设的第二资源数据与子功能接口的对应关系,确定出各项所述第二资源数据所分别对应的所述子功能接口。
本申请实施例中,资源关系库中存储有对外提供访问的各项资源数据之间的关联关系。例如,若需要加载的资源数据为A,而资源数据A必须依赖于资源数据B的存在才能够正常显示于客户端中,则资源数据A与资源数据B具有关联关系。由于资源数据通常是图标、字符或者文件等各种类型的数据,故为了便于查找以及存储,在资源关系库中记录各项资源数据的URL的关联关系。即,若资源数据A与资源数据B关联,则存在一条记录信息,用于记载资源数据A的URL以及资源数据B的URL的对应关系。
对业务访问请求中所识别得到的资源数据的URL,在上述资源关系库中,查找与URL对应的各个资源数据的URL,并根据该查找得到的URL,读取出关联的资源数据。
由于每一资源数据基于一个或多个子功能接口来提供对外的调用服务,故获取与业务访问请求所请求调用的资源数据相关联的各项资源数据所分别对应的各个子功能接口。
为了便于区分,将上述业务访问请求所需调用的资源数据成为第一资源数据,将关联的其他各项资源数据成为第二资源数据。
S108:对于每一所述第二资源数据所对应所述子功能接口,检测是否在该子功能接口下同时接收到来源于所述客户端的业务访问请求。
本申请实施例中,对于每一第二资源数据所对应任一子功能接口,获取在该子功能接口下所同时接收到的各个业务访问请求,并检测其中是否存在来源标识与上述实时接收到的业务访问请求的来源标识相同的业务访问请求。若判断结果为是,则对上述实时接收到的业务访问请求进行响应处理。若判断结果为否,则执行步骤S109。
S109:若未在该子功能接口下同时接收到来源于所述客户端的业务访问请求,则拒绝响应所述业务访问请求。
若在关联的任一子功能接口中,未接收到来自相同客户端的业务访问请求,则对上述实时接收到的业务访问请求进行拒绝响应处理。
本申请实施例中,在实时访问总数小于或等于最大允许并发数,且最大允许并发数与实时访问总数的差值小于预设阈值时,表示虽然当前子功能接口的并发访问量并未超过最大允许并发数,但剩余的可并发访问量较少,即系统可利用资源较少,因此,通过获取业务访问请求在子功能接口下所请求加载的第一资源数据,确定出与第一资源数据关联的各项第二资源数据所分别对应的子功能接口,并在检测到未在该子功能接口下同时接收到来源于上述客户端的业务访问请求时,拒绝响应当前的业务访问请求,保证了在关联的多项资源数据未被同一客户端同时加载时,不会对该客户端所发出的业务访问请求进行响应,避免了在响应处理后,客户端也无法正常加载资源数据的情况发生,因此,实现了对部分处理线程的保留,提高了业务访问请求的有效响应率,保证了后续在接收到紧急程度较高且有效的业务访问请求时,能够对该业务访问请求进行响应。
在上述各个实施例中,若确定需要对当前实时接收到的业务访问请求进行响应处理,则作为本申请的又一实施例,上述响应处理的过程具体如图4所示,包括:
S401:若所述实时访问总数小于或等于所述最大允许并发数,则确定已创建线程的总数。
为了对接收到的各个业务访问请求进行响应处理,预先创建多个线程,并将各个线程分成多个部分,以使每一部分所包含的一个或多个线程用于处理与一个子功能接口对应的业务访问请求的响应任务。
本申请实施例中,在子功能接口的实时访问总数小于或等于其最大允许并发数时,获取预先创建的用于处理业务访问请求的线程的总数。
S402:根据所述已创建线程的总数,为所述子功能接口分配与所述并发权重系数匹配的线程数。
对于当前接收到的业务访问请求,根据其所需调用的子功能接口,读取在并发控组组件中该子功能接口对应预设的并发权重系数。并发权重系数表示:处理来自该子功能接口的业务访问请求的线程数,其所占的权重比值。
基于当前子功能接口的并发权重系数以及各个子功能接口的并发权重总系数的比值,根据已创建线程的总数,计算出当前子功能接口所需分配的线程数目。
例如,若默认状态下的各个子功能接口的并发权重总系数为10,当前所接收到的业务访问请求所需调用的子功能接口的并发权重系数为3,已创建线程的总数为10,则为当前业务访问请求所需调用的子功能接口所分配的线程数为3。即,以预先创建的三个线程来专门响应来自于该子功能接口的业务访问请求。
S403:在所述线程数所对应的各个线程中,启动任一空闲线程,并控制所述空闲线程执行所述业务访问请求所对应的响应任务。
本申请实施例中,在为当前子功能接口所分配的各个线程中,检测是否存在空闲线程。空闲线程表示处于任务等待状态下的各个线程。若存在空闲线程,则令其中的一个空闲线程执行对当前的业务访问请求所对应的响应任务。若不存在空闲线程,则将该业务访问请求存储至预设的消息队列中,并保持对已分配的各个线程的监听。在监听得到一线程切换至空闲状态时,发出任务响应消息,以使该线程读取并执行与消息队列中该业务访问请求对应的响应任务。
本申请实施例中,由于不同的子功能接口具有不同的重要级别,对于较为重要的业务功能,可根据接收到的调度指令,在并发控制组件中增大其功能接口对应的并发权数,对于重要程度相对较低的业务功能,可适当地降低其功能接口对应的并发权重系数。例如,假设业务系统可调度的线程总数为12,而支付子功能相对于交易信息查询子功能来说应当具有更高的优先级,故可将支付功能子接口对应的并发权重系数设置为3,将交易信息查询功能子接口对应的并发权重系数设置为1,由此实现了对线程的灵活性分配,使得不同的子功能接口能够分配有适应其业务重要程度的线程数,使得各子功能接口所接收到的业务访问请求能够被及时响应处理,不会因某一子功能接口的并发数过多而占领了所有的线程资源,故提高了系统的可靠性以及稳定性。
特别地,作为本申请的一个实施例,图5示出了本申请实施例提供的并发访问控制方法S403的具体实现流程,详述如下:
S4031:获取预先建立的访问控制列表,所述访问控制列表用于存储授权访问主机的特征条件,所述授权访问主机具有业务访问请求响应信息的接收权限。
访问控制列表用于存储授权访问主机的特征条件,即,用于记录客户端在加载所需的资源数据时,其所需具备的特征条件。其中,资源数据为授权访问主机的访问对象,其包括各业务类型的数据。特征条件包括但不限于授权访问主机的网络地址、设备标识号、请求账号以及其他软硬件认证信息等。
本申请实施例中,若并发控制组件中存在管理人员所预先设置的访问控制列表,则读取该访问控制列表;否则,读取系统内部预设的另一访问控制列表。
S4032:对接收到的所述业务访问请求进行解析处理,以提取所述业务访问请求的特征标识。
本申请实施例中,根据访问控制列表中所存储的特征条件所对应的标识符,在接收到的业务访问请求所携带的各项业务参数中,识别出与该标识符匹配的标志位,并读取该标志位上的特征标识。
S4033:若所述特征标识与所述访问控制列表所存储的所述特征条件不匹配,则在所述线程数所对应的各个线程中,启动任一空闲线程,并控制所述空闲线程对所述业务访问请求作出未授权反馈响应。
若读取得到的特征标识与访问控制列表中所存储的各个特征条件均不相符,则表示发出该业务访问请求的客户端不具备资源数据的访问权限,但是,依然要对该业务访问请求进行响应处理。此时,在客户端所请求调用的子功能接口所分配的各个线程中,启动任一空闲线程,并控制其中的一个空闲线程对该业务访问请求作出未授权反馈响应。
本申请实施例中,通过获取预设的访问控制列表,并判断业务访问请求中所提取得到的特征标识与访问控制列表中的授权访问主机的特征条件是否匹配,在不匹配的情况下做出未授权反馈响应,使得客户端在接收到该响应信息后,能够获知当前接口调用失败的原因,提高了排错效率,避免因无法接收到响应信息而重复不断地发出业务访问请求,因此,节省了数据的网络传输带宽资源,由此也提高了系统的响应效率。
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
对应于上文实施例所述的并发访问控制方法,图6示出了本申请实施例提供的并发访问控制装置的结构框图。为了便于说明,仅示出了与本实施例相关的部分。
参照图6,该装置包括:
接收单元61,用于接收客户端发起的业务访问请求。
第一确定单元62,用于基于所述业务访问请求所携带的业务参数,确定所述业务访问请求所需调用的功能接口以及所述功能接口下的子功能接口。
启动单元63,用于启动预先添加的并发控制组件,并读取所述并发控制组件所存储的关于所述功能接口下所述子功能接口的访问控制参数;其中,所述访问控制参数包括最大允许并发数。
第一获取单元64,用于获取所述子功能接口的实时访问总数。
第一拒绝单元65,用于若所述实时访问总数大于所述最大允许并发数,则拒绝响应所述业务访问请求。
可选地,上述并发访问控制装置还包括:
第二获取单元,用于若所述实时访问总数小于或等于所述最大允许并发数,且所述最大允许并发数与所述实时访问总数的差值小于预设阈值,则获取所述业务访问请求在所述子功能接口下所请求加载的第一资源数据。
第二确定单元,用于在预设的资源关系库中,检测所述第一资源数据所关联的各项第二资源数据,并根据预设的第二资源数据与子功能接口的对应关系,确定出各项所述第二资源数据所分别对应的所述子功能接口。
检测单元,用于对于每一所述第二资源数据所对应所述子功能接口,检测是否在该子功能接口下同时接收到来源于所述客户端的业务访问请求。
第二拒绝单元,用于若未在该子功能接口下同时接收到来源于所述客户端的业务访问请求,则拒绝响应所述业务访问请求。
可选地,所述访问控制参数包括并发权重系数,上述并发访问控制装置还包括:
第三确定单元,用于若所述实时访问总数小于或等于所述最大允许并发数,则确定已创建线程的总数。
分配单元,用于根据所述已创建线程的总数,为所述子功能接口分配与所述并发权重系数匹配的线程数;
控制单元,用于在所述线程数所对应的各个线程中,启动任一空闲线程,并控制所述空闲线程执行所述业务访问请求所对应的响应任务。
可选地,上述控制单元包括:
第一获取子单元,用于获取预先建立的访问控制列表,所述访问控制列表用于存储授权访问主机的特征条件,所述授权访问主机具有业务访问请求响应信息的接收权限。
解析子单元,用于对接收到的所述业务访问请求进行解析处理,以提取所述业务访问请求的特征标识。
启动子单元,用于若所述特征标识与所述访问控制列表所存储的所述特征条件不匹配,则在所述线程数所对应的各个线程中,启动任一空闲线程,并控制所述空闲线程对所述业务访问请求作出未授权反馈响应。
可选地,上述启动单元63包括:
第二获取子单元,用于获取并发控制时间区间。
响应子单元,用于若检测到当前系统时间不在所述并发控制时间区间之内,则令预设的所述并发控制组件处于关闭状态,并使已启动的各个线程依照已接收到的各个业务访问请求的先后顺序,依序响应各个所述业务访问请求。
读取子单元,用于若检测到当前系统时间在所述并发控制时间区间之内,则启动预设的并发控制组件,并读取所述并发控制组件所存储的关于所述功能接口下所述子功能接口的访问控制参数。
图7是本申请一实施例提供的终端设备的示意图。如图7所示,该实施例的终端设备7包括:处理器70以及存储器71,所述存储器71中存储有可在所述处理器70上运行的计算机可读指令72,例如并发访问控制程序。所述处理器70执行所述计算机可读指令72时实现上述各个并发访问控制方法实施例中的步骤,例如图1所示的步骤101至105。或者,所述处理器70执行所述计算机可读指令72时实现上述各装置实施例中各模块/单元的功能,例如图6所示单元61至65的功能。
示例性的,所述计算机可读指令72可以被分割成一个或多个模块/单元,所述一个或者多个模块/单元被存储在所述存储器71中,并由所述处理器70执行,以完成本申请。所述一个或多个模块/单元可以是能够完成特定功能的一系列计算机可读指令段,该指令段用于描述所述计算机可读指令72在所述终端设备7中的执行过程。
所述终端设备7可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。所述终端设备可包括,但不仅限于处理器70和存储器71。本领域技术人员可以理解,图7仅仅是终端设备7的示例,并不构成对终端设备7的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述终端设备还可以包括输入输出设备、网络接入设备、总线等。
所称处理器70可以是中央处理单元(Central
Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器 (Digital Signal Processor,DSP)、专用集成电路 (Application
Specific Integrated Circuit,ASIC)、现成可编程门阵列 (Field-Programmable Gate Array,FPGA) 或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
所述存储器71可以是所述终端设备7的内部存储单元,例如终端设备7的硬盘或内存。所述存储器71也可以是所述终端设备7的外部存储设备,例如所述终端设备7上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,所述存储器71还可以既包括所述终端设备7的内部存储单元也包括外部存储设备。所述存储器71用于存储所述计算机可读指令以及所述终端设备所需的其他程序和数据。所述存储器71还可以用于暂时地存储已经输出或者将要输出的数据。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。
Claims (20)
- 一种并发访问控制方法,其特征在于,包括:接收客户端发起的业务访问请求;基于所述业务访问请求所携带的业务参数,确定所述业务访问请求所需调用的功能接口以及所述功能接口下的子功能接口;启动预先添加的并发控制组件,并读取所述并发控制组件所存储的关于所述功能接口下所述子功能接口的访问控制参数;其中,所述访问控制参数包括最大允许并发数;获取所述子功能接口的实时访问总数;若所述实时访问总数大于所述最大允许并发数,则拒绝响应所述业务访问请求。
- 如权利要求1所述的并发访问控制方法,其特征在于,还包括:若所述实时访问总数小于或等于所述最大允许并发数,且所述最大允许并发数与所述实时访问总数的差值小于预设阈值,则获取所述业务访问请求在所述子功能接口下所请求加载的第一资源数据;在预设的资源关系库中,检测所述第一资源数据所关联的各项第二资源数据,并根据预设的第二资源数据与子功能接口的对应关系,确定出各项所述第二资源数据所分别对应的所述子功能接口;对于每一所述第二资源数据所对应所述子功能接口,检测是否在该子功能接口下同时接收到来源于所述客户端的业务访问请求;若未在该子功能接口下同时接收到来源于所述客户端的业务访问请求,则拒绝响应所述业务访问请求。
- 如权利要求1所述的并发访问控制方法,其特征在于,所述访问控制参数还包括并发权重系数,则所述并发访问控制方法还包括:若所述实时访问总数小于或等于所述最大允许并发数,则确定已创建线程的总数;根据所述已创建线程的总数,为所述子功能接口分配与所述并发权重系数匹配的线程数;在所述线程数所对应的各个线程中,启动任一空闲线程,并控制所述空闲线程执行所述业务访问请求所对应的响应任务。
- 如权利要求3所述的并发访问控制方法,其特征在于,所述在所述线程数所对应的各个线程中,启动任一空闲线程,并控制所述空闲线程执行所述业务访问请求所对应的响应任务,包括:获取预先建立的访问控制列表,所述访问控制列表用于存储授权访问主机的特征条件,所述授权访问主机具有业务访问请求响应信息的接收权限;对接收到的所述业务访问请求进行解析处理,以提取所述业务访问请求的特征标识;若所述特征标识与所述访问控制列表所存储的所述特征条件不匹配,则在所述线程数所对应的各个线程中,启动任一空闲线程,并控制所述空闲线程对所述业务访问请求作出未授权反馈响应。
- 如权利要求1所述的并发访问控制方法,其特征在于,所述启动预设的并发控制组件,并读取所述并发控制组件所存储的关于所述功能接口下所述子功能接口的访问控制参数,包括:获取并发控制时间区间;若检测到当前系统时间不在所述并发控制时间区间之内,则令预设的所述并发控制组件处于关闭状态,并使已启动的各个线程依照已接收到的各个业务访问请求的先后顺序,依序响应各个所述业务访问请求;若检测到当前系统时间在所述并发控制时间区间之内,则启动预设的并发控制组件,并读取所述并发控制组件所存储的关于所述功能接口下所述子功能接口的访问控制参数。
- 一种并发访问控制装置,其特征在于,包括:接收单元,用于接收客户端发起的业务访问请求;第一确定单元,用于基于所述业务访问请求所携带的业务参数,确定所述业务访问请求所需调用的功能接口以及所述功能接口下的子功能接口;启动单元,用于启动预先添加的并发控制组件,并读取所述并发控制组件所存储的关于所述功能接口下所述子功能接口的访问控制参数;其中,所述访问控制参数包括最大允许并发数;第一获取单元,用于获取所述子功能接口的实时访问总数;第一拒绝单元,用于若所述实时访问总数大于所述最大允许并发数,则拒绝响应所述业务访问请求。
- 根据权利要求6所述的并发访问控制装置,其特征在于,还包括:第二获取单元,用于若所述实时访问总数小于或等于所述最大允许并发数,且所述最大允许并发数与所述实时访问总数的差值小于预设阈值,则获取所述业务访问请求在所述子功能接口下所请求加载的第一资源数据;第二确定单元,用于在预设的资源关系库中,检测所述第一资源数据所关联的各项第二资源数据,并根据预设的第二资源数据与子功能接口的对应关系,确定出各项所述第二资源数据所分别对应的所述子功能接口;检测单元,用于对于每一所述第二资源数据所对应所述子功能接口,检测是否在该子功能接口下同时接收到来源于所述客户端的业务访问请求;第二拒绝单元,用于若未在该子功能接口下同时接收到来源于所述客户端的业务访问请求,则拒绝响应所述业务访问请求。
- 根据权利要求6所述的并发访问控制装置,其特征在于,所述访问控制参数包括并发权重系数,所述并发访问控制装置还包括:第三确定单元,用于若所述实时访问总数小于或等于所述最大允许并发数,则确定已创建线程的总数;分配单元,用于根据所述已创建线程的总数,为所述子功能接口分配与所述并发权重系数匹配的线程数;控制单元,用于在所述线程数所对应的各个线程中,启动任一空闲线程,并控制所述空闲线程执行所述业务访问请求所对应的响应任务。
- 根据权利要求8所述的并发访问控制装置,其特征在于,所述控制单元包括:第一获取子单元,用于获取预先建立的访问控制列表,所述访问控制列表用于存储授权访问主机的特征条件,所述授权访问主机具有业务访问请求响应信息的接收权限;解析子单元,用于对接收到的所述业务访问请求进行解析处理,以提取所述业务访问请求的特征标识;启动子单元,用于若所述特征标识与所述访问控制列表所存储的所述特征条件不匹配,则在所述线程数所对应的各个线程中,启动任一空闲线程,并控制所述空闲线程对所述业务访问请求作出未授权反馈响应。
- 根据权利要求6所述的并发访问控制装置,其特征在于,所述启动单元包括:第二获取子单元,用于获取并发控制时间区间;响应子单元,用于若检测到当前系统时间不在所述并发控制时间区间之内,则令预设的所述并发控制组件处于关闭状态,并使已启动的各个线程依照已接收到的各个业务访问请求的先后顺序,依序响应各个所述业务访问请求;读取子单元,用于若检测到当前系统时间在所述并发控制时间区间之内,则启动预设的并发控制组件,并读取所述并发控制组件所存储的关于所述功能接口下所述子功能接口的访问控制参数。
- 一种终端设备,其特征在于,包括存储器以及处理器,所述存储器中存储有可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如下步骤:接收客户端发起的业务访问请求;基于所述业务访问请求所携带的业务参数,确定所述业务访问请求所需调用的功能接口以及所述功能接口下的子功能接口;启动预先添加的并发控制组件,并读取所述并发控制组件所存储的关于所述功能接口下所述子功能接口的访问控制参数;其中,所述访问控制参数包括最大允许并发数;获取所述子功能接口的实时访问总数;若所述实时访问总数大于所述最大允许并发数,则拒绝响应所述业务访问请求。
- 根据权利要求11所述的终端设备,其特征在于,所述处理器执行所述计算机可读指令时还实现如下步骤:若所述实时访问总数小于或等于所述最大允许并发数,且所述最大允许并发数与所述实时访问总数的差值小于预设阈值,则获取所述业务访问请求在所述子功能接口下所请求加载的第一资源数据;在预设的资源关系库中,检测所述第一资源数据所关联的各项第二资源数据,并根据预设的第二资源数据与子功能接口的对应关系,确定出各项所述第二资源数据所分别对应的所述子功能接口;对于每一所述第二资源数据所对应所述子功能接口,检测是否在该子功能接口下同时接收到来源于所述客户端的业务访问请求;若未在该子功能接口下同时接收到来源于所述客户端的业务访问请求,则拒绝响应所述业务访问请求。
- 根据权利要求11所述的终端设备,其特征在于,所述访问控制参数还包括并发权重系数,则所述处理器执行所述计算机可读指令时还实现如下步骤:若所述实时访问总数小于或等于所述最大允许并发数,则确定已创建线程的总数;根据所述已创建线程的总数,为所述子功能接口分配与所述并发权重系数匹配的线程数;在所述线程数所对应的各个线程中,启动任一空闲线程,并控制所述空闲线程执行所述业务访问请求所对应的响应任务。
- 根据权利要求13所述的终端设备,其特征在于,所述在所述线程数所对应的各个线程中,启动任一空闲线程,并控制所述空闲线程执行所述业务访问请求所对应的响应任务,包括:获取预先建立的访问控制列表,所述访问控制列表用于存储授权访问主机的特征条件,所述授权访问主机具有业务访问请求响应信息的接收权限;对接收到的所述业务访问请求进行解析处理,以提取所述业务访问请求的特征标识;若所述特征标识与所述访问控制列表所存储的所述特征条件不匹配,则在所述线程数所对应的各个线程中,启动任一空闲线程,并控制所述空闲线程对所述业务访问请求作出未授权反馈响应。
- 根据权利要求11所述的终端设备,其特征在于,所述启动预设的并发控制组件,并读取所述并发控制组件所存储的关于所述功能接口下所述子功能接口的访问控制参数,包括:获取并发控制时间区间;若检测到当前系统时间不在所述并发控制时间区间之内,则令预设的所述并发控制组件处于关闭状态,并使已启动的各个线程依照已接收到的各个业务访问请求的先后顺序,依序响应各个所述业务访问请求;若检测到当前系统时间在所述并发控制时间区间之内,则启动预设的并发控制组件,并读取所述并发控制组件所存储的关于所述功能接口下所述子功能接口的访问控制参数。
- 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令,其特征在于,所述计算机可读指令被至少一个处理器执行时实现如下步骤:接收客户端发起的业务访问请求;基于所述业务访问请求所携带的业务参数,确定所述业务访问请求所需调用的功能接口以及所述功能接口下的子功能接口;启动预先添加的并发控制组件,并读取所述并发控制组件所存储的关于所述功能接口下所述子功能接口的访问控制参数;其中,所述访问控制参数包括最大允许并发数;获取所述子功能接口的实时访问总数;若所述实时访问总数大于所述最大允许并发数,则拒绝响应所述业务访问请求。
- 根据权利要求16所述的计算机可读存储介质,其特征在于,所述计算机可读指令被至少一个处理器执行时还实现如下步骤:若所述实时访问总数小于或等于所述最大允许并发数,且所述最大允许并发数与所述实时访问总数的差值小于预设阈值,则获取所述业务访问请求在所述子功能接口下所请求加载的第一资源数据;在预设的资源关系库中,检测所述第一资源数据所关联的各项第二资源数据,并根据预设的第二资源数据与子功能接口的对应关系,确定出各项所述第二资源数据所分别对应的所述子功能接口;对于每一所述第二资源数据所对应所述子功能接口,检测是否在该子功能接口下同时接收到来源于所述客户端的业务访问请求;若未在该子功能接口下同时接收到来源于所述客户端的业务访问请求,则拒绝响应所述业务访问请求。
- 根据权利要求16所述的计算机可读存储介质,其特征在于,所述访问控制参数还包括并发权重系数,则所述计算机可读指令被至少一个处理器执行时还实现如下步骤:根据所述已创建线程的总数,为所述子功能接口分配与所述并发权重系数匹配的线程数;在所述线程数所对应的各个线程中,启动任一空闲线程,并控制所述空闲线程执行所述业务访问请求所对应的响应任务。
- 根据权利要求18所述的计算机可读存储介质,其特征在于,所述在所述线程数所对应的各个线程中,启动任一空闲线程,并控制所述空闲线程执行所述业务访问请求所对应的响应任务,包括:获取预先建立的访问控制列表,所述访问控制列表用于存储授权访问主机的特征条件,所述授权访问主机具有业务访问请求响应信息的接收权限;对接收到的所述业务访问请求进行解析处理,以提取所述业务访问请求的特征标识;若所述特征标识与所述访问控制列表所存储的所述特征条件不匹配,则在所述线程数所对应的各个线程中,启动任一空闲线程,并控制所述空闲线程对所述业务访问请求作出未授权反馈响应。
- 根据权利要求16所述的计算机可读存储介质,其特征在于,所述启动预设的并发控制组件,并读取所述并发控制组件所存储的关于所述功能接口下所述子功能接口的访问控制参数,包括:获取并发控制时间区间;若检测到当前系统时间不在所述并发控制时间区间之内,则令预设的所述并发控制组件处于关闭状态,并使已启动的各个线程依照已接收到的各个业务访问请求的先后顺序,依序响应各个所述业务访问请求;若检测到当前系统时间在所述并发控制时间区间之内,则启动预设的并发控制组件,并读取所述并发控制组件所存储的关于所述功能接口下所述子功能接口的访问控制参数。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810288988.4A CN108683604B (zh) | 2018-04-03 | 2018-04-03 | 并发访问控制方法、终端设备及介质 |
CN201810288988.4 | 2018-04-03 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2019192103A1 true WO2019192103A1 (zh) | 2019-10-10 |
Family
ID=63800274
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2018/096262 WO2019192103A1 (zh) | 2018-04-03 | 2018-07-19 | 并发访问控制方法、装置、终端设备及介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN108683604B (zh) |
WO (1) | WO2019192103A1 (zh) |
Cited By (25)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111162934A (zh) * | 2019-12-13 | 2020-05-15 | 微民保险代理有限公司 | 业务服务的测试方法和装置、存储介质、电子装置 |
CN111324520A (zh) * | 2020-03-06 | 2020-06-23 | 五八有限公司 | 业务接口的监控方法、装置、电子设备及存储介质 |
CN111343240A (zh) * | 2020-02-12 | 2020-06-26 | 北京字节跳动网络技术有限公司 | 一种服务请求的处理方法、装置、电子设备及存储介质 |
CN111522836A (zh) * | 2020-04-22 | 2020-08-11 | 杭州海康威视系统技术有限公司 | 一种数据查询方法、装置、电子设备及存储介质 |
CN111541620A (zh) * | 2020-06-18 | 2020-08-14 | 南方电网科学研究院有限责任公司 | 一种微服务运行管控方法和装置 |
CN111581087A (zh) * | 2020-04-29 | 2020-08-25 | 郑州阿帕斯数云信息科技有限公司 | 应用程序测试方法和装置 |
CN111767093A (zh) * | 2020-06-29 | 2020-10-13 | 北京字节跳动网络技术有限公司 | 数据处理方法、设备和存储介质 |
CN111767163A (zh) * | 2020-06-17 | 2020-10-13 | 北京思特奇信息技术股份有限公司 | 一种避免应用服务器因交易并发量过大造成宕机的方法及系统 |
CN111782378A (zh) * | 2020-07-29 | 2020-10-16 | 平安银行股份有限公司 | 自适应性的处理性能调整方法、服务器及可读存储介质 |
CN112416257A (zh) * | 2020-12-02 | 2021-02-26 | 北京中指讯博数据信息技术有限公司 | 资源存储方法及装置 |
CN112417428A (zh) * | 2020-11-18 | 2021-02-26 | 北京金山云网络技术有限公司 | 用户权限的配置方法、业务资源的访问方法及装置 |
CN112486765A (zh) * | 2020-11-25 | 2021-03-12 | 山东中创软件商用中间件股份有限公司 | java应用接口管理方法、系统、装置及计算机可读存储介质 |
CN113010272A (zh) * | 2021-03-18 | 2021-06-22 | 中国建设银行股份有限公司 | 一种交易并发数控制方法及其相关设备 |
CN113254180A (zh) * | 2021-06-03 | 2021-08-13 | 杭州海康威视数字技术股份有限公司 | 一种数据匹配方法、装置、电子设备及存储介质 |
CN113253994A (zh) * | 2021-06-07 | 2021-08-13 | 北京明略昭辉科技有限公司 | 基于JavaScript可指定并发数的并发请求处理方法及系统 |
CN113485852A (zh) * | 2021-05-31 | 2021-10-08 | 济南浪潮数据技术有限公司 | 分布式对象存储系统的用量统计信息下刷方法和装置 |
CN113591075A (zh) * | 2021-07-26 | 2021-11-02 | 深信服科技股份有限公司 | 终端安全管控方法、装置及存储介质 |
CN114610414A (zh) * | 2022-03-22 | 2022-06-10 | 未鲲(上海)科技服务有限公司 | 一种调用整合接口的方法、装置、计算机设备和存储介质 |
CN114661554A (zh) * | 2022-03-30 | 2022-06-24 | 中国建设银行股份有限公司 | 一种确定流控数据的方法、装置及设备 |
CN115086429A (zh) * | 2022-05-16 | 2022-09-20 | 鼎捷软件股份有限公司 | 请求集成系统及请求集成方法 |
CN115421931A (zh) * | 2022-11-07 | 2022-12-02 | 深圳市明源云科技有限公司 | 业务线程控制方法、装置、电子设备及可读存储介质 |
CN115801682A (zh) * | 2022-11-09 | 2023-03-14 | 度小满科技(北京)有限公司 | 访问控制方法、装置、终端及存储介质 |
CN115801891A (zh) * | 2022-11-08 | 2023-03-14 | 北京沃东天骏信息技术有限公司 | 一种请求处理方法和装置 |
CN115934480A (zh) * | 2023-03-15 | 2023-04-07 | 浪潮电子信息产业股份有限公司 | 一种任务监控方法、系统、装置及计算机可读存储介质 |
CN116489090A (zh) * | 2023-06-16 | 2023-07-25 | 北京百度网讯科技有限公司 | 流量控制方法、装置、系统、电子设备及存储介质 |
Families Citing this family (29)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109842610B (zh) * | 2018-12-13 | 2022-07-26 | 平安科技(深圳)有限公司 | 接口请求处理方法、装置、计算机设备及存储介质 |
CN109901933B (zh) * | 2019-01-18 | 2022-02-25 | 口碑(上海)信息技术有限公司 | 业务系统的操作方法及装置、存储介质、电子装置 |
CN110401653A (zh) * | 2019-07-23 | 2019-11-01 | 苏州浪潮智能科技有限公司 | 一种请求过滤方法和装置 |
WO2021068205A1 (zh) * | 2019-10-11 | 2021-04-15 | 深圳市欢太科技有限公司 | 访问控制方法、装置、服务器和计算机可读介质 |
CN110932987A (zh) * | 2019-10-28 | 2020-03-27 | 苏宁云计算有限公司 | 用于流控url连接数的方法及装置 |
CN110851243B (zh) * | 2019-11-05 | 2022-04-12 | 东软集团股份有限公司 | 流程访问控制方法、装置、存储介质及电子设备 |
CN111158926B (zh) * | 2019-12-12 | 2024-01-30 | 口碑(上海)信息技术有限公司 | 业务请求分析方法、装置及设备 |
CN111212031A (zh) * | 2019-12-12 | 2020-05-29 | 北京淇瑀信息科技有限公司 | 一种接口访问频率的控制方法、装置、电子设备和存储介质 |
CN111367637B (zh) * | 2020-03-03 | 2023-05-12 | 蚂蚁胜信(上海)信息技术有限公司 | 任务处理方法及装置 |
CN111309490A (zh) * | 2020-03-26 | 2020-06-19 | 北京奇艺世纪科技有限公司 | 一种资源分配方法、装置、电子设备及存储介质 |
CN113468214B (zh) * | 2020-03-30 | 2022-04-29 | 阿里巴巴集团控股有限公司 | 数据库访问控制方法、装置、电子设备及可读存储介质 |
CN111262794B (zh) * | 2020-04-03 | 2022-11-15 | 中国建设银行股份有限公司 | 网关的流量控制方法及装置 |
CN111835823B (zh) * | 2020-05-28 | 2023-03-24 | 福建天泉教育科技有限公司 | 一种访问限流方法及终端 |
CN111817970B (zh) * | 2020-05-28 | 2022-10-21 | 福建天泉教育科技有限公司 | 一种页面限流方法及终端 |
CN111737020A (zh) * | 2020-06-24 | 2020-10-02 | 广联达科技股份有限公司 | 分布式集群的并发处理方法及装置 |
CN112003722A (zh) * | 2020-07-15 | 2020-11-27 | 北京三快在线科技有限公司 | 一种数据处理方法、装置、边缘节点及存储介质 |
CN111949911A (zh) * | 2020-07-31 | 2020-11-17 | 银盛支付服务股份有限公司 | 一种基于Redis计数器的后台并发控制方法 |
CN113760370A (zh) * | 2021-01-29 | 2021-12-07 | 北京沃东天骏信息技术有限公司 | 一种实现并发访问的方法、设备和计算机可读存储介质 |
CN112764937B (zh) * | 2021-01-29 | 2022-04-15 | 中国平安人寿保险股份有限公司 | 访问量控制方法、装置、计算机设备及存储介质 |
CN112804254B (zh) * | 2021-02-07 | 2022-10-28 | 成都薯片科技有限公司 | 请求检测方法、装置、电子设备及存储介质 |
CN115114010A (zh) * | 2021-03-19 | 2022-09-27 | 北京金山云网络技术有限公司 | 服务访问控制方法、装置、电子设备及存储介质 |
CN113114505B (zh) * | 2021-04-13 | 2022-07-12 | 广州海鹚网络科技有限公司 | 基于httpClient的访问请求处理方法及系统 |
CN113852663B (zh) * | 2021-08-18 | 2024-07-16 | 北京达佳互联信息技术有限公司 | 一种网络请求的处理方法、装置及网络请求处理系统 |
CN113726683B (zh) * | 2021-09-09 | 2023-08-15 | 海尔数字科技(青岛)有限公司 | 访问限流方法、装置、设备、存储介质及计算机程序产品 |
CN113746724B (zh) * | 2021-11-05 | 2022-04-12 | 阿里云计算有限公司 | 消息传输方法、装置、电子设备及介质 |
CN114265558B (zh) * | 2021-12-23 | 2023-06-27 | 苏州优鲜信网络生活服务科技有限公司 | 一种具有数据通道的多线程集单系统及数据存储装置 |
CN114296823A (zh) * | 2021-12-29 | 2022-04-08 | 深圳市华宇讯科技有限公司 | 用于业务模块间解耦的信息处理方法及装置 |
CN114327899A (zh) * | 2021-12-29 | 2022-04-12 | 中国电信股份有限公司 | 响应访问请求的方法、装置、非易失性存储介质及处理器 |
CN115002225B (zh) * | 2022-05-07 | 2025-01-03 | 阿里巴巴(中国)有限公司 | 一种请求处理方法、装置及可读介质 |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102122288A (zh) * | 2010-12-21 | 2011-07-13 | 北京高森明晨信息科技有限公司 | 一种并发控制的方法及系统 |
CN102136096A (zh) * | 2010-12-15 | 2011-07-27 | 华为软件技术有限公司 | 业务动态流控方法、装置和一种并发控制系统 |
CN102999377A (zh) * | 2012-11-30 | 2013-03-27 | 北京东方通科技股份有限公司 | 服务并发访问控制方法及装置 |
CN103369601A (zh) * | 2013-07-15 | 2013-10-23 | 厦门卓讯信息技术有限公司 | 为手机客户端提供大并发处理及流量控制的方法 |
CN104021190A (zh) * | 2014-06-13 | 2014-09-03 | 中国民航信息网络股份有限公司 | 精细化并发控制装置及方法 |
WO2016188282A1 (zh) * | 2015-05-25 | 2016-12-01 | 阿里巴巴集团控股有限公司 | 一种消息处理方法、装置及系统 |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103379040B (zh) * | 2012-04-24 | 2016-08-31 | 阿里巴巴集团控股有限公司 | 一种高并发系统中控制并发数的装置和方法 |
CN103873509B (zh) * | 2012-12-12 | 2017-06-20 | 中国移动通信集团浙江有限公司 | 一种ejb服务过载保护方法和系统 |
CN104317944B (zh) * | 2014-10-31 | 2018-07-06 | 上海实方软件有限公司 | 一种基于公式的时间戳动态调整并发控制方法 |
CN104408088B (zh) * | 2014-11-11 | 2020-06-19 | 奇安信科技集团股份有限公司 | 并发请求的控制方法及装置 |
-
2018
- 2018-04-03 CN CN201810288988.4A patent/CN108683604B/zh active Active
- 2018-07-19 WO PCT/CN2018/096262 patent/WO2019192103A1/zh active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102136096A (zh) * | 2010-12-15 | 2011-07-27 | 华为软件技术有限公司 | 业务动态流控方法、装置和一种并发控制系统 |
CN102122288A (zh) * | 2010-12-21 | 2011-07-13 | 北京高森明晨信息科技有限公司 | 一种并发控制的方法及系统 |
CN102999377A (zh) * | 2012-11-30 | 2013-03-27 | 北京东方通科技股份有限公司 | 服务并发访问控制方法及装置 |
CN103369601A (zh) * | 2013-07-15 | 2013-10-23 | 厦门卓讯信息技术有限公司 | 为手机客户端提供大并发处理及流量控制的方法 |
CN104021190A (zh) * | 2014-06-13 | 2014-09-03 | 中国民航信息网络股份有限公司 | 精细化并发控制装置及方法 |
WO2016188282A1 (zh) * | 2015-05-25 | 2016-12-01 | 阿里巴巴集团控股有限公司 | 一种消息处理方法、装置及系统 |
Cited By (37)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111162934A (zh) * | 2019-12-13 | 2020-05-15 | 微民保险代理有限公司 | 业务服务的测试方法和装置、存储介质、电子装置 |
CN111162934B (zh) * | 2019-12-13 | 2023-01-03 | 微民保险代理有限公司 | 业务服务的测试方法和装置、存储介质、电子装置 |
CN111343240A (zh) * | 2020-02-12 | 2020-06-26 | 北京字节跳动网络技术有限公司 | 一种服务请求的处理方法、装置、电子设备及存储介质 |
CN111324520A (zh) * | 2020-03-06 | 2020-06-23 | 五八有限公司 | 业务接口的监控方法、装置、电子设备及存储介质 |
CN111522836A (zh) * | 2020-04-22 | 2020-08-11 | 杭州海康威视系统技术有限公司 | 一种数据查询方法、装置、电子设备及存储介质 |
CN111522836B (zh) * | 2020-04-22 | 2023-10-10 | 杭州海康威视系统技术有限公司 | 一种数据查询方法、装置、电子设备及存储介质 |
CN111581087A (zh) * | 2020-04-29 | 2020-08-25 | 郑州阿帕斯数云信息科技有限公司 | 应用程序测试方法和装置 |
CN111581087B (zh) * | 2020-04-29 | 2022-11-29 | 郑州阿帕斯数云信息科技有限公司 | 应用程序测试方法和装置 |
CN111767163A (zh) * | 2020-06-17 | 2020-10-13 | 北京思特奇信息技术股份有限公司 | 一种避免应用服务器因交易并发量过大造成宕机的方法及系统 |
CN111541620A (zh) * | 2020-06-18 | 2020-08-14 | 南方电网科学研究院有限责任公司 | 一种微服务运行管控方法和装置 |
CN111767093A (zh) * | 2020-06-29 | 2020-10-13 | 北京字节跳动网络技术有限公司 | 数据处理方法、设备和存储介质 |
CN111767093B (zh) * | 2020-06-29 | 2023-08-08 | 抖音视界有限公司 | 数据处理方法、设备和存储介质 |
CN111782378A (zh) * | 2020-07-29 | 2020-10-16 | 平安银行股份有限公司 | 自适应性的处理性能调整方法、服务器及可读存储介质 |
CN111782378B (zh) * | 2020-07-29 | 2024-04-16 | 平安银行股份有限公司 | 自适应性的处理性能调整方法、服务器及可读存储介质 |
CN112417428A (zh) * | 2020-11-18 | 2021-02-26 | 北京金山云网络技术有限公司 | 用户权限的配置方法、业务资源的访问方法及装置 |
CN112486765A (zh) * | 2020-11-25 | 2021-03-12 | 山东中创软件商用中间件股份有限公司 | java应用接口管理方法、系统、装置及计算机可读存储介质 |
CN112416257A (zh) * | 2020-12-02 | 2021-02-26 | 北京中指讯博数据信息技术有限公司 | 资源存储方法及装置 |
CN113010272A (zh) * | 2021-03-18 | 2021-06-22 | 中国建设银行股份有限公司 | 一种交易并发数控制方法及其相关设备 |
CN113485852A (zh) * | 2021-05-31 | 2021-10-08 | 济南浪潮数据技术有限公司 | 分布式对象存储系统的用量统计信息下刷方法和装置 |
CN113485852B (zh) * | 2021-05-31 | 2024-02-13 | 济南浪潮数据技术有限公司 | 分布式对象存储系统的用量统计信息下刷方法和装置 |
CN113254180A (zh) * | 2021-06-03 | 2021-08-13 | 杭州海康威视数字技术股份有限公司 | 一种数据匹配方法、装置、电子设备及存储介质 |
CN113254180B (zh) * | 2021-06-03 | 2023-10-10 | 杭州海康威视数字技术股份有限公司 | 一种数据匹配方法、装置、电子设备及存储介质 |
CN113253994A (zh) * | 2021-06-07 | 2021-08-13 | 北京明略昭辉科技有限公司 | 基于JavaScript可指定并发数的并发请求处理方法及系统 |
CN113591075B (zh) * | 2021-07-26 | 2023-11-07 | 深信服科技股份有限公司 | 终端安全管控方法、装置及存储介质 |
CN113591075A (zh) * | 2021-07-26 | 2021-11-02 | 深信服科技股份有限公司 | 终端安全管控方法、装置及存储介质 |
CN114610414A (zh) * | 2022-03-22 | 2022-06-10 | 未鲲(上海)科技服务有限公司 | 一种调用整合接口的方法、装置、计算机设备和存储介质 |
CN114661554A (zh) * | 2022-03-30 | 2022-06-24 | 中国建设银行股份有限公司 | 一种确定流控数据的方法、装置及设备 |
CN115086429B (zh) * | 2022-05-16 | 2024-02-13 | 鼎捷软件股份有限公司 | 请求集成系统及请求集成方法 |
CN115086429A (zh) * | 2022-05-16 | 2022-09-20 | 鼎捷软件股份有限公司 | 请求集成系统及请求集成方法 |
CN115421931B (zh) * | 2022-11-07 | 2023-03-28 | 深圳市明源云科技有限公司 | 业务线程控制方法、装置、电子设备及可读存储介质 |
CN115421931A (zh) * | 2022-11-07 | 2022-12-02 | 深圳市明源云科技有限公司 | 业务线程控制方法、装置、电子设备及可读存储介质 |
CN115801891A (zh) * | 2022-11-08 | 2023-03-14 | 北京沃东天骏信息技术有限公司 | 一种请求处理方法和装置 |
CN115801682A (zh) * | 2022-11-09 | 2023-03-14 | 度小满科技(北京)有限公司 | 访问控制方法、装置、终端及存储介质 |
CN115934480B (zh) * | 2023-03-15 | 2023-06-16 | 浪潮电子信息产业股份有限公司 | 一种任务监控方法、系统、装置及计算机可读存储介质 |
CN115934480A (zh) * | 2023-03-15 | 2023-04-07 | 浪潮电子信息产业股份有限公司 | 一种任务监控方法、系统、装置及计算机可读存储介质 |
CN116489090A (zh) * | 2023-06-16 | 2023-07-25 | 北京百度网讯科技有限公司 | 流量控制方法、装置、系统、电子设备及存储介质 |
CN116489090B (zh) * | 2023-06-16 | 2023-10-24 | 北京百度网讯科技有限公司 | 流量控制方法、装置、系统、电子设备及存储介质 |
Also Published As
Publication number | Publication date |
---|---|
CN108683604A (zh) | 2018-10-19 |
CN108683604B (zh) | 2021-11-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2019192103A1 (zh) | 并发访问控制方法、装置、终端设备及介质 | |
CN110489417B (zh) | 一种数据处理方法及相关设备 | |
US10430332B2 (en) | System and method for performance tuning of garbage collection algorithms | |
US9344371B1 (en) | Dynamic throttling systems and services | |
CN111756644B (zh) | 热点限流方法、系统、设备及存储介质 | |
WO2017016422A1 (zh) | 一种基于云的数据库的检测方法和装置 | |
WO2019080429A1 (zh) | 电子装置、访问请求控制方法和计算机可读存储介质 | |
CN111901249A (zh) | 业务限流方法、装置、设备及存储介质 | |
WO2020000716A1 (zh) | 大数据分析系统、服务器、数据处理方法、程序和存储介质 | |
WO2021013033A1 (zh) | 文件操作方法、装置、设备、系统及计算机可读存储介质 | |
CN113691575B (zh) | 通信方法、装置及系统 | |
CN106933664A (zh) | 一种Hadoop集群的资源调度方法及装置 | |
CN111382206A (zh) | 一种数据存储方法及装置 | |
CN114928579A (zh) | 数据处理方法、装置、计算机设备及存储介质 | |
CN111367694A (zh) | 事件处理方法、服务器及计算机存储介质 | |
CN113326153A (zh) | 一种业务请求的处理方法及装置 | |
WO2021051576A1 (zh) | 弹性执行热容器方法、装置、设备和存储介质 | |
CN110120963B (zh) | 一种数据处理方法、装置、设备和机器可读介质 | |
CN118677940A (zh) | 传输控制协议连接的管理系统、方法、装置及存储介质 | |
CN114070820A (zh) | 一种域名重定向方法、装置、介质及电子设备 | |
CN115935328A (zh) | 资源访问控制方法、装置、设备及存储介质 | |
CN114153595A (zh) | 请求处理方法、装置、设备及计算机可读存储介质 | |
US20140280347A1 (en) | Managing Digital Files with Shared Locks | |
CN112528339A (zh) | 一种基于Caché数据库的数据脱敏方法及电子设备 | |
CN111611259B (zh) | 接口请求处理方法、装置、系统及计算机可读存储介质 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 18913488 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 18913488 Country of ref document: EP Kind code of ref document: A1 |