CN110213250A - Data processing method and terminal device - Google Patents
Data processing method and terminal device Download PDFInfo
- Publication number
- CN110213250A CN110213250A CN201910422899.9A CN201910422899A CN110213250A CN 110213250 A CN110213250 A CN 110213250A CN 201910422899 A CN201910422899 A CN 201910422899A CN 110213250 A CN110213250 A CN 110213250A
- Authority
- CN
- China
- Prior art keywords
- interface
- gateway
- user terminal
- gateway interface
- authentication
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/08—Network architectures or network communication protocols for network security for authentication of entities
- H04L63/083—Network architectures or network communication protocols for network security for authentication of entities using passwords
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/08—Network architectures or network communication protocols for network security for authentication of entities
- H04L63/0876—Network architectures or network communication protocols for network security for authentication of entities based on the identity of the terminal or configuration, e.g. MAC address, hardware or software configuration or device fingerprint
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE 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/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Abstract
The present invention is suitable for computer application technology, provides a kind of data processing method, terminal device and computer readable storage medium, comprising: passes through and receives the data processing request that user terminal is sent;According to the processing task in data processing request, the target information of intended gateway interface corresponding with the processing task and the intended gateway interface is determined in preset gateway interface database, and the target information is sent to the user terminal;Receive the authentication request that the user terminal is sent according to the target information, the authentication request is verified according to the authentication rules prestored, pending data is finally handled by invocation target gateway interface after being verified, the call flow and step when multiple gateways and interface call are simplified, interface is improved and calls and the efficiency of data processing.
Description
Technical field
The invention belongs to computer application technology more particularly to a kind of data processing methods, terminal device and calculating
Machine readable storage medium storing program for executing.
Background technique
With the fast development of IT application in enterprises, more and more enterprises select software management systems to support in enterprise
Various activities, business management software play the part of more and more important role in business administration.But in enterprise management system
The diversification of type of service not only needs to call the gateway data of network level to handle, also needs during many service operations
Interface corresponding with data function is called again in interface layer, operating process is cumbersome, and the time of data processing consumption is longer.Especially
It is in the higher situation of security requirement of operation system, and calling each time is required to be authenticated or be verified, this
Also the problem of more increasing the cost of data processing, cause gateway and interface calling procedure cumbersome, reducing data-handling efficiency.
Summary of the invention
In view of this, the embodiment of the invention provides a kind of data processing method, terminal device and computer-readable storages
Medium, to solve in the prior art when by calling gateway and interface to handle data, gateway and interface calling procedure are cumbersome, drop
The problem of low data-handling efficiency.
The first aspect of the embodiment of the present invention provides a kind of data processing method, comprising:
Receive the data processing request that user terminal is sent;It include pending data and place in the data processing request
Manage the processing task of the pending data;
According to the processing task, target corresponding with the processing task is determined in preset gateway interface database
The target information of gateway interface and the intended gateway interface, and the target information is sent to the user terminal;Institute
Gateway interface database is stated for storage management to the gateway interface under various businesses environment;The gateway interface is according to each
The gateway of data and the data-processing interface of interface synthesis are handled in service environment;
The authentication request that the user terminal is sent according to the target information is received, according to the authentication rules prestored to institute
It states authentication request to be verified, and after being verified, calls the intended gateway interface to handle the user terminal and send
Pending data.
The second aspect of the embodiment of the present invention provides a kind of terminal device, including memory, processor and is stored in
In the memory and the computer program that can run on the processor, when the processor executes the computer program
It performs the steps of
Receive the data processing request that user terminal is sent;It include pending data and place in the data processing request
Manage the processing task of the pending data;
According to the processing task, target corresponding with the processing task is determined in preset gateway interface database
The target information of gateway interface and the intended gateway interface, and the target information is sent to the user terminal;Institute
Gateway interface database is stated for storage management to the gateway interface under various businesses environment;The gateway interface is according to each
The gateway of data and the data-processing interface of interface synthesis are handled in service environment;
The authentication request that the user terminal is sent according to the target information is received, according to the authentication rules prestored to institute
It states authentication request to be verified, and after being verified, calls the intended gateway interface to handle the user terminal and send
Pending data.
The third aspect of the embodiment of the present invention provides a kind of terminal device, comprising:
Receiving unit, for receiving the data processing request of user terminal transmission;Include in the data processing request to
Handle the processing task of data and the processing pending data;
Transmission unit is used for the determining and processing in preset gateway interface database according to the processing task
The target information of the corresponding intended gateway interface of task and the intended gateway interface, and the target information is sent to institute
State user terminal;The gateway interface database is for storage management to the gateway interface under various businesses environment;The gateway
Interface is the data-processing interface according to the gateway and interface synthesis that handle data in each service environment;
Authentication unit, the authentication request sent for receiving the user terminal according to the target information, according to prestoring
Authentication rules the authentication request is verified, and after being verified, call intended gateway interface processing institute
State the pending data of user terminal transmission.
The fourth aspect of the embodiment of the present invention provides a kind of computer readable storage medium, the computer storage medium
It is stored with computer program, the computer program includes program instruction, and described program instruction makes institute when being executed by a processor
State the method that processor executes above-mentioned first aspect.
Existing beneficial effect is the embodiment of the present invention compared with prior art:
The data processing request that the embodiment of the present invention is sent by receiving user terminal;According to the place in data processing request
Reason task determines intended gateway interface corresponding with the processing task and the mesh in preset gateway interface database
The target information of gateway interface is marked, and the target information is sent to the user terminal;Receive the user terminal according to
The authentication request that the target information is sent, verifies the authentication request according to the authentication rules prestored, is finally testing
Card simplifies tune when multiple gateways and interface calling by handling pending data by invocation target gateway interface later
With process and step, the efficiency of interface calling and data processing is improved.
Detailed description of the invention
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to embodiment or description of the prior art
Needed in attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description is only of the invention some
Embodiment for those of ordinary skill in the art without any creative labor, can also be according to these
Attached drawing obtains other attached drawings.
Fig. 1 is the flow chart for the data processing method that the embodiment of the present invention one provides;
Fig. 2 is the flow chart of data processing method provided by Embodiment 2 of the present invention;
Fig. 3 is the schematic diagram for the terminal device that the embodiment of the present invention three provides;
Fig. 4 is the schematic diagram for the terminal device that the embodiment of the present invention four provides.
Specific embodiment
In being described below, for illustration and not for limitation, the tool of such as particular system structure, technology etc is proposed
Body details, to understand thoroughly the embodiment of the present invention.However, it will be clear to one skilled in the art that there is no these specific
The present invention also may be implemented in the other embodiments of details.In other situations, it omits to well-known system, device, electricity
The detailed description of road and method, in case unnecessary details interferes description of the invention.
In order to illustrate technical solutions according to the invention, the following is a description of specific embodiments.
It is the flow chart for the data processing method that the embodiment of the present invention one provides referring to Fig. 1, Fig. 1.Data in the present embodiment
The executing subject of processing method is terminal.Terminal includes but is not limited to that smart phone, tablet computer, wearable device etc. are mobile eventually
End, can also be server, desktop computer etc..Data processing method as shown in the figure may comprise steps of:
S101: the data processing request that user terminal is sent is received;It include pending data in the data processing request
And the processing task of the processing pending data;
Receive user terminal send data processing request, can be determined by data processing request in user terminal to
The data of processing and the processing task of pending data.Pending data in the present embodiment can be in system supervisor
The data of caching are also possible to the data that user is inputted by user terminal, can also be by being inputted according to user terminal
The data etc. that data generate, herein without limitation.Processing task in the present embodiment can be user's registration, user log in, on
The data processing tasks such as data or storing data are passed, herein without limitation.
Further, we can also verify the data after the data processing request for receiving user terminal transmission
Handle the correctness or realizability of request.Wherein, correctness be used to indicate the format of data processing request, requesting party and by
Whether requesting party meets normal regulation;Realizability is used to indicate whether the data processing task in data processing request to exceed
The envelop of function for management program of uniting.
S102: according to the processing task, determination is corresponding with the processing task in preset gateway interface database
Intended gateway interface and the intended gateway interface target information, and it is whole that the target information is sent to the user
End.
Gateway interface database is preset in the present embodiment, for storing the corresponding gateway interface of various businesses environment,
In may include each gateway interface interface parameters, interface identifier and authentication mode.Wherein, the interface parameters of gateway interface
May include the information such as parameter type, parameter transfer mode, the interface identifier of gateway interface be used to indicate interface title or
Number etc., the authentication mode of gateway interface are used to verify the user identity or the right to use for the user terminal for calling the gateway interface
Limit.
It should be noted that with the diversification of type of service in enterprise management system, during many service operations
Not only need to call the gateway data of network level to handle, it is also necessary to call connect corresponding with data function again in interface layer
Mouthful, operating process is cumbersome, and the time of data processing consumption is longer.Therefore, it is handled in the present embodiment according in each service environment
The gateway and interface generated data Processing Interface of data, as gateway interface.In this way, as long as user terminal is in determination
And data processing request is had sent, after getting processing task, appointed by being determined in gateway interface database with processing
It is engaged in corresponding intended gateway interface and its target information, it is whole for user to determine target information corresponding with data processing request
Correct gateway interface is called to handle data in end.
Further, step S102 can specifically include step S1021 and S1022:
S1021: it if the corresponding intended gateway interface of the processing task is not present in the gateway interface database, counts
The similarity in the gateway interface database between the corresponding processing task of all-network interface and the processing task is calculated, really
Gateway interface when determining similarity highest is the intended gateway interface.
In practical applications, the data processing that the gateway interface in gateway interface database is often sent with user terminal is asked
Complete correspondence is sought, corresponding interface can be found by data processing request, but is worked as in gateway interface database not
When intended gateway interface corresponding there are data processing request, we are by way of approximate match, from gateway interface database
Middle determination intended gateway interface corresponding with data processing request and its target information.It should be noted that in the present embodiment
Intended gateway interface can be one or more, to guarantee that the function of all intended gateway interfaces can complete corresponding data
Processing task in processing request.
Specifically, after getting the data processing request that user terminal is sent according to business scenario, if occurring not having
There is the scene recorded, then calculates the corresponding processing task of all-network interface in gateway interface database and interface call request
In processing task between similarity, gateway interface when determining similarity highest is intended gateway interface.
Further, it can indicate that each gateway connects by way of keyword or character string code in the present embodiment
Mouthful processing task, not only can the more explicit function to each gateway interface be identified, moreover it is possible at calculating
Increase computational accuracy when managing similarity of tasks.Illustratively, we can indicate to obtain with " entry ", " import "
The interface of data, it is true also according to existing function character functional character string after the interface call request for getting user terminal transmission
Obtained processing task character string is carried out similarity by the processing task in stationary interface call request in gateway interface database
It calculates, it is intended gateway interface that matching, which obtains the highest gateway interface of similarity,.
Further, interface call request corresponding gateway interface can be one in the present embodiment, be also possible to it is multiple, when
These information can be sent to the user terminal by gateway interface there are in the case where multiple, user terminal selecting one of them
Gateway interface is simultaneously called.
S1022: the target information of the intended gateway interface is sent to the user terminal.
After at least one intended gateway interface corresponding with data processing request has been determined, we are by these target networks
The target information for closing interface is sent to the user terminal, so that user terminal can be called by the target information of intended gateway interface
Intended gateway interface realizes data processing task.
S103: receiving the authentication request that the user terminal is sent according to the target information, is advised according to the authentication prestored
Then the authentication request is verified, and after being verified, calls the intended gateway interface to handle the user whole
Hold the pending data sent.
After being sent to the user terminal the target information of intended gateway interface, interface user terminal is according to target information
The authentication request of transmission, to be verified according to the authentication rules of intended gateway interface to the authentication request.And it is being verified
Later, invocation target gateway interface come handle user terminal transmission pending data.
In practical applications, different gateways or the corresponding data processing object of interface are different, and processing mode is different, can
Call the permission of the user terminal of these gateways and interface also different, therefore, in the present embodiment, each gateway interface has it
Corresponding authentication rules, to verify the identity and power of the user terminal for calling the intended gateway interface according to the authentication rules
Limit.Authentication refers to whether verifying user possesses the right of access system, and data processing terminal is sent in interface to user terminal
After authentication request, authentication request is verified according to the target information of intended gateway interface.
It can be verified by password in the present embodiment.The premise of this mode is each user for obtaining password
It has been authorized to.When establishing user, just user distributes a password thus, and the password of user can be specified by administrator,
It can voluntarily be applied by user.
Above scheme, the data processing request sent by receiving user terminal;According to the processing in data processing request
Task determines intended gateway interface corresponding with the processing task and the target in preset gateway interface database
The target information of gateway interface, and the target information is sent to the user terminal;The user terminal is received according to institute
The authentication request for stating target information transmission, verifies the authentication request according to the authentication rules prestored, is finally verifying
By handling pending data by invocation target gateway interface later, calling when multiple gateways and interface calling is simplified
Process and step improve the efficiency of interface calling and data processing.
Referring to fig. 2, Fig. 2 is the flow chart of data processing method provided by Embodiment 2 of the present invention.Data in the present embodiment
The executing subject of processing method is terminal.Terminal includes but is not limited to that smart phone, tablet computer, wearable device etc. are mobile eventually
End, can also be server, desktop computer etc..Data processing method as shown in the figure may comprise steps of:
S201: the data processing request that user terminal is sent is received;It include pending data in the data processing request
And the processing task of the processing pending data.
The implementation of S101 is identical in S201 embodiment corresponding with Fig. 1 in the present embodiment, specifically refers to
The associated description of S101 in the corresponding embodiment of Fig. 1, details are not described herein.
S202: it according to business scenario preset in operation system, determines the corresponding gateway of each business scenario and connects
Mouthful;The gateway using the data of differing transmission protocols in two network segments for carrying out converting mutual biography;The interface is for locating
Manage the pending data in the business scenario.
In practical applications, include many business scenarios in operation system, and also included very in each business scenario
Multi-functional, different functions is also corresponding with different interface or gateway, wherein the quantity of corresponding interface and gateway may be
One, it is also possible to which multiple, in this case, we first determine business scenario included in operation system, are determining
Corresponding interface and gateway under different business scene.With interface corresponding to each business scenario of determination, and to these interfaces into
Row bulk management.
It should be noted that the gateway in the present embodiment is used for the different network interconnection of two upper-layer protocols, to two
It carries out converting mutual biography using the data of differing transmission protocols in network segment;Interface in the present embodiment is for handling various businesses scene
In pending data.
Before the corresponding target information of data processing request for determining user, we are to the business field according to operation system
Scape is analyzed, and determines at least one corresponding interface and gateway under different business scene.Specific analytical procedure is first to determine
Achievable business function in business scenario determines the process for realizing each business function further according to each business function, and
In each process data transmission and processing mode, finally according to data transmission and processing mode determine its corresponding gateway with
Interface, the i.e. corresponding gateway of the business scenario and interface.
S203: the gateway information of the corresponding gateway of the business scenario, the interface message of the interface, and root are obtained
According to the gateway information and the interface message, interface list is generated;Gateway in the gateway information including the gateway reflects
Power rule;It include the interface authentication rules of the interface in the interface message.
According to the business scenario in operation system, after determining the corresponding gateway of each business scenario and interface, obtain
The interface message of the gateway information of the corresponding gateway of each business scenario, interface, and generated according to gateway information and interface message
The interface list.Interface list in the present embodiment is to contain the gateway information and interface message all with display, right
When its gateway and interface merge, it can be merged according to the information in list.
Meanwhile the gateway authentication in gateway information including gateway is regular, includes the interface authentication rule of interface in interface message
Then, for by respective authentication rules come to user terminal identity and permission verify.
S204: according in the interface list the gateway information and the interface message, synthesize the business scenario
Corresponding gateway and interface obtain gateway interface, and synthesize the gateway authentication rule and the interface authentication rules, obtain institute
State the authentication rules of gateway interface;The interface that the authentication rules are used to verify the user terminal for calling the gateway interface calls
Permission.
After generating interface list according to gateway information and interface message, we are according to the gateway information in interface list
And interface message, the corresponding gateway of each business scenario and interface are synthesized, gateway interface is obtained.To need to call gateway respectively
In the business scenario for handling data with interface, a gateway interface is called directly, can realize data processing.
Specifically, when being merged according to interface list corresponding gateway and interface, we can first by gateway information and
Interface message is divided according to information element, interface list is generated according to different gateways, interface and its information element, in interfaces column
It is the title of each information element at the horizontal bar gauge outfit of table, the title at column gauge outfit for each gateway and interface is indulged, according to interface
The information of each gateway and interface at each information element merges in list, while the addition association letter between gateway and interface
Number, with while carrying out message coalescing, the association of complete call.
Further, different according to the targeted use environment of different interfaces, we according to the use environment of interface or
Person handles task, each interface is respectively configured the authentication rules of respective interface.For example A scene needs enterprise to authenticate, B scene
Need personal authentication.In the database by the configuration of corresponding authentication rules, wherein enterprise's authentication needs relevant enterprise for indicating
Information carries out authentication verification, needed for information may include information of the single individual in the business unit, such as work
Number, place portion grading information;Individual's authentication needs personal information or identity information product to carry out authentication, institute for indicating
Needing information includes only the information such as the identity information, such as ID card No., social security number of the individual.Since different scenes needs
Otherwise same authentication mode, or the business scenario having do not need to authenticate.We are according to the gateway for including in business scenario and connect
Mouthful, the gateway authentication rule of gateway is merged with the interface authentication rules of interface, obtains the authentication rules under the business scenario.
We are by merging business scenario corresponding to obtained various authentication rules and each authentication rules, by it
It corresponds.After interface corresponding with the data processing request of user has been determined in gateway interface database, also simultaneously
Authentication rules needed for the data processing request has been determined.
Optionally, the corresponding gateway of a business scenario in the present embodiment and interface can be one of those, can also
Be it is multiple, determine the total quantity of gateway corresponding with business scenario and interface there are it is multiple in the case where, if being directed to
These gateways and interface are called that if being authenticated and handling data, then more time sum number can be wasted respectively one by one
According to resource, therefore, we can be packaged all gateways and interface according to gateway information and interface message.It is being packaged
When, each gateway and interface have the requirement of corresponding request header, and the encapsulation that request header need to carry out is respectively configured.For example A
Industrial and commercial interface under scene need to request format to initiate request according to fixing head, and corresponding format need to be specified in configuration.Example
Property, for example A interface requirement adds the length of this request body in request header, and gateway interface additionally asks similar encapsulation
That seeks head is implemented partly as a general module, and the configuration of request header rule is completed by way of configuring, and gateway passes through reading
These configured rules complete the request header encapsulation of distinct interface, to reduce the operation bidirectional of user.
Specifically, the information that may include in the request header that the gateway interface in the present embodiment is requested has: protocol type, association
Information, the agreements of different editions such as view version number, message identifier, message encryption mode, message body length, the total packet number of message are determined
The interface and message format of justice are different, and the agreement of different editions is incompatible.
After interface configuration finishes, we can also simply test the interface of generation, or pass through user
Service condition, it is whether correct come the configuration of the interface judged, can be by configured interface if interface calling procedure is normal
And its target information is stored into gateway interface database, with can be straight under identical use environment next time or application scenarios
It connects and calls the interface.
S205: the gateway interface and its authentication rules are stored into the gateway interface database.
The interface in each business scenario in operation system is being determined, and after generating interface list, Wo Mengen
According to interface list, the authentication rules of each interface are stored into gateway interface database, are deposited by way of according to interface list
Storage when modification or calling interface, can improve the search efficiency of interface and call efficiency.
S206: according to the processing task, determination is corresponding with the processing task in preset gateway interface database
Intended gateway interface and the intended gateway interface target information, and it is whole that the target information is sent to the user
End;The gateway interface database is used for the corresponding gateway interface of storage management various businesses environment;The gateway interface is root
According to the data-processing interface of the gateway and interface synthesis that handle data in each service environment;
Gateway interface database is preset in the present embodiment, for storing the corresponding gateway interface of various businesses environment,
In may include each gateway interface interface parameters, interface identifier and authentication mode.Wherein, the interface parameters of gateway interface
May include the information such as parameter type, parameter transfer mode, the interface identifier of gateway interface be used to indicate interface title or
Number etc., the authentication mode of gateway interface are used to verify the user identity or the right to use for the user terminal for calling the gateway interface
Limit.
It should be noted that with the diversification of type of service in enterprise management system, during many service operations
Not only need to call the gateway data of network level to handle, it is also necessary to call connect corresponding with data function again in interface layer
Mouthful, operating process is cumbersome, and the time of data processing consumption is longer.Therefore, it is handled in the present embodiment according in each service environment
The gateway and interface generated data Processing Interface of data, as gateway interface.In this way, as long as user terminal is in determination
And data processing request is had sent, after getting processing task, appointed by being determined in gateway interface database with processing
It is engaged in corresponding intended gateway interface and its target information, it is whole for user to determine target information corresponding with data processing request
Correct gateway interface is called to handle data in end.
S207: receiving the authentication request that the user terminal is sent according to the target information, is advised according to the authentication prestored
Then the authentication request is verified, and after being verified, calls the intended gateway interface to handle the user whole
Hold the pending data sent.
After being sent to the user terminal the target information of intended gateway interface, interface user terminal is according to target information
The authentication request of transmission, to be verified according to the authentication rules of intended gateway interface to the authentication request.And it is being verified
Later, invocation target gateway interface come handle user terminal transmission pending data.
S2071: the authentication request that the user terminal is sent is received, and according to the authentication rules to the authentication request
It is verified.
After being sent to the user terminal the target information of intended gateway interface, user terminal is sent according to target information
Authentication request is to data processing terminal, and data processing terminal is after the authentication request for receiving user terminal transmission, according to mesh
The authentication rules and target information for marking gateway interface verify authentication request.
Optionally, it can be verified by password in the present embodiment, be protected in the authentication request that user terminal is sent
The user account and user password of user terminal, authentication rules, that is, password authentification rule of corresponding gateway interface.This side
The premise of formula is that each user for obtaining password has been authorized to.When establishing user, just thus user distribute one it is close
Code, the password of user can be specified by administrator, can also voluntarily be applied by user.
S2072: it is verified if the authentication request passes through, and when there are at least two intended gateway interfaces, then root
The data processing request and each intended gateway interface sent according to the user terminal constructs thread pool;The thread pool
In include the same number of thread with the intended gateway interface.
After being verified according to authentication rules and target information to authentication request, if authentication request is verified,
It indicates that current user terminal can handle data with invocation target gateway interface, handles user's end by intended gateway interface
Hold the pending data sent.If authentication request verifying does not pass through, then it represents that the current permission of user terminal is unable to invocation target
The authentication request error that gateway interface or user terminal are sent can send to user terminal and resubmit in this case
The notice of authentication request can also directly reject the data processing request of user terminal transmission.
Further, if the authentication request passes through verifying, it is understood that there may be at least two intended gateway interfaces, it is this
In the case of, the data processing request and each intended gateway interface that we send according to user terminal construct thread pool.
Wherein, include the same number of thread with intended gateway interface in thread pool, establish thread initiation in user terminal respectively and connect
Mouth calls, and achievees the purpose that concurrent invocation, reduces the interface response time.
S2073: according to the thread in thread pool described in the priority parallel calling of each intended gateway interface to handle
State the pending data in data processing request.
The priority of each intended gateway interface can be set in the present embodiment, for indicating in multiple intended gateway interfaces
Order of priority when parallel calling.The set-up mode of priority can be according to the significance level of business scenario and set, important
Degree more high priority is higher or the estimated processing data duration of business scenario is set, it is contemplated that handling duration is longer, preferentially
Grade is lower.
Thread pool in the present embodiment is multiple threads form, and task is added queue in treatment process, is then being created
It builds after thread and parallel calling is carried out according to the priority of intended gateway interface, per thread all uses the storehouse size of default, with
The priority of default is run, and is in multiple thread units, if some thread is idle in Managed Code, thread pool will be inserted
Enter another worker thread to make all processors keep busy.If all thread pools all remain busy, but in queue
Work comprising hang-up, then the number of worker thread over time is never more than maximum value by thread pool.More than most
The thread being worth greatly can be lined up, but they will be until that could start after the completion of other threads.
It should be noted that the pending data in the present embodiment is to pass through invocation target gateway interface by user terminal,
The data of data processing terminal are sent to, these data can be as authentication request is sent together, be also possible to logical in authentication
It is sent after crossing, herein without limitation.
Above scheme, the data processing request sent by receiving user terminal;According to business preset in operation system
Scene determines the corresponding gateway of each business scenario and interface;Obtain the net of the corresponding gateway of the business scenario
Information, the interface message of the interface are closed, and according to the gateway information and the interface message, generates interface list;According to
The gateway information and the interface message in the interface list, synthesize the corresponding gateway of the business scenario and interface obtains
To gateway interface, and the gateway authentication rule and the interface authentication rules are synthesized, obtains the authentication rule of the gateway interface
Then;The gateway interface and its authentication rules are stored into the gateway interface database.According to the place in data processing request
Reason task determines intended gateway interface corresponding with the processing task and the mesh in preset gateway interface database
The target information of gateway interface is marked, and the target information is sent to the user terminal;Receive the user terminal according to
The authentication request that the target information is sent, verifies the authentication request according to the authentication rules prestored, is finally testing
Card simplifies tune when multiple gateways and interface calling by handling pending data by invocation target gateway interface later
With process and step, the efficiency of interface calling and data processing is improved.
It is a kind of schematic diagram for terminal device that the embodiment of the present invention three provides referring to Fig. 3, Fig. 3.What terminal device included
Each unit is used to execute each step in the corresponding embodiment of FIG. 1 to FIG. 2.Referring specifically to the corresponding implementation of FIG. 1 to FIG. 2
Associated description in example.For ease of description, only the parts related to this embodiment are shown.The terminal device of the present embodiment
300 include:
Receiving unit 301, for receiving the data processing request of user terminal transmission;Include in the data processing request
The processing task of pending data and the processing pending data;
Transmission unit 302 is used for according to the processing task, the determining and place in preset gateway interface database
The target information of the corresponding intended gateway interface of reason task and the intended gateway interface, and the target information is sent to
The user terminal;The gateway interface database is used for the corresponding gateway interface of storage management various businesses environment;The net
Closing interface is the data-processing interface according to the gateway and interface synthesis that handle data in each service environment;
Authentication unit 303, the authentication request sent for receiving the user terminal according to the target information, according to pre-
The authentication rules deposited verify the authentication request, and after being verified, and the intended gateway interface is called to handle
The pending data that the user terminal is sent.
Further, the terminal device may include:
Interface determination unit, for determining each business scenario pair according to business scenario preset in operation system
The gateway and interface answered;The gateway using the data of differing transmission protocols in two network segments for carrying out converting mutual biography;Institute
Interface is stated for handling the pending data in the business scenario;
List generation unit, for obtaining the gateway information of the corresponding gateway of the business scenario, the interface
Interface message, and according to the gateway information and the interface message, generate interface list;It include described in the gateway information
The gateway authentication rule of gateway;It include the interface authentication rules of the interface in the interface message;
Compatible rule merging unit, for according in the interface list the gateway information and the interface message, synthesis
The corresponding gateway of the business scenario and interface obtain gateway interface, and synthesize the gateway authentication rule and interface authentication
Rule obtains the authentication rules of the gateway interface;The authentication rules are used to verify the user for calling the gateway interface whole
The interface at end calls permission;
Rule storage unit, for storing the gateway interface and its authentication rules into the gateway interface database.
Further, the transmission unit 302 may include:
Interface lookup unit, if being connect in the gateway interface database there is no the corresponding intended gateway of the processing task
Mouthful, then calculate the phase in the gateway interface database between the corresponding processing task of all-network interface and the processing task
Like degree, determine that gateway interface when similarity highest is the intended gateway interface;
Information determination unit, for determining the corresponding target of the data processing request from the gateway interface database
Gateway interface and its target information;
Information transmitting unit, for the target information of the intended gateway interface to be sent to the user terminal.
Further, the authentication unit 303 may include:
Request reception unit, the authentication request sent for receiving the user terminal, and according to the authentication rules pair
The authentication request is verified;
Construction unit, if for the authentication request by verifying, and when there are at least two intended gateway interfaces
When, then the data processing request and each intended gateway interface sent according to the user terminal constructs thread pool;Institute
Stating includes the same number of thread with the intended gateway interface in thread pool;
Data processing unit, for the line in the thread pool according to the priority parallel calling of each intended gateway interface
Journey handles the pending data in the data processing request.
Above scheme, the data processing request sent by receiving user terminal;According to business preset in operation system
Scene determines the corresponding gateway of each business scenario and interface;Obtain the net of the corresponding gateway of the business scenario
Information, the interface message of the interface are closed, and according to the gateway information and the interface message, generates interface list;According to
The gateway information and the interface message in the interface list, synthesize the corresponding gateway of the business scenario and interface obtains
To gateway interface, and the gateway authentication rule and the interface authentication rules are synthesized, obtains the authentication rule of the gateway interface
Then;The gateway interface and its authentication rules are stored into the gateway interface database.According to the place in data processing request
Reason task determines intended gateway interface corresponding with the processing task and the mesh in preset gateway interface database
The target information of gateway interface is marked, and the target information is sent to the user terminal;Receive the user terminal according to
The authentication request that the target information is sent, verifies the authentication request according to the authentication rules prestored, is finally testing
Card simplifies tune when multiple gateways and interface calling by handling pending data by invocation target gateway interface later
With process and step, the efficiency of interface calling and data processing is improved.
Fig. 4 is the schematic diagram for the terminal device that the embodiment of the present invention four provides.As shown in figure 4, the terminal of the embodiment is set
Standby 4 include: processor 40, memory 41 and are stored in the meter that can be run in the memory 41 and on the processor 40
Calculation machine program 42.The processor 40 is realized when executing the computer program 42 in above-mentioned each data processing method embodiment
The step of, such as step 101 shown in FIG. 1 is to 103.Alternatively, realization when the processor 40 executes the computer program 42
The function of each module/unit in above-mentioned each Installation practice, such as the function of unit 301 to 303 shown in Fig. 3.
Illustratively, the computer program 42 can be divided into one or more module/units, it is one or
Multiple module/units are stored in the memory 41, and are executed by the processor 40, to complete the present invention.Described one
A or multiple module/units can be the series of computation machine program instruction section that can complete specific function, which is used for
Implementation procedure of the computer program 42 in the terminal device 4 is described.
The terminal device 4 can be the calculating such as desktop PC, notebook, palm PC and cloud server and set
It is standby.The terminal device may include, but be not limited only to, processor 40, memory 41.It will be understood by those skilled in the art that Fig. 4
The only example of terminal device 4 does not constitute the restriction to terminal device 4, may include than illustrating more or fewer portions
Part perhaps combines certain components or different components, such as the terminal device can also include input-output equipment, net
Network access device, bus etc..
Alleged processor 40 can be central processing unit (Central Processing Unit, CPU), can also be
Other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit
(Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-
Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic,
Discrete hardware components etc..General processor can be microprocessor or the processor is also possible to any conventional processor
Deng.
The memory 41 can be the internal storage unit of the terminal device 4, such as the hard disk or interior of terminal device 4
It deposits.The memory 41 is also possible to the External memory equipment of the terminal device 4, such as be equipped on the terminal device 4
Plug-in type hard disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card dodge
Deposit card (Flash Card, FC) etc..Further, the memory 41 can also have been deposited both the inside including the terminal device 4
Storage unit also includes External memory equipment.The memory 41 is for storing the computer program and terminal device institute
Other programs and data needed.The memory 41 can be also used for temporarily storing the number that has exported or will export
According to.
It is apparent to those skilled in the art that for convenience of description and succinctly, only with above-mentioned each function
Can unit, module division progress for example, in practical application, can according to need and by above-mentioned function distribution by different
Functional unit, module are completed, i.e., the internal structure of described device is divided into different functional unit or module, more than completing
The all or part of function of description.Each functional unit in embodiment, module can integrate in one processing unit, can also
To be that each unit physically exists alone, can also be integrated in one unit with two or more units, it is above-mentioned integrated
Unit both can take the form of hardware realization, can also realize in the form of software functional units.In addition, each function list
Member, the specific name of module are also only for convenience of distinguishing each other, the protection scope being not intended to limit this application.Above system
The specific work process of middle unit, module, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, is not described in detail or remembers in some embodiment
The part of load may refer to the associated description of other embodiments.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme
's.
If the integrated module/unit be realized in the form of SFU software functional unit and as independent product sale or
In use, can store in a computer readable storage medium.Based on this understanding, the present invention realizes above-mentioned implementation
All or part of the process in example method, can also instruct relevant hardware to complete, the meter by computer program
Calculation machine program can be stored in a computer readable storage medium.
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although referring to aforementioned reality
Applying example, invention is explained in detail, those skilled in the art should understand that: it still can be to aforementioned each
Technical solution documented by embodiment is modified or equivalent replacement of some of the technical features;And these are modified
Or replacement, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution should all
It is included within protection scope of the present invention.
Claims (10)
1. a kind of data processing method characterized by comprising
Receive the data processing request that user terminal is sent;It include pending data and processing institute in the data processing request
State the processing task of pending data;
According to the processing task, intended gateway corresponding with the processing task is determined in preset gateway interface database
The target information of interface and the intended gateway interface, and the target information is sent to the user terminal;The net
It closes interface database and is used for the corresponding gateway interface of storage management various businesses environment;The gateway interface is according to each business
The gateway of data and the data-processing interface of interface synthesis are handled in environment;
The authentication request that the user terminal is sent according to the target information is received, according to the authentication rules prestored to the mirror
Power request is verified, and after being verified, call that the intended gateway interface handles that the user terminal sends to
Handle data.
2. data processing method as described in claim 1, which is characterized in that it is described according to the processing task, preset
The mesh of intended gateway interface corresponding with the processing task and the intended gateway interface is determined in gateway interface database
Information is marked, and the target information is sent to before the user terminal, further includes:
According to business scenario preset in operation system, the corresponding gateway of each business scenario and interface are determined;The net
It closes for carrying out converting mutual biography using the data of differing transmission protocols in two network segments;The interface is for handling the business
Pending data in scene;
The gateway information of the corresponding gateway of the business scenario, the interface message of the interface are obtained, and according to the net
Information and the interface message are closed, interface list is generated;Gateway authentication rule in the gateway information including the gateway;Institute
State the interface authentication rules in interface message including the interface;
According in the interface list the gateway information and the interface message, synthesize the corresponding gateway of the business scenario
Gateway interface is obtained with interface, and synthesizes the gateway authentication rule and the interface authentication rules, obtains the gateway interface
Authentication rules;The interface that the authentication rules are used to verify the user terminal for calling the gateway interface calls permission;
The gateway interface and its authentication rules are stored into the gateway interface database.
3. data processing method as described in claim 1, which is characterized in that it is described according to the processing task, preset
The mesh of intended gateway interface corresponding with the processing task and the intended gateway interface is determined in gateway interface database
Information is marked, and the target information is sent to the user terminal, comprising:
If the corresponding intended gateway interface of the processing task is not present in the gateway interface database, the gateway is calculated
Similarity in interface database between the corresponding processing task of all-network interface and the processing task, determines similarity most
Gateway interface when high is the intended gateway interface;
The corresponding intended gateway interface of the data processing request and its target information are determined from the gateway interface database;
The target information of the intended gateway interface is sent to the user terminal.
4. data processing method as described in claim 1, which is characterized in that described to receive the user terminal according to the mesh
The authentication request that information is sent is marked, the authentication request is verified according to the authentication rules prestored, and be verified it
Afterwards, the intended gateway interface is called to handle the pending data that the user terminal is sent, comprising:
The authentication request that the user terminal is sent is received, and the authentication request is verified according to the authentication rules;
If the authentication request passes through verifying, and when there are at least two intended gateway interfaces, then according to the user
The data processing request and each intended gateway interface that terminal is sent construct thread pool;Include in the thread pool and institute
State the same number of thread of intended gateway interface;
The data processing is handled according to the thread in thread pool described in the priority parallel calling of each intended gateway interface
Pending data in request.
5. a kind of terminal device, which is characterized in that including memory and processor, being stored in the memory can be described
The computer program run on processor, which is characterized in that when the processor executes the computer program, realize following step
It is rapid:
Receive the data processing request that user terminal is sent;It include pending data and processing institute in the data processing request
State the processing task of pending data;
According to the processing task, intended gateway corresponding with the processing task is determined in preset gateway interface database
The target information of interface and the intended gateway interface, and the target information is sent to the user terminal;The net
Interface database is closed for storage management to the gateway interface under various businesses environment;The gateway interface is according to each business
The gateway of data and the data-processing interface of interface synthesis are handled in environment;
The authentication request that the user terminal is sent according to the target information is received, according to the authentication rules prestored to the mirror
Power request is verified, and after being verified, call that the intended gateway interface handles that the user terminal sends to
Handle data.
6. terminal device as claimed in claim 5, which is characterized in that it is described according to the processing task, in preset gateway
The target letter of intended gateway interface corresponding with the processing task and the intended gateway interface is determined in interface database
Breath, and the target information is sent to before the user terminal, further includes:
According to business scenario preset in operation system, the corresponding gateway of each business scenario and interface are determined;The net
It closes for carrying out converting mutual biography using the data of differing transmission protocols in two network segments;The interface is for handling the business
Pending data in scene;
The gateway information of the corresponding gateway of the business scenario, the interface message of the interface are obtained, and according to the net
Information and the interface message are closed, interface list is generated;Gateway authentication rule in the gateway information including the gateway;Institute
State the interface authentication rules in interface message including the interface;
According in the interface list the gateway information and the interface message, synthesize the corresponding gateway of the business scenario
Gateway interface is obtained with interface, and synthesizes the gateway authentication rule and the interface authentication rules, obtains the gateway interface
Authentication rules;The interface that the authentication rules are used to verify the user terminal for calling the gateway interface calls permission;
The gateway interface and its authentication rules are stored into the gateway interface database.
7. terminal device as claimed in claim 5, which is characterized in that it is described according to the processing task, in preset gateway
The target letter of intended gateway interface corresponding with the processing task and the intended gateway interface is determined in interface database
Breath, and the target information is sent to the user terminal, comprising:
If the corresponding intended gateway interface of the processing task is not present in the gateway interface database, the gateway is calculated
Similarity in interface database between the corresponding processing task of all-network interface and the processing task, determines similarity most
Gateway interface when high is the intended gateway interface;
The corresponding intended gateway interface of the data processing request and its target information are determined from the gateway interface database;
The target information of the intended gateway interface is sent to the user terminal.
8. terminal device as claimed in claim 5, which is characterized in that the reception user terminal is believed according to the target
The authentication request sent is ceased, the authentication request is verified according to the authentication rules prestored, and after being verified, is adjusted
The pending data that the user terminal is sent is handled with the intended gateway interface, comprising:
The authentication request that the user terminal is sent is received, and the authentication request is verified according to the authentication rules;
If the authentication request passes through verifying, and when there are at least two intended gateway interfaces, then according to the user
The data processing request and each intended gateway interface that terminal is sent construct thread pool;Include in the thread pool and institute
State the same number of thread of intended gateway interface;
The data processing is handled according to the thread in thread pool described in the priority parallel calling of each intended gateway interface
Pending data in request.
9. a kind of terminal device characterized by comprising
Receiving unit, for receiving the data processing request of user terminal transmission;It include being used for table in the data processing request
Show the identification information of processing task;
Transmission unit is used for according to the processing task, the determining and processing task in preset gateway interface database
The target information of corresponding intended gateway interface and the intended gateway interface, and the target information is sent to the use
Family terminal;
Authentication unit, the authentication request sent for receiving the user terminal by the calling intended gateway interface, and root
The authentication request is verified according to the target information.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and feature exists
In when the computer program is executed by processor the step of any one of such as Claims 1-4 of realization the method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910422899.9A CN110213250B (en) | 2019-05-21 | 2019-05-21 | Data processing method and terminal equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910422899.9A CN110213250B (en) | 2019-05-21 | 2019-05-21 | Data processing method and terminal equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110213250A true CN110213250A (en) | 2019-09-06 |
CN110213250B CN110213250B (en) | 2023-06-09 |
Family
ID=67787940
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910422899.9A Active CN110213250B (en) | 2019-05-21 | 2019-05-21 | Data processing method and terminal equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110213250B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111737022A (en) * | 2019-09-30 | 2020-10-02 | 北京沃东天骏信息技术有限公司 | Interface calling method, system, equipment and medium based on micro-service |
CN113296912A (en) * | 2021-05-25 | 2021-08-24 | 北京京东振世信息技术有限公司 | Task processing method, device and system, storage medium and electronic equipment |
WO2023045676A1 (en) * | 2021-09-23 | 2023-03-30 | 京东方科技集团股份有限公司 | Task processing method and gateway, computer readable storage medium, and electronic device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6789110B1 (en) * | 1999-10-22 | 2004-09-07 | Nomadix, Inc. | Information and control console for use with a network gateway interface |
CN105307108A (en) * | 2015-11-17 | 2016-02-03 | 成都工百利自动化设备有限公司 | Internet of things information interactive communication method and system |
CN107959620A (en) * | 2017-12-11 | 2018-04-24 | 日立楼宇技术(广州)有限公司 | Fully-mechanized mining equipment recognition methods, device, system, gateway and storage medium |
CN109358880A (en) * | 2018-10-18 | 2019-02-19 | 行吟信息科技(上海)有限公司 | A kind of universal gateway configuration method and device |
-
2019
- 2019-05-21 CN CN201910422899.9A patent/CN110213250B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6789110B1 (en) * | 1999-10-22 | 2004-09-07 | Nomadix, Inc. | Information and control console for use with a network gateway interface |
CN105307108A (en) * | 2015-11-17 | 2016-02-03 | 成都工百利自动化设备有限公司 | Internet of things information interactive communication method and system |
CN107959620A (en) * | 2017-12-11 | 2018-04-24 | 日立楼宇技术(广州)有限公司 | Fully-mechanized mining equipment recognition methods, device, system, gateway and storage medium |
CN109358880A (en) * | 2018-10-18 | 2019-02-19 | 行吟信息科技(上海)有限公司 | A kind of universal gateway configuration method and device |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111737022A (en) * | 2019-09-30 | 2020-10-02 | 北京沃东天骏信息技术有限公司 | Interface calling method, system, equipment and medium based on micro-service |
CN111737022B (en) * | 2019-09-30 | 2024-03-01 | 北京沃东天骏信息技术有限公司 | Micro-service-based interface calling method, system, equipment and medium |
CN113296912A (en) * | 2021-05-25 | 2021-08-24 | 北京京东振世信息技术有限公司 | Task processing method, device and system, storage medium and electronic equipment |
WO2023045676A1 (en) * | 2021-09-23 | 2023-03-30 | 京东方科技集团股份有限公司 | Task processing method and gateway, computer readable storage medium, and electronic device |
Also Published As
Publication number | Publication date |
---|---|
CN110213250B (en) | 2023-06-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021169112A1 (en) | Shared permission-based service data procesing method, apparatus and device, and medium | |
CN105871838B (en) | A kind of log-in control method and customer center platform of third party's account | |
US20170093700A1 (en) | Device platform integrating disparate data sources | |
CN101562621A (en) | User authorization method and system and device thereof | |
CN110213250A (en) | Data processing method and terminal device | |
CN112087502B (en) | Method, device and equipment for processing request and storage medium | |
CN105991624B (en) | A kind of method for managing security and device of server | |
CN112308561A (en) | Block chain-based evidence storing method and system, computer equipment and storage medium | |
CN108632325A (en) | A kind of call method and device of application | |
Lomotey et al. | Saas authentication middleware for mobile consumers of iaas cloud | |
CN110266517A (en) | External service call method, device and terminal device based on gateway | |
CN115277122A (en) | Cross-border data flow and supervision system based on block chain | |
CN109543459A (en) | A kind of data deposit card method and apparatus | |
KR20190040038A (en) | A software-based switch for providing products and / or services to users without jeopardizing user privacy | |
US10326833B1 (en) | Systems and method for processing request for network resources | |
US20160234199A1 (en) | Method and apparatus for providing authentication based on aggregated attribute in federated identity management | |
US10193892B2 (en) | Resource restriction | |
CN109995697A (en) | A kind of digital certificate authentication method using cryptography | |
CN109818915A (en) | A kind of information processing method and device, server and readable storage medium storing program for executing | |
CN101431403A (en) | Apparatus and method for providing interface data and credible computing system | |
WO2015137978A1 (en) | Semantic restriction | |
EP1303995B1 (en) | Method and device for co-ordinating telecommunication services | |
US11334674B2 (en) | End point identification | |
CN112199694A (en) | Standardized bill processing method and device, electronic device and storage medium | |
CN117040930B (en) | Resource processing method, device, product, equipment and medium of block chain network |
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 |