CN109783562A - A kind of method and device for business processing - Google Patents

A kind of method and device for business processing Download PDF

Info

Publication number
CN109783562A
CN109783562A CN201910043576.9A CN201910043576A CN109783562A CN 109783562 A CN109783562 A CN 109783562A CN 201910043576 A CN201910043576 A CN 201910043576A CN 109783562 A CN109783562 A CN 109783562A
Authority
CN
China
Prior art keywords
request
service logic
logic function
business
path
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
CN201910043576.9A
Other languages
Chinese (zh)
Other versions
CN109783562B (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.)
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Wodong Tianjun Information 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 Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Wodong Tianjun Information Technology Co Ltd
Priority to CN201910043576.9A priority Critical patent/CN109783562B/en
Publication of CN109783562A publication Critical patent/CN109783562A/en
Application granted granted Critical
Publication of CN109783562B publication Critical patent/CN109783562B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Information Transfer Between Computers (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a kind of method and device for business processing, are related to field of computer technology.One specific embodiment of this method includes: the network request for receiving client transmissions, according to the request path and requesting method in the network request, determines the service logic function for handling the network request;The service logic function is called, inputs the business datum in the network request into the service logic function, receives the processing result that the service logic function is fed back to return to the client.The embodiment carries out unification to the institutional framework of business module and the way of realization of service logic function, so that code structure is clear, convenient for the system architecture unified managementization when more people develop operation system, while reducing maintenance cost;And it can be directly multiplexed non-traffic frame, conducive to the interaction of business module and non-traffic frame, and then promote development efficiency.

Description

A kind of method and device for business processing
Technical field
The present invention relates to field of computer technology more particularly to a kind of method and device for business processing.
Background technique
Node.js is the platform established when being run based on chrome.javascript, for easily building response The network application that speed is fast, is easy to extend.And a kind of technical solution that Node.js is developed as full stack, have abundant and mature Skeleton, such as the express frame based on asynchronism callback, the koa frame based on asynchronous function etc..They are all logical After crossing the business module of load exploitation or open source or the middleware of non-traffic module, the operation service of certain Single port is monitored.
Comprising a large amount of different service logics in business module, every service logic be directed to it is a series of with database or The interaction of external interface.Rather than (connection of database, certification, permission control, log, the collection of log, rubbish are clear for business module Reason, abnormality processing, con current control etc.) essential in not homologous ray and function is identical.
In the implementation of the present invention, at least there are the following problems for inventor's discovery prior art:
Basic interface (such as load middleware, routing, monitoring etc.) the exploitation industry provided using frames such as express, koa When business system, it will cause together with non-traffic module mixes with business module, so that:
1) institutional framework and way of realization that business module is not fixed, and each developer has respective exploitation to be accustomed to, Cause errors repair or later maintenance more difficult;
2) non-traffic module can not directly be multiplexed into other operation systems, reduce the multiplexing energy of development efficiency and code Power.
Summary of the invention
In view of this, the embodiment of the present invention provides a kind of method and device for business processing, it is at least able to solve the prior art Middle business module does not have fixing organization structure and way of realization, non-traffic module not to have the problem of reusability.
To achieve the above object, according to an aspect of an embodiment of the present invention, a kind of method for processing business is provided, is wrapped It includes:
The network request for receiving client transmissions is determined according to the request path and requesting method in the network request Handle the service logic function of the network request;
The service logic function is called, inputs business datum in the network request to the service logic function In, the processing result that the service logic function is fed back is received to return to the client.
Optionally, before the network request for receiving client transmissions, further includes:
The tree construction for receiving business module transmission, determines the root node and child node in the tree construction, will be from described Root node, which is traversed to the path of the child node, is determined as request path;
The request title and service logic function for being included according to the child node, in conjunction with the identified request road Diameter establishes the corresponding relationship of the request path, the request title and the service logic function.
Optionally, the business datum in the input network request is into the service logic function, further includes: point The type of service of the business datum is analysed, determines singleton object corresponding with the business datum;Obtain the singleton object Address information inputs the address information into the service logic function.
Optionally, the request title includes one of obtaining, being newly-built, deleting, modify.
To achieve the above object, according to another aspect of an embodiment of the present invention, a kind of business processing device is provided, is wrapped It includes:
Request receiving module, for receiving the network request of client transmissions, according to the request road in the network request Diameter and request unit determine the service logic function for handling the network request;
Service Processing Module inputs business datum in the network request extremely for calling the service logic function In the service logic function, the processing result that the service logic function is fed back is received to return to the client.
Optionally, further include that relationship establishes module, be used for:
The tree construction for receiving business module transmission, determines the root node and child node in the tree construction, will be from described Root node, which is traversed to the path of the child node, is determined as request path;
The request title and service logic function for being included according to the child node, in conjunction with the identified request road Diameter establishes the corresponding relationship of the request path, the request title and the service logic function.
Optionally, the Service Processing Module, is also used to: analyze the type of service of the business datum, it is determining with it is described The corresponding singleton object of business datum;The address information for obtaining the singleton object inputs the address information to the business In logical function.
Optionally, the request title includes one of obtaining, being newly-built, deleting, modify.
To achieve the above object, according to an embodiment of the present invention in another aspect, providing a kind of business processing electronic equipment.
The electronic equipment of the embodiment of the present invention includes: one or more processors;Storage device, for storing one or more A program, when one or more of programs are executed by one or more of processors, so that one or more of processing Device realizes any of the above-described method for processing business.
To achieve the above object, according to an embodiment of the present invention in another aspect, provide a kind of computer-readable medium, On be stored with computer program, any of the above-described method for processing business is realized when described program is executed by processor.
The scheme of the offer according to the present invention, one embodiment in foregoing invention have the following advantages that or beneficial to effects Fruit: by the institutional framework and way of realization in fixed service module, so that code structure is clear, maintenance cost is reduced;And it can It is directly multiplexed non-traffic frame, conducive to the interaction of business module and non-traffic frame, and then promotes development efficiency.
Further effect possessed by above-mentioned non-usual optional way adds hereinafter in conjunction with specific embodiment With explanation.
Detailed description of the invention
Attached drawing for a better understanding of the present invention, does not constitute an undue limitation on the present invention.Wherein:
Fig. 1 is a kind of main flow schematic diagram of method for processing business according to an embodiment of the present invention;
Fig. 2 is the business module institutional framework schematic diagram comprising four service logics;
Fig. 3 is the pseudocode schematic diagram of a typical service logic function;
Fig. 4 is a kind of main flow schematic diagram of optional method for processing business according to an embodiment of the present invention;
Fig. 5 is whole implementation process schematic of the present invention;
Fig. 6 is a kind of main flow schematic diagram of business processing device according to an embodiment of the present invention;
Fig. 7 is that the embodiment of the present invention can be applied to exemplary system architecture figure therein;
Fig. 8 is adapted for the structural representation for realizing the mobile device of the embodiment of the present invention or the computer system of server Figure.
Specific embodiment
Below in conjunction with attached drawing, an exemplary embodiment of the present invention will be described, including the various of the embodiment of the present invention Details should think them only exemplary to help understanding.Therefore, those of ordinary skill in the art should recognize It arrives, it can be with various changes and modifications are made to the embodiments described herein, without departing from scope and spirit of the present invention.Together Sample, for clarity and conciseness, descriptions of well-known functions and structures are omitted from the following description.
It should be noted that the embodiment of the present invention is suitable for general Web service system, for example, ad placement service system System.
The present invention is mainly used for Node.js language and is described:
Firstly, node.js is the high concurrent io based on event loop, itself does not have the concept of multithreading, therefore this The framework for appearing to be synchronous task can handle high concurrent request in fact, but other Languages cannot be accomplished.Secondly, Object in node belongs to regime type, this is also that service logic tree provides convenience.
Here event loop are as follows: only one main thread, asynchronous task all successively trigger on main thread, and main thread is simultaneously It is not to wait for the completion result of these tasks;Except main thread, there is also a task queues;As long as asynchronous task has operation to tie Fruit just places an event among task queue;Once not having task to be triggered in main thread, system just can read task Event in queue is put into main thread and successively executes by queue;Main thread reads event from task queue, this process is Circulation is continuous.
For word of the present invention, it is explained as follows:
A kind of Javascript: programming language that is advanced, explaining execution.
HTTP: hypertext transfer protocol is a kind of for distributed, collaborative and Hypermedia Information System application layer association View.
Express is a succinct and flexible node.js Web application framework, provides a series of powerful characteristics, helps The various Web of creation are helped to apply and HTTP facility abundant.The net of a complete function can be rapidly built using Express It stands.
Koa is the Web Development Framework for being similar to Express, is mainly characterized by, has used the Generator letter of ES6 Number, has carried out the redesign of framework.That is, the principle and internal structure of Koa be like Express, but grammer and interior Portion's structure is upgraded.
Service code: for realizing the code of user demand.Such as user needs to inquire some data, then directly inquiring Database, the code returned the result are exactly service code.
Non-traffic code: auxiliary activities code can generally be detached from business and existing code, for example, user query some Data receive user's input and are likely to occur Chinese incorrect codes, and the code at this moment solving Chinese incorrect codes is not directly contained in user's In purpose, it can be detached from current business, be applied in other business, this code is exactly non-traffic code.
Referring to Fig. 1, thus it is shown that a kind of broad flow diagram of method for processing business provided in an embodiment of the present invention, including such as Lower step:
S101: receiving the network request of client transmissions, according to the request path and requesting method in the network request, Determine the service logic function for handling the network request;
S102: calling the service logic function, inputs business datum in the network request to the service logic In function, the processing result that the service logic function is fed back is received to return to the client.
In above embodiment, for step S101, non-traffic frame includes multiple non-traffic modules.Master of the present invention It to be illustrated from non-traffic frame angle.
Network request is usually various, for example, HTTP request, HTTPS request, the present invention are mainly said with HTTP request It is bright.
When server-side receives certain HTTP request of requestor (such as client) transmission, non-traffic frame parses first The path (abbreviation request path) of uniform resource locator and requesting method in the request.
Business module includes institutional framework, and institutional framework includes service logic function, requests title and request path, A tree is integrally formed.Non-traffic frame is by traversing the tree, from the root node of tree to business function (leaf Node) path in, formed HTTP request path+HTTP verb.All leaf nodes are traversed, a path+filename-is established The dictionary (it can be appreciated that being corresponding relationship) of > file content (business function).
Here requesting method, mainly includes get, post, delete, put, and corresponding meaning is to obtain, is new respectively It builds, delete, modify, include the business module institutional framework of four service logics for one referring specifically to shown in Fig. 2.
It should be noted that the present invention for the requesting method quantity in institutional framework with no restrictions, only one shown in Fig. 2 A very simply example.
Therefore, when receiving a HTTP request, subsequent non-traffic frame is according to " the request path+ask in network request Seek method ", it can navigate on correct service logic function, be convenient for subsequent calls.Assuming that have a requesting method be POST, Path is the/HTTP request of api/adv, and non-traffic frame can search for dictionary, and finding key is the/newly-built wound of api/adv/ POST The service logic function of meaning.
For step S102, after determining service logic function, it can be called, such as calling/api/adv/@ The service logic function of the newly-built intention of POST, and input the business datum in this request (such as user needs to inquire some Data) into the service logic function, it waits function implementing result and returns to this requestor.
If but there is exception in the process of implementation in service logic function, and it is abnormal that non-traffic frame can capture this time, and concentrates Carry out abnormality processing.
It should be noted that abnormality detection, abnormality processing are all the more mature technology in this field, non-traffic lower portion Special exception handling is had, is anomaly divided into two kinds, trappable exception and the exception not captured.Service logic function is such as Fruit directly can throw exception by throw since mistake occur in some parameter verifications etc.;The generally known some time does not have Processing result, this is timeout exception, and is automatically processed by non-traffic frame, and business function is indifferent to.
For abnormal centralized processing, after usually exception information is returned to requestor or record log and is alarmed The service of restarting.In addition, a part for also belonging to non-traffic frame is restarted in service.
In addition to above-mentioned business datum, non-traffic frame can also be by the ground of example or singleton object in non-traffic module Location information is input to service logic function and makes requests processing.
Here explain non-traffic module singleton object: singleton object is that only one instantiates in system running environment Non-traffic module.
It is all typically now using Object-Oriented Programming, an object is the module that can be realized single standalone feature (including member data and member method), such as log recording object, rubbish cleaning object, database connection pool object etc.. The set of various functional objects and non-traffic frame is constituted to the calling of these objects.Each object is in calculator memory Certain memory space will be occupied, singleton object is then to guarantee that the object has and only unique one in current operating environment It is a.
When servicing starting, non-traffic frame can instantiate all non-traffic modules in memory, create these Singleton object.Once there is HTTP request arrival, non-traffic frame can find corresponding business according to request path+requesting method and patrol Volume function simultaneously calls, pass to the function there are two parameters, first parameter is exactly business datum, and second parameter is exactly this The address (being also considered as pointer, the reference of singleton object is easy to understand) of a little singleton objects in memory.
According to the address of singleton object, service logic function can search out these singleton objects in memory.It compares Non-traffic frame extracts singleton object and is transmitted to service logic function again, improves acquisition of the service logic function to singleton object Speed.
Utilize some data methods having by oneself in the member data and member method and the function in these singleton objects Deng the business datum of processing HTTP request, processing result is finally returned that.Referring to Fig. 3, a typical service logic letter is shown Several pseudocodes.
Singleton number of objects is numerous, therefore for singleton object, can only obtain it is associated with business datum, obtain according to According to the type of service for business datum.For example, logger can automatically record transmitting/reception business function data, furthermore The reference (i.e. address information) of log recording object can also be passed to business function by non-traffic frame, and business function can be convenient Customized record need log information.
Alternatively, it is also possible to obtain the address information of all singleton objects in non-traffic frame, it is convenient for service logic function According to these address informations, all singleton objects are called from memory;Further, can also obtain these singleton objects and Directly/selectivity uses, and prevents from subsequent also needing to obtain from memory again when using some functions.
It should be noted that non-traffic frame is when servicing starting, and it is just linked to have got well database, in the business of calling The database object that chain connects can be passed to it with request to be treated together when logical function.
In conclusion service logic function further includes its way of realization: inputting as business datum and non-traffic module list The reference of example object, i.e., what is called every time is all the same object, and the processing result of returned data, if being abnormal directly It dishes out mistake.
Method provided by above-described embodiment provides a kind of a kind of business module based on node.js and non-traffic mould The service system structure of block separation, by the institutional framework and way of realization in fixed service module, makes in the system architecture It is clear to obtain code structure, maintenance cost reduces;And it can be directly multiplexed non-traffic frame, conducive to business module and non-traffic frame Interaction reduces development cost, promotes development efficiency.
Referring to fig. 4, thus it is shown that a kind of broad flow diagram of optional method for processing business provided in an embodiment of the present invention, Include the following steps:
S401: receiving the tree construction of business module transmission, determine the root node and child node in the tree construction, will be from The root node, which is traversed to the path of the child node, is determined as request path;
S402: the request title and service logic function for being included according to the child node described are asked in conjunction with identified Path is asked, the corresponding relationship of the request path, the request title and the service logic function is established;
S403: receiving the network request of client transmissions, according to the request path and requesting method in the network request, Determine the service logic function for handling the network request;
S404: calling the service logic function, inputs business datum in the network request to the service logic In function, the processing result that the service logic function is fed back is received to return to the client.
In above embodiment, step S403, S404 can be retouched step S101 and S102 shown in Figure 1 respectively It states, details are not described herein.
In above embodiment, for step S401 and S402, business module includes institutional framework, in institutional framework In, for convenient for management and subsequent query, every service logic is packaged into Javascript function, all service logic letters Array is made into a Multiway Tree Structure (Javascript object).
In tree construction, each tree node (non-leaf nodes) just represents the name in a path, is similar in computer File.Every service logic function is a leaf node on tree construction, and the name of leaf node is "@+HTTP request Method ", content are business function (filename and file content in similar computer).For "@" here, or other Form, such as #, *, &, as long as playing the role of distinguishing path and requesting method.
In server-side start-up course, the root node of Multiway Tree Structure is passed to non-traffic frame, non-industry by business module Business frame is the overall structure of system, with business unrelated, reusable different similar to the frame configuration of animal in fact.
Non-traffic frame is aware of after the root node of tree, so that it may be traversed all service logic functions, be established respectively One path and HTTP verb are into the dictionary of service logic function, or can be understood as establishing path, HTTP verb and business The corresponding relationship of logical function.
Here traversal mode can be depth-first traversal (Depth First Search), or range is excellent First traverse (Breadth First Search):
It 1) is along the node of the extreme saturation tree of tree, with point of search tree as deep as possible for depth-first traversal Branch;
2) for breadth first traversal, breadth-first search or breadth-first search are called, be since root node along The width searches of tree traverse.
Two kinds of traversal modes are different, but acquired results are consistent, usually using depth-first traversal mode.
Business function is organized together by tree, from the root node of tree to the path of business function (leaf node) In, form HTTP request path+HTTP verb.Convenient for it is understood that can be regarded as being a file, nested text from level to level Part folder constitutes path;The name of file is+HTTP request method in file, and the content in file is business function, outermost The file of layer is exactly root node (having been described before).Whole file in traverse folder establishes a path+file Name -- the dictionary of > file content (business function), overall structure is referring specifically to shown in Fig. 5.
With upper type, in multiple person cooperational exploitation, institutional framework and way of realization based on business module are unified, can be with Realize the unified management of system architecture.For example, log recording singleton object logger, can provide logger.debug, The interfaces such as logger.log, logger.error are used for service logic function.Developer only needs to pay close attention to other modules Interface.
Method provided by above-described embodiment, the way of realization of institutional framework and service logic function to business module into Row is unified, so that code structure is clear, convenient for the system architecture unified managementization when more people develop operation system, reduces simultaneously Maintenance cost.
Referring to Fig. 6, a kind of main modular schematic diagram of business processing device 600 provided in an embodiment of the present invention is shown, Include:
Request receiving module 601, for receiving the network request of client transmissions, according to the request in the network request Path and request unit determine the service logic function for handling the network request;
Service Processing Module 602 inputs the business datum in the network request for calling the service logic function To in the service logic function, the processing result that the service logic function is fed back is received to return to the client.
Implementing device of the present invention further includes that relationship establishes module 603 (not marking in figure), is used for:
The tree construction for receiving business module transmission, determines the root node and child node in the tree construction, will be from described Root node, which is traversed to the path of the child node, is determined as request path;
The request title and service logic function for being included according to the child node, in conjunction with the identified request road Diameter establishes the corresponding relationship of the request path, the request title and the service logic function.
Implementing device of the present invention, the Service Processing Module 602, is also used to: the type of service of the business datum is analyzed, Determine singleton object corresponding with the business datum;The address information for obtaining the singleton object, inputs the address information To in the service logic function.
In implementing device of the present invention, the request title includes one of obtaining, being newly-built, deleting, modify.
In addition, the specific implementation content of the business processing device described in embodiments of the present invention, business described above It has been described in detail in processing method, therefore has no longer illustrated in this duplicate contents.
Fig. 7 is shown can be using the method for processing business of the embodiment of the present invention or the exemplary system of business processing device Framework 700.
As shown in fig. 7, system architecture 700 may include terminal device 701,702,703, network 704 and server 705 (only example).Network 704 between terminal device 701,702,703 and server 705 to provide Jie of communication link Matter.Network 704 may include various connection types, such as wired, wireless communication link or fiber optic cables etc..
User can be used terminal device 701,702,703 and be interacted by network 704 with server 705, to receive or send out Send message etc..Various telecommunication customer end applications can be installed on terminal device 701,702,703.
Terminal device 701,702,703 can be the various electronic equipments with display screen and supported web page browsing, packet Include but be not limited to smart phone, tablet computer, pocket computer on knee and desktop computer etc..
Server 705 can be to provide the server of various services, such as utilize terminal device 701,702,703 to user The shopping class website browsed provides the back-stage management server (merely illustrative) supported.Back-stage management server can be to reception To the data such as information query request carry out the processing such as analyzing, and processing result is fed back into terminal device.
It should be noted that method for processing business provided by the embodiment of the present invention is generally executed by server 705, accordingly Ground, business processing device are generally positioned in server 705.
It should be understood that the number of terminal device, network and server in Fig. 7 is only schematical.According to realization need It wants, can have any number of terminal device, network and server.
Below with reference to Fig. 8, it illustrates the computer systems 800 for the terminal device for being suitable for being used to realize the embodiment of the present invention Structural schematic diagram.Terminal device shown in Fig. 8 is only an example, function to the embodiment of the present invention and should not use model Shroud carrys out any restrictions.
As shown in figure 8, computer system 800 includes central processing unit (CPU) 801, it can be read-only according to being stored in Program in memory (ROM) 802 or be loaded into the program in random access storage device (RAM) 803 from storage section 808 and Execute various movements appropriate and processing.In RAM 803, also it is stored with system 800 and operates required various programs and data. CPU 801, ROM 802 and RAM 803 are connected with each other by bus 804.Input/output (I/O) interface 805 is also connected to always Line 804.
I/O interface 805 is connected to lower component: the importation 806 including keyboard, mouse etc.;It is penetrated including such as cathode The output par, c 807 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section 808 including hard disk etc.; And the communications portion 809 of the network interface card including LAN card, modem etc..Communications portion 809 via such as because The network of spy's net executes communication process.Driver 810 is also connected to I/O interface 805 as needed.Detachable media 811, such as Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 810, in order to read from thereon Computer program be mounted into storage section 808 as needed.
Particularly, disclosed embodiment, the process described above with reference to flow chart may be implemented as counting according to the present invention Calculation machine software program.For example, embodiment disclosed by the invention includes a kind of computer program product comprising be carried on computer Computer program on readable medium, the computer program include the program code for method shown in execution flow chart.? In such embodiment, which can be downloaded and installed from network by communications portion 809, and/or from can Medium 811 is dismantled to be mounted.When the computer program is executed by central processing unit (CPU) 801, system of the invention is executed The above-mentioned function of middle restriction.
It should be noted that computer-readable medium shown in the present invention can be computer-readable signal media or meter Calculation machine readable storage medium storing program for executing either the two any combination.Computer readable storage medium for example can be --- but not Be limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination.Meter The more specific example of calculation machine readable storage medium storing program for executing can include but is not limited to: have the electrical connection, just of one or more conducting wires Taking formula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed read-only storage Device (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device, Or above-mentioned any appropriate combination.In the present invention, computer readable storage medium can be it is any include or storage journey The tangible medium of sequence, the program can be commanded execution system, device or device use or in connection.And at this In invention, computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal, Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimited In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for By the use of instruction execution system, device or device or program in connection.Include on computer-readable medium Program code can transmit with any suitable medium, including but not limited to: wireless, electric wire, optical cable, RF etc. are above-mentioned Any appropriate combination.
Flow chart and block diagram in attached drawing are illustrated according to the system of various embodiments of the invention, method and computer journey The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation A part of one module, program segment or code of table, a part of above-mentioned module, program segment or code include one or more Executable instruction for implementing the specified logical function.It should also be noted that in some implementations as replacements, institute in box The function of mark can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are practical On can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it wants It is noted that the combination of each box in block diagram or flow chart and the box in block diagram or flow chart, can use and execute rule The dedicated hardware based systems of fixed functions or operations is realized, or can use the group of specialized hardware and computer instruction It closes to realize.
Being described in module involved in the embodiment of the present invention can be realized by way of software, can also be by hard The mode of part is realized.Described module also can be set in the processor, for example, can be described as: a kind of processor packet Include request receiving module, Service Processing Module.Wherein, the title of these modules is not constituted under certain conditions to the module sheet The restriction of body, for example, request receiving module is also described as " receiving the module of network request ".
As on the other hand, the present invention also provides a kind of computer-readable medium, which be can be Included in equipment described in above-described embodiment;It is also possible to individualism, and without in the supplying equipment.Above-mentioned calculating Machine readable medium carries one or more program, when said one or multiple programs are executed by the equipment, makes Obtaining the equipment includes:
The network request for receiving client transmissions is determined according to the request path and requesting method in the network request Handle the service logic function of the network request;
The service logic function is called, inputs business datum in the network request to the service logic function In, the processing result that the service logic function is fed back is received to return to the client.
Technical solution according to an embodiment of the present invention, the realization shape of institutional framework and service logic function to business module Formula carries out unification, so that code structure is clear, convenient for the system architecture unified managementization when more people develop operation system, simultaneously Reduce maintenance cost;And it can be directly multiplexed non-traffic frame, conducive to the interaction of business module and non-traffic frame, reduce exploitation Cost promotes development efficiency.
Above-mentioned specific embodiment, does not constitute a limitation on the scope of protection of the present invention.Those skilled in the art should be bright It is white, design requirement and other factors are depended on, various modifications, combination, sub-portfolio and substitution can occur.It is any Made modifications, equivalent substitutions and improvements etc. within the spirit and principles in the present invention, should be included in the scope of the present invention Within.

Claims (10)

1. a kind of method for processing business characterized by comprising
The network request for receiving client transmissions determines processing according to the request path and requesting method in the network request The service logic function of the network request;
The service logic function is called, the business datum in the network request is inputted into the service logic function, connects The processing result that the service logic function is fed back is received to return to the client.
2. the method according to claim 1, wherein it is described receive client transmissions network request before, Further include:
The tree construction for receiving business module transmission, determines the root node and child node in the tree construction, will save from described Point traversal to the path of the child node is determined as request path;
The request title and service logic function for being included according to the child node are built in conjunction with the identified request path Found the corresponding relationship of the request path, the request title and the service logic function.
3. the method according to claim 1, wherein business datum in the input network request is to institute It states in service logic function, further includes:
The type of service of the business datum is analyzed, determines singleton object corresponding with the business datum;
The address information for obtaining the singleton object inputs the address information into the service logic function.
4. the method according to claim 1, wherein the request title includes obtaining, being newly-built, deleting, modifying One of.
5. a kind of business processing device characterized by comprising
Request receiving module, for receiving the network request of client transmissions, according in the network request request path and Request unit determines the service logic function for handling the network request;
Service Processing Module inputs business datum in the network request to described for calling the service logic function In service logic function, the processing result that the service logic function is fed back is received to return to the client.
6. device according to claim 5, which is characterized in that further include that relationship establishes module, be used for:
The tree construction for receiving business module transmission, determines the root node and child node in the tree construction, will save from described Point traversal to the path of the child node is determined as request path;
The request title and service logic function for being included according to the child node are built in conjunction with the identified request path Found the corresponding relationship of the request path, the request title and the service logic function.
7. device according to claim 5, which is characterized in that the Service Processing Module is also used to:
The type of service of the business datum is analyzed, determines singleton object corresponding with the business datum;Obtain the singleton The address information of object inputs the address information into the service logic function.
8. device according to claim 5, which is characterized in that the request title includes obtaining, being newly-built, deleting, modifying One of.
9. a kind of electronic equipment characterized by comprising
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors are real The now method as described in any in claim 1-4.
10. a kind of computer-readable medium, is stored thereon with computer program, which is characterized in that described program is held by processor The method as described in any in claim 1-4 is realized when row.
CN201910043576.9A 2019-01-17 2019-01-17 Service processing method and device Active CN109783562B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910043576.9A CN109783562B (en) 2019-01-17 2019-01-17 Service processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910043576.9A CN109783562B (en) 2019-01-17 2019-01-17 Service processing method and device

Publications (2)

Publication Number Publication Date
CN109783562A true CN109783562A (en) 2019-05-21
CN109783562B CN109783562B (en) 2024-03-01

Family

ID=66500947

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910043576.9A Active CN109783562B (en) 2019-01-17 2019-01-17 Service processing method and device

Country Status (1)

Country Link
CN (1) CN109783562B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110879756A (en) * 2019-10-31 2020-03-13 深圳市泰洲科技有限公司 Method and device for processing abnormal cooperation process, computer equipment and storage medium
CN111143828A (en) * 2019-12-11 2020-05-12 中盈优创资讯科技有限公司 Safety control method and device for Web page and service
CN111966334A (en) * 2020-08-17 2020-11-20 支付宝(杭州)信息技术有限公司 Service processing method, device and equipment
CN114157535A (en) * 2021-10-15 2022-03-08 北京国电通网络技术有限公司 Double-responsibility chain micro-service gateway system and processing method thereof
CN116846752A (en) * 2023-07-28 2023-10-03 钛信(上海)信息科技有限公司 Multi-cloud resource management method and system based on business scene

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120226737A1 (en) * 2011-03-01 2012-09-06 Infosys Technologies Limited Method and system for reducing service overhead in service oriented architectures
CN105630472A (en) * 2014-11-03 2016-06-01 中国科学院沈阳自动化研究所 Quick client development frame for manufacturing execution system and software development method for frame
CN105989153A (en) * 2015-03-02 2016-10-05 阿里巴巴集团控股有限公司 Interaction method and device of database
US20160364277A1 (en) * 2014-02-11 2016-12-15 Evado Holdings Pty Ltd A method for using user session data to provide middle-ware
CN108132880A (en) * 2017-12-21 2018-06-08 武汉斑马快跑科技有限公司 A kind of parameter verification method and device
CN108255802A (en) * 2016-12-29 2018-07-06 北京国双科技有限公司 Generic text Analytical framework and the method and apparatus based on framework parsing text

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120226737A1 (en) * 2011-03-01 2012-09-06 Infosys Technologies Limited Method and system for reducing service overhead in service oriented architectures
US20160364277A1 (en) * 2014-02-11 2016-12-15 Evado Holdings Pty Ltd A method for using user session data to provide middle-ware
CN105630472A (en) * 2014-11-03 2016-06-01 中国科学院沈阳自动化研究所 Quick client development frame for manufacturing execution system and software development method for frame
CN105989153A (en) * 2015-03-02 2016-10-05 阿里巴巴集团控股有限公司 Interaction method and device of database
CN108255802A (en) * 2016-12-29 2018-07-06 北京国双科技有限公司 Generic text Analytical framework and the method and apparatus based on framework parsing text
CN108132880A (en) * 2017-12-21 2018-06-08 武汉斑马快跑科技有限公司 A kind of parameter verification method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
徐鸣;孙德忠;: "国土资源测绘管理系统架构研究与设计", 信息与电脑(理论版), no. 01 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110879756A (en) * 2019-10-31 2020-03-13 深圳市泰洲科技有限公司 Method and device for processing abnormal cooperation process, computer equipment and storage medium
CN110879756B (en) * 2019-10-31 2023-10-17 深圳市泰洲科技有限公司 Collaborative process exception handling method, collaborative process exception handling device, computer equipment and storage medium
CN111143828A (en) * 2019-12-11 2020-05-12 中盈优创资讯科技有限公司 Safety control method and device for Web page and service
CN111966334A (en) * 2020-08-17 2020-11-20 支付宝(杭州)信息技术有限公司 Service processing method, device and equipment
CN114157535A (en) * 2021-10-15 2022-03-08 北京国电通网络技术有限公司 Double-responsibility chain micro-service gateway system and processing method thereof
CN114157535B (en) * 2021-10-15 2024-03-12 北京国电通网络技术有限公司 Double-responsibility chain micro-service gateway system and processing method thereof
CN116846752A (en) * 2023-07-28 2023-10-03 钛信(上海)信息科技有限公司 Multi-cloud resource management method and system based on business scene

Also Published As

Publication number Publication date
CN109783562B (en) 2024-03-01

Similar Documents

Publication Publication Date Title
US20230147358A1 (en) Composition of pattern-driven reactions in real-time dataflow programming
CN109783562A (en) A kind of method and device for business processing
US10942708B2 (en) Generating web API specification from online documentation
CN110032575A (en) Data query method, apparatus, equipment and storage medium
US8751558B2 (en) Mashup infrastructure with learning mechanism
CN106559438A (en) A kind of program method for uploading and device based on objective network platform
CN110310034A (en) A kind of service orchestration applied to SaaS, business flow processing method and apparatus
CN109445835A (en) Method, terminal device and the computer readable storage medium of building project frame
CN109033406B (en) Method, apparatus and storage medium for searching blockchain data
US8745096B1 (en) Techniques for aggregating data from multiple sources
CN109271403A (en) A kind of operating method of data query, device, medium and electronic equipment
CN109033403A (en) For searching for the method, apparatus and storage medium of block chain data
CN110347428A (en) A kind of detection method and device of code similarity
CN109101607A (en) For searching for the method, apparatus and storage medium of block chain data
CN110019158A (en) A kind of method and apparatus of monitoring data quality
CN109189395A (en) A kind of data analysis method and device
CN110019044A (en) Big data cluster quasi real time Yarn Mission Monitor analysis method
CN110083457A (en) A kind of data capture method, device and data analysing method, device
CN110109983A (en) A kind of method and apparatus operating Redis database
CN110110153A (en) A kind of method and apparatus of node searching
CN113962597A (en) Data analysis method and device, electronic equipment and storage medium
CN108959294A (en) A kind of method and apparatus accessing search engine
CN113760961A (en) Data query method and device
CN109788010A (en) A kind of method and apparatus of data localization access
CN113515285A (en) Method and device for generating real-time calculation logic data

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