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

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

Info

Publication number
CN115658026A
CN115658026A CN202211189044.4A CN202211189044A CN115658026A CN 115658026 A CN115658026 A CN 115658026A CN 202211189044 A CN202211189044 A CN 202211189044A CN 115658026 A CN115658026 A CN 115658026A
Authority
CN
China
Prior art keywords
field
check
service
service request
processing
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.)
Pending
Application number
CN202211189044.4A
Other languages
Chinese (zh)
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.)
Agricultural Bank of China
Original Assignee
Agricultural Bank of China
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 Agricultural Bank of China filed Critical Agricultural Bank of China
Priority to CN202211189044.4A priority Critical patent/CN115658026A/en
Publication of CN115658026A publication Critical patent/CN115658026A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the invention discloses a service processing method, a device, equipment and a storage medium. The method comprises the following steps: receiving a service request sent by a client; the business request comprises a first enterprise identification field and at least one business information field; performing field check on the service request; wherein, the field check comprises field non-null check and field length check; if the verification is successful, determining the type of the service request; the types of the service requests comprise difference requests and general requests; and processing the service request according to the service processing rule corresponding to the type. In the embodiment, by means of the preposition of the field check, the efficiency of service processing is improved, and the corresponding service request is processed according to the service processing rule corresponding to the difference request and the universal request, so that the readability of the code is improved, and the number of times of program version sending can be reduced.

Description

Service processing method, device, equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of internet, in particular to a service processing method, a service processing device, service processing equipment and a storage medium.
Background
In the prior art, when a plurality of service requests of a client are sent to the same server and a newly added service requirement or a modified service requirement is met, the server needs to modify codes, re-releases the code for deployment, and adopts a hard coding mode, so that the client requests are excessively branched, and the codes are respectively processed through a plurality of different branches, so that the readability of the codes is poor.
Disclosure of Invention
The embodiment of the invention provides a service processing method, a device, equipment and a storage medium, which are used for flexibly processing service requirements and reducing the frequency of program version release.
According to an aspect of the present invention, a service processing method is provided, including: receiving a service request sent by a client; the business request comprises a first enterprise identification field and at least one business information field; performing field check on the service request; the field check comprises a field non-null check and a field length check; if the verification is successful, determining the type of the service request; the types of the service requests comprise difference requests and general requests; and processing the service request according to the service processing rule corresponding to the type.
According to another aspect of the present invention, there is provided a service processing apparatus, including: the service request receiving module is used for receiving a service request sent by a client; the service request comprises a first enterprise identification field and at least one service information field; the field checking module is used for carrying out field checking on the service request; the field check comprises a field non-null check and a field length check; the service request type determining module is used for determining the type of the service request if the verification is successful; the types of the service requests comprise difference requests and general requests; and the service request processing module is used for processing the service request according to the service processing rule corresponding to the type.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform the method of traffic processing according to any of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer-readable storage medium storing computer instructions for causing a processor to implement a business processing method according to any one of the embodiments of the present invention when the computer instructions are executed.
According to the technical scheme of the embodiment of the invention, the service request sent by the client is received; the business request comprises a first enterprise identification field and at least one business information field; performing field check on the service request; wherein, the field check comprises field non-null check and field length check; if the verification is successful, determining the type of the service request; the types of the service requests comprise difference requests and general requests; and processing the service request according to the service processing rule corresponding to the type. In the embodiment, by means of the preposition of the field check, the efficiency of service processing is improved, and the corresponding service request is processed according to the service processing rule corresponding to the difference request and the universal request, so that the readability of the code is improved, and the number of times of program version sending can be reduced.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present invention, nor do they necessarily limit the scope of the invention. Other features of the present invention will become apparent from the following description.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of a service processing method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a service processing apparatus according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an electronic device implementing an embodiment of the invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in other sequences than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, 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.
It is understood that, before the technical solutions disclosed in the embodiments of the present disclosure are used, the user should be informed of the type, the use range, the use scene, etc. of the personal information related to the present disclosure in a proper manner according to the relevant laws and regulations and obtain the authorization of the user.
It will be appreciated that the data involved in the subject technology, including but not limited to the data itself, the acquisition or use of the data, should comply with the requirements of the corresponding laws and regulations and related regulations.
Fig. 1 is a flowchart of a service processing method according to an embodiment of the present invention, where this embodiment is applicable to a situation where multiple clients send service requests to the same server, and the method may be executed by a service processing apparatus, where the service processing apparatus may be implemented in a form of hardware and/or software, and the service processing apparatus may be configured in an electronic device, and the electronic device may be a server. As shown in fig. 1, the method includes:
s110, receiving a service request sent by a client.
The service request comprises a first enterprise identification field and at least one service information field. In this embodiment, if a banking service is taken as an example scenario, the first enterprise identification field may be understood as a unique identification number field of a bank branch, and if a service request is taken as an example scenario, the service information field may include identification information of a transfer party, identification information of a receiving party, contact information of the transfer party and the receiving party, transfer amount information, and the like.
Specifically, when a service request is triggered, the client sends the service request to the server, and the server receives the service request to process the service request. The format for the service request may be: hypertext Transfer Protocol (HTTP) + JavaScript Object Notation (JSON).
And S120, carrying out field check on the service request.
Wherein the field check includes a field non-null check and a field length check. In this embodiment, the field non-empty check and the field length check are performed on the service request, so as to ensure accurate subsequent call of the service processing flow.
Optionally, if the field check is a field non-null check, the field check is performed on the service request, and the method may be: acquiring a field non-empty check table; wherein the field non-null check table comprises non-null check fields; acquiring a first enterprise identification field and a first rule coding field based on the service request; querying a non-null check field in a field non-null check table based on the first enterprise identification field and the first rule encoding field; and extracting a field value corresponding to the non-empty check field from at least one service information field, and carrying out non-empty judgment on the field value.
The field non-null check table is stored in the database and comprises a non-null check field, an enterprise identification field, a rule coding field and a rule name. As shown in table 1.
TABLE 1 field non-null checklist
Figure BDA0003868618420000051
Specifically, a field non-null check table is obtained from a database, a first rule coding field and a first enterprise identification field are obtained from a corresponding service layer interface according to a service request, a field non-null check table is inquired based on the first enterprise identification field and the first rule coding field, an inquiry result comprising the non-null check field is obtained, the inquiry result is split according to a predefined separator (such as "|"), and a plurality of field names which need to be subjected to non-null judgment are obtained. For example, according to the first enterprise identification field: 111, first rule encoding field: 101, obtaining a query result: rule name field: and (3) inputting a non-empty check field for external transfer: and the FiledID | acctNo | amt splits the non-empty check field according to the separator "|" to obtain the field name needing non-empty judgment: filedID, acctNo, amt. After a field name (non-empty check field) needing non-empty judgment is obtained, field values corresponding to the non-empty check field are extracted from a plurality of service information fields of a service request through a reflection mechanism, cyclic non-empty judgment is carried out on the field values, if the judgment result is non-empty, the non-empty check of the field is successful, and if the judgment result is empty, field non-empty check failure information is fed back to a client. The reflection mechanism may be understood as a reflection (reflection) mechanism of Java, which refers to dynamically loading a class and acquiring detailed information of the class in a running state of a program, so as to operate attributes and methods of the class or object.
Optionally, if the field check is a field length check, the method for performing the field check on the service request may be: acquiring a field length check table; inquiring length checking information in a field length checking table based on the first enterprise identification field and the first rule coding field; and extracting field values corresponding to the length check fields from the service information fields, and performing length check on the field values based on the minimum length values and the maximum length values.
The field length checking table is stored in a database and comprises length checking information, and the length checking information comprises a length checking field, a minimum length value and a maximum length value; the field length check table may also include an execution order of the enterprise identification field, the rule encoding field, and the length check field. As shown in table 2.
TABLE 2 field Length check Table
Figure BDA0003868618420000061
Specifically, a field length check table is obtained from a database, a first rule coding field and a first enterprise identification field are obtained from a corresponding service layer interface according to a service request, the field length check table is inquired based on the execution sequence of the first enterprise identification field, the first rule coding field and the length check field to obtain a length check field to be checked, a minimum length value and a maximum length value, after the field length check field is obtained, field values corresponding to the length check field are extracted from a plurality of service information fields of the service request through a reflection mechanism, and cycle length judgment is carried out on the field values. Optionally, the length check of the field value based on the minimum length value and the maximum length value may be performed by: if the length value of the field value is between the minimum length value and the maximum length value, the field verification of the service request is successful, otherwise, field length verification failure information is fed back to the client.
In the embodiment, before the service request is processed, the field non-null check and the field length check are performed on the service request, and the field check and the service request processing are decoupled, so that the response time of the field check of the service end for returning the failure information is shortened, and the processing efficiency of the service end is improved. And the field can be verified by modifying the data table of the database, so that the service requirement can be met, the flexible verification effect is achieved, and the operation and maintenance of the service processing system are simplified.
S130, if the verification is successful, determining the type of the service request.
The types of the service request include a difference request and a general request. In this embodiment, by determining the service request type, it is convenient to process the service requests respectively according to the service request type in the following. Optionally, the manner of determining the type of the service request may be: acquiring a service processing table; inquiring in a business processing table based on the first enterprise identification field and the first rule coding field to obtain an inquiry result; if the query result is not null, the service request is a difference request; and if the query result is null, the service request is a general request.
The business processing table includes an enterprise identification field, a rule code, a rule name, a business processing sequence, and the like. As shown in table 3. The business process table is stored in a database. With respect to the service processing order, it can be understood that there are multiple service processing steps for the same service request, but the order of the service processing steps may be different. "001", "002", "003" in the business process order in table 3 may represent the respective process steps, and "001 haze 002 003" represents the order of the respective process steps, i.e. the order of the process steps is: 001. 002, 003. Specifically, reference may be made to a service processing definition table in table 4, where the service processing definition table is also stored in the database, and table 4 defines a sequence number represented by each service processing step, for example, the sequence number is "001", a corresponding rule name is "money purpose maintenance", and a corresponding service processing step (Bean name) is "rulepaypurposimemainlogic logic". Among them, bean is one of the most core concepts in Spring framework. A Bean is an object instantiated, assembled and managed by a Spring IoC container. The Spring framework is an open source code J2EE application program framework and is a lightweight container for managing the life cycle of beans.
Table 3 service handling table
Figure BDA0003868618420000081
Table 4 service process definition table
Serial number Rule name Bean name
001 Money usage maintenance RulePayPurposeMaintainLogic
002 Accessory upload RuleAttachUploadLogic
003 External account transfer running water input RuleTaskFlowInsertLogic
Specifically, a service processing definition table and a service processing table are obtained from a database, and are queried in the service processing table based on a first enterprise identification field and a first rule coding field to obtain a query result, if the service processing table has the first enterprise identification field and the first rule coding field at the same time, the query result is not null, otherwise, the query result is null. For example, the first enterprise identification field and the first rule encoding field are: 111 and 101, then the query result is: 001 when it passes 002,003.
And S140, processing the service request according to the service processing rule corresponding to the type.
In this embodiment, the service request is processed according to the service processing rule corresponding to the type, so that the service request is processed by being divided into two service processing rules, and the readability of the code can be improved.
Optionally, the manner of processing the service request according to the service processing rule corresponding to the type may be: if the service request is a universal request, all the universal service processing flows are called in sequence.
The common request can be understood as a request with the same service request, the same service processing steps and the same service processing sequence for each enterprise. For example, in the exemplary scenario of bank transfer, the enterprise identifiers are 333 and 444 branches, and the business requests, business processing steps and business processing sequences for the same type of bank transfer are the same. Specifically, if the service request is a general request, the corresponding processing steps are sequentially called for processing according to the pre-designed processing steps.
In this embodiment, the general service processing flow processes the general request, so that the setting of the database can be simplified (a data table needs to be designed in the database relative to the configured service processing flow), and meanwhile, the interaction between the server and the database is reduced, and the response efficiency of the service processing system is improved.
Optionally, the manner of processing the service request according to the service processing rule corresponding to the type may be: if the service request is a difference request, extracting a rule name and a service processing sequence in the query result; and circularly calling the configured service processing flow according to the rule name and the service processing sequence.
The different request can be understood as a request with different business processing steps and business processing sequences for the same business request of each enterprise. As shown in table 3, for the external transfer service request, the branch number with the enterprise identifier of 111, the service processing steps and the processing sequence are as follows: 001 rif 002 rifs 003, and the business processing steps and processing sequence of the division number with the enterprise identification being 222 are 001 haze 003 respectively.
Specifically, if the service request is a difference request, the service processing sequence is extracted in table 3 based on the first enterprise identifier and the first rule code in the service request, and the rule name or the Bean name corresponding to the rule name is extracted in table 4 based on the service processing sequence, so as to call the service processing step. The rule name in table 4 is substantially the same as the Bean name, and in practical application, the call of the corresponding service processing step is realized by calling the Bean name.
It should be noted that, for the circularly-invoked and configured service processing flow, for a plurality of service processing steps of the service request, in practical application, the following flow may be used: take an external transfer as an example.
The method comprises the following steps: and defining a configured business processing flow base class.
For example, the base class TransferInputBaseRule, which defines an abstract method execute.
Figure BDA0003868618420000091
Figure BDA0003868618420000101
Step two: a business process class is defined.
For example: rulePayPurposaEmaintainLogic is maintained for money purpose, ruleAttachhuploadLogic is uploaded by the accessory, and RuleTaskFlowInsertLogic is recorded into external transfer running water. The 3 logical layer classes all inherit the abstract class TransferInputBaseRule, rewriting the execute method.
Figure BDA0003868618420000102
Step three: annotating the assembly of the registered beans into the Spring container by the @ component.
Step four: after the non-empty query results of table 3 are obtained, the bean instance is obtained by the getBean method of the beans utility tools class.
For example:
Figure BDA0003868618420000103
Figure BDA0003868618420000111
step five: and circularly executing the execute method of the example acquired in the step four.
In this embodiment, cyclic calling of the configured service processing flow is realized through steps one to five, a relevant object is found and assigned to a parent class reference through a Bean name acquired from table 4 in the database, and an execute method of a child class is called through the parent class reference. In the process, if the abnormal information exists, the flow is ended in advance, and the abnormal information is returned to the client.
In this embodiment, when a service request with a service difference is newly added, a service processing branch does not need to be newly added, program change does not need to be performed, a code does not need to be modified, and only data change of a data table in a database needs to be performed. For example, when a business processing step which only needs to perform attachment uploading and external transfer pipelining entry and a business request with an enterprise identifier of 333 are newly added, only one piece of data with the enterprise identifier of 333, a rule code of 103, a rule name of external transfer entry and a business processing sequence of 002 to 003 needs to be newly added in a business processing table.
In this embodiment, when the calling number and the processing sequence of the service processing steps need to be adjusted according to the service requirement, a program does not need to be changed, and only data change of the data table in the database needs to be performed. For example, the enterprise identifier is 111, and if the service processing step of "attachment uploading" is not required due to the service requirement, the service processing sequence of the rule code 101 in the service processing table is only required to be adjusted to 001 min 003 in the enterprise identifier 111.
In this embodiment, for the configured business processing flow, 2 data tables, that is, a business processing table and a business processing definition table, are designed in the database, and the design of the two data tables can reduce the risk brought by directly modifying the Bean name compared with the design of 1 data table.
In this embodiment, for a service request, only two branches are used for performing service processing, that is, a configured service processing flow and a general service processing flow are compatible at the same time, so that flexible calling of the service processing flow is realized.
The technical scheme of the embodiment of the invention comprises the steps of receiving a service request sent by a client; the business request comprises a first enterprise identification field and at least one business information field; performing field check on the service request; wherein, the field check comprises field non-null check and field length check; if the verification is successful, determining the type of the service request; the types of the service requests comprise difference requests and general requests; and processing the service request according to the service processing rule corresponding to the type. In the embodiment, by means of the preposition of the field check, the efficiency of service processing is improved, and the corresponding service request is processed according to the service processing rule corresponding to the difference request and the universal request, so that the readability of the code is improved, and the number of times of program version sending can be reduced.
Fig. 2 is a schematic structural diagram of a service processing apparatus according to an embodiment of the present invention. As shown in fig. 2, the apparatus includes: a service request receiving module 201, a field checking module 202, a service request type determining module 203 and a service request processing module 204;
a service request receiving module 201, configured to receive a service request sent by a client; the business request comprises a first enterprise identification field and at least one business information field;
a field check module 202, configured to perform field check on the service request; wherein, the field check comprises field non-null check and field length check;
a service request type determining module 203, configured to determine the type of the service request if the verification is successful; the types of the service requests comprise difference requests and general requests;
and the service request processing module 204 is configured to process the service request according to the service processing rule corresponding to the type.
According to the technical scheme of the embodiment of the invention, a service request sent by a client is received through a service request receiving module; the business request comprises a first enterprise identification field and at least one business information field; performing field check on the service request through a field check module; wherein, the field check comprises field non-null check and field length check; if the verification is successful, determining the type of the service request through a service request type determining module; the types of the service requests comprise difference requests and general requests; and processing the service request according to the service processing rule corresponding to the type through a service request processing module. In the embodiment, by means of the preposition of the field check, the efficiency of service processing is improved, and the corresponding service request is processed according to the service processing rule corresponding to the difference request and the universal request, so that the readability of the code is improved, and the number of times of program version sending can be reduced.
Optionally, the field check module is specifically configured to: acquiring a field non-empty check table; wherein the field non-null check table comprises a non-null check field; acquiring a first enterprise identification field and a first rule coding field based on the service request; querying a non-empty check field in the field non-empty check table based on the first enterprise identification field and a first rule encoding field; and extracting a field value corresponding to the non-empty check field from the at least one service information field, and carrying out non-empty judgment on the field value.
Optionally, the field check module is further configured to: acquiring a field length check table; the field length check table comprises length check information, wherein the length check information comprises a length check field, a minimum length value and a maximum length value; inquiring length checking information in the field length checking table based on the first enterprise identification field and the first rule coding field; and extracting a field value corresponding to the length check field from each service information field, and performing length check on the field value based on the minimum length value and the maximum length value.
Optionally, the field check module is further configured to: and if the length value of the field value is between the minimum length value and the maximum length value, the field verification of the service request is successful.
Optionally, the service request type determining module is specifically configured to: acquiring a service processing table; the service processing table comprises a rule name and a service processing sequence; inquiring in the business processing table based on the first enterprise identification field and the first rule coding field to obtain an inquiry result; if the query result is not null, the service request is a difference request; and if the query result is null, the service request is a general request.
Optionally, the service request processing module is specifically configured to: and if the service request is a universal request, sequentially calling all universal service processing flows.
Optionally, the service request processing module is further configured to: if the service request is a difference request, extracting a rule name and a service processing sequence in the query result; and circularly calling a configured service processing flow according to the rule name and the service processing sequence.
The service processing device provided by the embodiment of the invention can execute the service processing method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
FIG. 3 illustrates a block diagram of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 3, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, and the like, wherein the memory stores a computer program executable by the at least one processor, and the processor 11 can perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from a storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data necessary for the operation of the electronic apparatus 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
A number of components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, or the like; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, or the like. Processor 11 performs the various methods and processes described above, such as method traffic processing.
In some embodiments, the method business processes may be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When loaded into RAM 13 and executed by processor 11, the computer program may perform one or more of the steps of the method business processes described above. Alternatively, in other embodiments, the processor 11 may be configured to perform the method business processes by any other suitable means (e.g., by way of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be performed. A computer program can execute entirely on a machine, partly on a machine, as a stand-alone software package partly on a machine and partly on a remote machine or entirely on a remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service are overcome.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present invention may be executed in parallel, sequentially, or in different orders, and are not limited herein as long as the desired results of the technical solution of the present invention can be achieved.
The above-described embodiments should not be construed as limiting the scope of the invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method for processing a service, comprising:
receiving a service request sent by a client; the business request comprises a first enterprise identification field and at least one business information field;
performing field check on the service request; the field check comprises a field non-null check and a field length check;
if the verification is successful, determining the type of the service request; the types of the service requests comprise difference requests and general requests;
and processing the service request according to the service processing rule corresponding to the type.
2. The method of claim 1, wherein performing a field check on the service request if the field check is a field non-null check comprises:
acquiring a field non-empty check table; wherein the field non-null check table comprises a non-null check field;
acquiring a first enterprise identification field and a first rule coding field based on the service request;
querying a non-empty check field in the field non-empty check table based on the first enterprise identification field and a first rule encoding field;
and extracting a field value corresponding to the non-empty check field from the at least one service information field, and carrying out non-empty judgment on the field value.
3. The method of claim 2, wherein if the field check is a field length check, performing a field check on the service request comprises:
acquiring a field length check table; the field length check table comprises length check information, wherein the length check information comprises a length check field, a minimum length value and a maximum length value;
querying length check information in the field length check table based on the first enterprise identification field and the first rule coding field;
and extracting a field value corresponding to the length check field from each service information field, and performing length check on the field value based on the minimum length value and the maximum length value.
4. The method of claim 3, wherein performing a length check on the field value based on the minimum length value and the maximum length value comprises:
and if the length value of the field value is between the minimum length value and the maximum length value, the field verification of the service request is successful.
5. The method of claim 4, wherein determining the type of the service request comprises:
acquiring a service processing table; the business processing table comprises a rule name and a business processing sequence;
inquiring in the business processing table based on the first enterprise identification field and the first rule coding field to obtain an inquiry result;
if the query result is not null, the service request is a difference request;
and if the query result is null, the service request is a general request.
6. The method according to claim 5, wherein processing the service request according to the service processing rule corresponding to the type comprises:
and if the service request is a universal request, sequentially calling all universal service processing flows.
7. The method according to claim 5, wherein processing the service request according to the service processing rule corresponding to the type comprises:
if the service request is a difference request, extracting a rule name and a service processing sequence in the query result;
and circularly calling a configured service processing flow according to the rule name and the service processing sequence.
8. A traffic processing apparatus, comprising:
the service request receiving module is used for receiving a service request sent by a client; the business request comprises a first enterprise identification field and at least one business information field;
the field checking module is used for carrying out field checking on the service request; the field check comprises a field non-null check and a field length check;
the service request type determining module is used for determining the type of the service request if the verification is successful; the types of the service requests comprise difference requests and general requests;
and the service request processing module is used for processing the service request according to the service processing rule corresponding to the type.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the business process method of any one of claims 1-7.
10. A computer-readable storage medium, having stored thereon computer instructions for causing a processor to execute a method for processing traffic according to any one of claims 1-7.
CN202211189044.4A 2022-09-28 2022-09-28 Service processing method, device, equipment and storage medium Pending CN115658026A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211189044.4A CN115658026A (en) 2022-09-28 2022-09-28 Service processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211189044.4A CN115658026A (en) 2022-09-28 2022-09-28 Service processing method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115658026A true CN115658026A (en) 2023-01-31

Family

ID=84985262

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211189044.4A Pending CN115658026A (en) 2022-09-28 2022-09-28 Service processing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115658026A (en)

Similar Documents

Publication Publication Date Title
CN107133233B (en) Processing method and device for configuration data query
CN112528067A (en) Graph database storage method, graph database reading method, graph database storage device, graph database reading device and graph database reading equipment
CN115145587A (en) Product parameter checking method and device, electronic equipment and storage medium
CN114491220A (en) Object processing method, device, equipment and medium
CN116450622B (en) Method, apparatus, device and computer readable medium for data warehouse entry
CN115048352B (en) Log field extraction method, device, equipment and storage medium
CN115330540A (en) Method and device for processing transaction data
CN115658026A (en) Service processing method, device, equipment and storage medium
CN114329164A (en) Method, apparatus, device, medium and product for processing data
CN110956430A (en) Department door recommendation method and device
CN115983222A (en) EasyExcel-based file data reading method, device, equipment and medium
CN115525659A (en) Data query method and device, electronic equipment and storage medium
CN114445246A (en) Trademark monitoring method and device, electronic equipment and storage medium
CN115905213A (en) Report storage method and device and electronic equipment
CN116756246A (en) Data synchronization method, device, equipment and storage medium
CN117668114A (en) Data synchronization method, device, equipment and medium
CN117632427A (en) Dynamic transaction behavior scheduling method based on micro-service embedded scheduling framework
CN117194471A (en) Data blood edge analysis method, device, medium, electronic equipment and product
CN115481090A (en) File processing method and device, electronic equipment and storage medium
CN116319716A (en) Information processing method, no-service system, electronic device, and storage medium
CN115167855A (en) Front-end page generation method, device and equipment applied to matching transaction system
CN114064830A (en) Navigation data automatic production method, system, electronic equipment and storage medium
CN117632138A (en) Attendance application form analysis method and device, electronic equipment and storage medium
CN115220722A (en) Method, device, equipment and medium for back-end internationalization
CN114844920A (en) Internet of things equipment checking method and device, electronic equipment and storage medium

Legal Events

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