CN113157425A - Service access processing method, device, equipment and storage medium - Google Patents

Service access processing method, device, equipment and storage medium Download PDF

Info

Publication number
CN113157425A
CN113157425A CN202110551962.6A CN202110551962A CN113157425A CN 113157425 A CN113157425 A CN 113157425A CN 202110551962 A CN202110551962 A CN 202110551962A CN 113157425 A CN113157425 A CN 113157425A
Authority
CN
China
Prior art keywords
service access
server
processing
logic
service
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110551962.6A
Other languages
Chinese (zh)
Other versions
CN113157425B (en
Inventor
张倍源
许金灿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Malacca Network Technology Co ltd
Original Assignee
Shenzhen Malacca Network Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Malacca Network Technology Co ltd filed Critical Shenzhen Malacca Network Technology Co ltd
Priority to CN202110551962.6A priority Critical patent/CN113157425B/en
Publication of CN113157425A publication Critical patent/CN113157425A/en
Application granted granted Critical
Publication of CN113157425B publication Critical patent/CN113157425B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a method, a device, equipment and a storage medium for processing service access, wherein the method for processing the service access comprises the following steps: judging the current service access scene of the server; if the current service access scene of the server is reading more and writing less, increasing the number of logic calculation layers in the server and reducing the judgment of service logic in the server; and if the current service access scene of the server is more written and less read, putting the written service into a queue for delay processing. The processing method for service access carries out scene-by-scene identification on the service access, and can execute different access handling strategies according to the reading majority or the writing majority aiming at different service access scenes, thereby improving the processing efficiency of the service access and avoiding the service access blockage.

Description

Service access processing method, device, equipment and storage medium
Technical Field
The present invention relates to the field of service scheduling technologies, and in particular, to a method, an apparatus, a device, and a storage medium for processing service access.
Background
Currently, business process advancement is usually implemented by using a workflow, the workflow may predefine an execution sequence of each business logic in the business process, when one business logic is executed, the workflow may update a process state recorded in a database, and then the next business logic may be executed, and so on until the whole process is finished.
The service server in the prior art: because the workflow database and the service database are the same database, in the process of service execution, each service logic and workflow can read and write data from the database, and the concurrent access amount of the database is limited, so that under the condition of large task load, the interaction between the service logic and the workflow engine and the database can be increased rapidly, and the database performance under the condition of high concurrency can be lower.
Accordingly, the prior art is yet to be improved and developed.
Disclosure of Invention
The invention mainly aims to solve the technical problems that the existing service server cannot meet the requirement of high concurrent service access and is easy to cause read-write overtime.
The first aspect of the present invention provides a method for processing service access, where the method for processing service access includes:
judging the current service access scene of the server;
if the current service access scene of the server is reading more and writing less, increasing the number of logic calculation layers in the server and reducing the judgment of service logic in the server;
and if the current service access scene of the server is more written and less read, putting the written service into a queue for delay processing.
In an optional implementation manner of the first aspect of the present invention, the method for processing service access further includes:
the business logic in the server is classified in advance, and is divided into simple logic and complex logic according to the data processing amount required by business access.
In an alternative embodiment of the first aspect of the invention, the code of the simple logic is constructed in the server by the lua language.
In an alternative embodiment of the first aspect of the present invention, the code of the complex logic is constructed in the server by java language, php language or c language.
In an optional implementation manner of the first aspect of the present invention, the method for processing service access further includes:
judging the type of service access;
if the type of the service access belongs to the situation that the access result can be directly returned, the service access request is processed through simple logic;
and if the type of the service access belongs to the situation that the access result cannot be directly returned, processing the service access request through complex logic.
In an optional implementation manner of the first aspect of the present invention, when determining the current service access scenario of the server, whether the current service access scenario of the server is read-many-write-little or write-many-read-little is identified by reading static data of the server.
In an optional implementation manner of the first aspect of the present invention, after the placing the write traffic in the queue for performing the delay processing, the method includes: setting the time for the write service to access the server again.
A second aspect of the present invention provides a processing apparatus for service access, where the processing apparatus for service access includes:
the judging module is used for judging the current service access scene of the server;
the first processing module is used for increasing the number of logic calculation layers in the server and reducing the judgment of service logic in the server if the current service access scene of the server is reading more and writing less;
and the second processing module is used for putting the write-in service into the queue for delay processing if the current service access scene of the server is write-in, read-out and low.
A third aspect of the present invention provides a device for processing service access, where the device for processing service access includes: a memory having instructions stored therein and at least one processor, the memory and the at least one processor interconnected by a line;
the at least one processor calls the instructions in the memory to cause the answer sheet segmentation device to execute the processing method of the service access according to any one of the above items.
A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method of processing service access as described in any one of the above.
Has the advantages that: the invention provides a method, a device, equipment and a storage medium for processing service access, wherein the method for processing the service access comprises the following steps: judging the current service access scene of the server; if the current service access scene of the server is reading more and writing less, increasing the number of logic calculation layers in the server and reducing the judgment of service logic in the server; and if the current service access scene of the server is more written and less read, putting the written service into a queue for delay processing. The processing method for service access carries out scene-by-scene identification on the service access, and can execute different access handling strategies according to the reading majority or the writing majority aiming at different service access scenes, thereby improving the processing efficiency of the service access and avoiding the service access blockage.
Drawings
FIG. 1 is a schematic diagram of an embodiment of a method for processing service access;
FIG. 2 is a schematic diagram of an embodiment of a service access processing device according to the present invention;
fig. 3 is a schematic diagram of an embodiment of a service access processing device according to the present invention.
Detailed Description
The embodiment of the invention provides a method, a device, equipment and a storage medium for processing service access.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprises," "comprising," or "having," and any variations thereof, are intended to cover non-exclusive inclusions, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
For convenience of understanding, a specific flow of the embodiment of the present invention is described below, and referring to fig. 1, a first aspect of the present invention provides a method for processing service access, where the method for processing service access includes:
s100, judging a current service access scene of a server;
s200, if the current service access scene of the server is read, written more and written less, increasing the number of logic calculation layers in the server and reducing the judgment of service logic in the server;
and S300, if the current service access scene of the server is more written and less read, putting the written service into a queue for delay processing.
The present service server considers the technical problems of lock contention, memory occupation, cpu occupation, response time, flow control, fusing and other specific scenes under a large concurrent scene, so that the service logic is complex. The invention can effectively improve the performance of the server for processing the service access through the service access method.
In an optional implementation manner of the first aspect of the present invention, the method for processing service access further includes:
the business logic in the server is classified in advance, and is divided into simple logic and complex logic according to the data processing amount required by business access.
In this embodiment, the present invention also classifies service logics in a server in advance, so that different service logics may be adopted to process according to specific situations of service access, when the classification of the service logics is specifically performed, for example, when the amount of data required to be acquired or written according to the service access is greater than a first threshold, the process of the service access is processed through complex logic, and when the amount of data required to be acquired or written according to the service access is less than a second threshold, the process of the service access is processed through simple logic, where the first threshold and the second threshold may be different, and further, the size of the second threshold is less than the size of the first threshold. The simple logic part may specifically include some non-complex business logic, such as regular matching, condition judgment based on time, high-speed nosql database, cookie, http header, etc., and may further include some logic-simple cpu-intensive operations, or may perform static data content directly returned.
In an alternative embodiment of the first aspect of the invention, the code of the simple logic is constructed in the server by the lua language. In the operation of a server, simple logic codes constructed by lua are compiled into machine codes in real time through jit technology during first access, the machine codes are loaded into a memory method area to be executed, when logic contents can directly return results, requests can be directly returned at the layer, when the logic contents cannot meet the request contents, the requests can be put into a memory queue or directly added with custom parameters and thrown to back-end complex logic through a reverse proxy, the requests are returned to the simple logic again after the complex logic part is processed, and the simple logic can directly return results or return results after further processing. Further, the simple logic portion of the present invention can use the distributed lock function provided by the cache and the network nosql to provide basic logic judgment and distributed locking, even for some cpu-intensive operations such as md5 encryption or rsa-based jwt encryption/decryption.
In an alternative embodiment of the first aspect of the present invention, the code of the complex logic is constructed in the server by java language, php language or c language. In the embodiment, the complex logic is encoded by using the language, so that the development efficiency of the complex logic can be effectively improved and the running stability of the complex logic can be improved. The development speed of the complex logic large-scale concurrent application can be effectively improved through the scheme, precious time is strived for the quick online of the internet business, a project which needs 2 weeks of time is developed by java language, and the project can be online after being modified for 3 days through the method.
In an optional implementation manner of the first aspect of the present invention, the method for processing service access further includes:
judging the type of service access;
if the type of the service access belongs to the situation that the access result can be directly returned, the service access request is processed through simple logic;
and if the type of the service access belongs to the situation that the access result cannot be directly returned, processing the service access request through complex logic.
In this embodiment, the type of the service access may directly return the access result, that is, the processing amount of the service access data is not large, and the processing process of the type of the service access that cannot directly return the access result, that is, the service access data, is complicated in multiple steps, so that complex logic is required for processing.
In an optional implementation manner of the first aspect of the present invention, when determining the current service access scenario of the server, whether the current service access scenario of the server is read-many-write-little or write-many-read-little is identified by reading static data of the server. Static data refers to data that is mainly used as control or reference data during the operation of the server, and they do not change for a long period of time and generally do not change with the operation, and dynamic data includes all data that changes during the operation, as well as data that needs to be input and output during the operation and data that needs to be changed during the operation of the server. The current service access condition of the server is judged through the data of the server in stable operation, so that the judged service access scene is more representative.
In an optional implementation manner of the first aspect of the present invention, after the placing the write traffic in the queue for performing the delay processing, the method includes: setting the time for the write service to access the server again.
A second aspect of the present invention provides a processing apparatus for service access, where the processing apparatus for service access includes:
the judging module 10 is used for judging the current service access scene of the server;
the first processing module 20 is configured to increase the number of logic computation layers in the server and reduce the judgment of the service logic in the server if the current service access scenario of the server is read-many and write-few;
and the second processing module 30 is configured to, if the current service access scenario of the server is write-in and read-out, put the write-in service into the queue for performing delay processing.
In an optional implementation manner of the second aspect of the present invention, the processing apparatus for service access further includes:
and the classification module is used for classifying the service logic in the server in advance and dividing the service logic in the server into simple logic and complex logic according to the data processing amount required by service access.
In an alternative embodiment of the second aspect of the invention, the code of the simple logic is constructed in the server by the lua language.
In an alternative embodiment of the second aspect of the present invention, the code of the complex logic is constructed in the server by java language, php language or c language.
In an optional implementation manner of the second aspect of the present invention, the determining module is further configured to determine a type of service access;
if the type of the service access belongs to the situation that the access result can be directly returned, the service access request is processed through simple logic;
and if the type of the service access belongs to the situation that the access result cannot be directly returned, processing the service access request through complex logic.
In an optional implementation manner of the second aspect of the present invention, when determining the current service access scenario of the server, it is identified whether the current service access scenario of the server is read-many-write-little or write-many-read-little by reading static data of the server.
In an optional implementation manner of the second aspect of the present invention, after the placing the write traffic in the queue for performing the delay processing, the method includes: setting the time for the write service to access the server again.
Fig. 3 is a schematic structural diagram of a service access processing device provided in an embodiment of the present invention, which may have a relatively large difference due to different configurations or performances, and may include one or more processors 40 (CPUs) (e.g., one or more processors) and a memory 50, and one or more storage media 60 (e.g., one or more mass storage devices) for storing applications or data. The memory and storage medium may be, among other things, transient or persistent storage. The program stored on the storage medium may include one or more modules (not shown), each of which may include a series of instruction operations in a processing device for access to services. Further, the processor may be configured to communicate with the storage medium to execute a sequence of instruction operations in the storage medium on the service-accessing processing device.
The processing device for business access may also include one or more power supplies 70, one or more wired or wireless network interfaces 80, one or more input-output interfaces 90, and/or one or more operating systems, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will appreciate that the service access processing device configuration shown in fig. 3 does not constitute a limitation of service access processing devices and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium, or a volatile computer-readable storage medium, and the computer-readable storage medium has stored therein instructions, which, when executed on a computer, cause the computer to execute the steps of the processing method for service access.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses, and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for processing service access is characterized in that the method for processing service access comprises the following steps:
judging the current service access scene of the server;
if the current service access scene of the server is reading more and writing less, increasing the number of logic calculation layers in the server and reducing the judgment of service logic in the server;
and if the current service access scene of the server is more written and less read, putting the written service into a queue for delay processing.
2. The method for processing service access according to claim 1, wherein the method for processing service access further comprises:
the business logic in the server is classified in advance, and is divided into simple logic and complex logic according to the data processing amount required by business access.
3. The method for processing service access according to claim 2, wherein the server is configured with a simple logic code constructed by lua language.
4. The method for processing service access according to claim 2, wherein the code of the complex logic is constructed in a java language, a php language or a c language in the server.
5. The method for processing service access according to claim 2, wherein the method for processing service access further comprises:
judging the type of service access;
if the type of the service access belongs to the situation that the access result can be directly returned, the service access request is processed through simple logic;
and if the type of the service access belongs to the situation that the access result cannot be directly returned, processing the service access request through complex logic.
6. The method for processing service access according to claim 1, wherein when determining the current service access scenario of the server, it is identified whether the current service access scenario of the server is read-many-write-few or write-many-read-few by reading static data of the server.
7. The method of claim 1, wherein after the delaying the placing of the write transaction into the queue, the method comprises: setting the time for the write service to access the server again.
8. A device for processing service access, the device comprising:
the judging module is used for judging the current service access scene of the server;
the first processing module is used for increasing the number of logic calculation layers in the server and reducing the judgment of service logic in the server if the current service access scene of the server is reading more and writing less;
and the second processing module is used for putting the write-in service into the queue for delay processing if the current service access scene of the server is write-in, read-out and low.
9. A processing device for service access, the processing device for service access comprising: a memory having instructions stored therein and at least one processor, the memory and the at least one processor interconnected by a line;
the at least one processor calls the instructions in the memory to cause the answer sheet segmentation device to execute the processing method of service access according to any one of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a method of processing service access according to any one of claims 1 to 7.
CN202110551962.6A 2021-05-20 2021-05-20 Service access processing method, device, equipment and storage medium Active CN113157425B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110551962.6A CN113157425B (en) 2021-05-20 2021-05-20 Service access processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110551962.6A CN113157425B (en) 2021-05-20 2021-05-20 Service access processing method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113157425A true CN113157425A (en) 2021-07-23
CN113157425B CN113157425B (en) 2024-05-03

Family

ID=76876869

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110551962.6A Active CN113157425B (en) 2021-05-20 2021-05-20 Service access processing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113157425B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150006841A1 (en) * 2012-01-18 2015-01-01 Huawei Technologies Co., Ltd. Message-based memory access apparatus and access method thereof
CN107800767A (en) * 2017-09-12 2018-03-13 努比亚技术有限公司 A kind of access response management method, server and computer-readable recording medium
CN109343846A (en) * 2018-08-27 2019-02-15 北京车和家信息技术有限公司 The construction method of business scenario and the building system of business scenario
CN110287152A (en) * 2019-06-27 2019-09-27 深圳市腾讯计算机系统有限公司 A kind of method and relevant apparatus of data management
CN111080243A (en) * 2019-12-05 2020-04-28 北京百度网讯科技有限公司 Service processing method, device, system, electronic equipment and storage medium
CN111414389A (en) * 2020-03-19 2020-07-14 北京字节跳动网络技术有限公司 Data processing method and device, electronic equipment and storage medium
CN111666045A (en) * 2020-05-15 2020-09-15 深圳市大富网络技术有限公司 Data processing method, system, equipment and storage medium based on Git system
CN112328219A (en) * 2020-11-04 2021-02-05 数字广东网络建设有限公司 Service access processing method, device and system and computer equipment
CN113031857A (en) * 2021-01-30 2021-06-25 柏科数据技术(深圳)股份有限公司 Data writing method, device, server and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150006841A1 (en) * 2012-01-18 2015-01-01 Huawei Technologies Co., Ltd. Message-based memory access apparatus and access method thereof
CN107800767A (en) * 2017-09-12 2018-03-13 努比亚技术有限公司 A kind of access response management method, server and computer-readable recording medium
CN109343846A (en) * 2018-08-27 2019-02-15 北京车和家信息技术有限公司 The construction method of business scenario and the building system of business scenario
CN110287152A (en) * 2019-06-27 2019-09-27 深圳市腾讯计算机系统有限公司 A kind of method and relevant apparatus of data management
CN111080243A (en) * 2019-12-05 2020-04-28 北京百度网讯科技有限公司 Service processing method, device, system, electronic equipment and storage medium
CN111414389A (en) * 2020-03-19 2020-07-14 北京字节跳动网络技术有限公司 Data processing method and device, electronic equipment and storage medium
CN111666045A (en) * 2020-05-15 2020-09-15 深圳市大富网络技术有限公司 Data processing method, system, equipment and storage medium based on Git system
CN112328219A (en) * 2020-11-04 2021-02-05 数字广东网络建设有限公司 Service access processing method, device and system and computer equipment
CN113031857A (en) * 2021-01-30 2021-06-25 柏科数据技术(深圳)股份有限公司 Data writing method, device, server and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张炜森;陈涛;李康;: "Nginx高并发负载均衡原理与策略比较研究", 工业控制计算机, no. 01, pages 88 - 89 *

Also Published As

Publication number Publication date
CN113157425B (en) 2024-05-03

Similar Documents

Publication Publication Date Title
US9413683B2 (en) Managing resources in a distributed system using dynamic clusters
US7386577B2 (en) Dynamic determination of transaction boundaries in workflow systems
CN107783734B (en) Resource allocation method, device and terminal based on super-fusion storage system
JP4536833B2 (en) Financial information processing system
US10789087B2 (en) Insight usage across computing nodes running containerized analytics
CN112035230A (en) Method and device for generating task scheduling file and storage medium
CN114253713B (en) Asynchronous batch processing method and system based on reactor
CN107168796A (en) A kind of data merging method, device, memory and storage control
WO2024119930A1 (en) Scheduling method and apparatus, and computer device and storage medium
CN112596669A (en) Data processing method and device based on distributed storage
CN113157425A (en) Service access processing method, device, equipment and storage medium
CN113407114B (en) Online capacity expansion IO scheduling method based on hot data and delete repeat operation
CN115168014A (en) Job scheduling method and device
KR20190109638A (en) Method for scheduling task in big data analysis platform based on distributed file system, program and computer readable storage medium therefor
US20220210093A1 (en) User-Based Data Tiering
CN109885551B (en) Electronic device, metadata processing method, and computer-readable storage medium
CN110262758B (en) Data storage management method, system and related equipment
US7908375B2 (en) Transparently externalizing plug-in computation to cluster
JP5622049B2 (en) Batch processing system and batch processing method
CN111522647A (en) Public cloud service leasing method capable of minimizing leasing cost
CN112540842A (en) Method and device for dynamically adjusting system resources
CN113835852B (en) Task data scheduling method and device
CN113296966B (en) Data processing method and device
US11627085B2 (en) Non-transitory computer-readable recording medium, service management device, and service management method
Fariz et al. Improving MapReduce process by mobile agents

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant