CN110213250B - Data processing method and terminal equipment - Google Patents

Data processing method and terminal equipment Download PDF

Info

Publication number
CN110213250B
CN110213250B CN201910422899.9A CN201910422899A CN110213250B CN 110213250 B CN110213250 B CN 110213250B CN 201910422899 A CN201910422899 A CN 201910422899A CN 110213250 B CN110213250 B CN 110213250B
Authority
CN
China
Prior art keywords
interface
gateway
target
information
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.)
Active
Application number
CN201910422899.9A
Other languages
Chinese (zh)
Other versions
CN110213250A (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.)
OneConnect Financial Technology Co Ltd Shanghai
Original Assignee
OneConnect Financial Technology Co Ltd Shanghai
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 OneConnect Financial Technology Co Ltd Shanghai filed Critical OneConnect Financial Technology Co Ltd Shanghai
Priority to CN201910422899.9A priority Critical patent/CN110213250B/en
Publication of CN110213250A publication Critical patent/CN110213250A/en
Application granted granted Critical
Publication of CN110213250B publication Critical patent/CN110213250B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/083Network architectures or network communication protocols for network security for authentication of entities using passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0876Network 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
    • 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

  • Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Power Engineering (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention is applicable to the technical field of computer application, and provides a data processing method, terminal equipment and a computer readable storage medium, comprising the following steps: receiving a data processing request sent by a user terminal; according to a processing task in a data processing request, determining a target gateway interface corresponding to the processing task and target information of the target gateway interface in a preset gateway interface database, and sending the target information to the user terminal; and receiving an authentication request sent by the user terminal according to the target information, verifying the authentication request according to a pre-stored authentication rule, and finally processing data to be processed by calling a target gateway interface after verification is passed, so that calling flows and steps of a plurality of gateways and interfaces when calling are simplified, and the efficiency of calling and data processing of the interfaces is improved.

Description

Data processing method and terminal equipment
Technical Field
The present invention relates to the field of computer applications, and in particular, to a data processing method, a terminal device, and a computer readable storage medium.
Background
With the rapid development of enterprise informatization, more and more enterprises select software management systems to support various activities in enterprises, and enterprise management software plays an increasingly important role in enterprise management. However, with the diversification of service types in the enterprise management system, in many service operation processes, not only gateway data processing at the network level is required to be called, but also an interface corresponding to the data function is required to be called again at the interface layer, so that the operation process is complex, and the time consumed by data processing is long. Especially under the condition that the security requirement of the service system is higher, authentication or verification needs to be carried out on each call, so that the cost of data processing is increased, the gateway and interface calling process is complicated, and the data processing efficiency is reduced.
Disclosure of Invention
In view of the above, embodiments of the present invention provide a data processing method, a terminal device, and a computer readable storage medium, so as to solve the problem in the prior art that when data is processed by calling a gateway and an interface, the gateway and the interface call process is complicated, and the data processing efficiency is reduced.
A first aspect of an embodiment of the present invention provides a data processing method, including:
receiving a data processing request sent by a user terminal; the data processing request comprises data to be processed and processing tasks for processing the data to be processed;
according to the processing task, determining a target gateway interface corresponding to the processing task and target information of the target gateway interface in a preset gateway interface database, and sending the target information to the user terminal; the gateway interface database is used for storing and managing gateway interfaces in various service environments; the gateway interface is a data processing interface synthesized by a gateway and an interface for processing data in each service environment;
and receiving an authentication request sent by the user terminal according to the target information, verifying the authentication request according to a pre-stored authentication rule, and calling the target gateway interface to process data to be processed sent by the user terminal after the authentication is passed. .
A second aspect of an embodiment of the present invention provides a terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
receiving a data processing request sent by a user terminal; the data processing request comprises data to be processed and processing tasks for processing the data to be processed;
according to the processing task, determining a target gateway interface corresponding to the processing task and target information of the target gateway interface in a preset gateway interface database, and sending the target information to the user terminal; the gateway interface database is used for storing and managing gateway interfaces in various service environments; the gateway interface is a data processing interface synthesized by a gateway and an interface for processing data in each service environment;
and receiving an authentication request sent by the user terminal according to the target information, verifying the authentication request according to a pre-stored authentication rule, and calling the target gateway interface to process data to be processed sent by the user terminal after the authentication is passed. .
A third aspect of an embodiment of the present invention provides a terminal device, including:
a receiving unit, configured to receive a data processing request sent by a user terminal; the data processing request comprises data to be processed and processing tasks for processing the data to be processed;
a sending unit, configured to determine, according to the processing task, a target gateway interface corresponding to the processing task and target information of the target gateway interface in a preset gateway interface database, and send the target information to the user terminal; the gateway interface database is used for storing and managing gateway interfaces in various service environments; the gateway interface is a data processing interface synthesized by a gateway and an interface for processing data in each service environment;
and the verification unit is used for receiving the authentication request sent by the user terminal according to the target information, verifying the authentication request according to a pre-stored authentication rule, and calling the target gateway interface to process the data to be processed sent by the user terminal after the authentication is passed.
A fourth aspect of an embodiment of the invention provides a computer readable storage medium storing a computer program comprising program instructions which, when executed by a processor, cause the processor to perform the method of the first aspect described above.
Compared with the prior art, the embodiment of the invention has the beneficial effects that:
the embodiment of the invention receives the data processing request sent by the user terminal; according to a processing task in a data processing request, determining a target gateway interface corresponding to the processing task and target information of the target gateway interface in a preset gateway interface database, and sending the target information to the user terminal; and receiving an authentication request sent by the user terminal according to the target information, verifying the authentication request according to a pre-stored authentication rule, and finally processing data to be processed by calling a target gateway interface after verification is passed, so that calling flows and steps of a plurality of gateways and interfaces when calling are simplified, and the efficiency of calling and data processing of the interfaces is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a data processing method according to a first embodiment of the present invention;
FIG. 2 is a flow chart of a data processing method according to a second embodiment of the present invention;
fig. 3 is a schematic diagram of a terminal device according to a third embodiment of the present invention;
fig. 4 is a schematic diagram of a terminal device according to a fourth embodiment of the present invention.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth such as the particular system architecture, techniques, etc., in order to provide a thorough understanding of the embodiments of the present invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
In order to illustrate the technical scheme of the invention, the following description is made by specific examples.
Referring to fig. 1, fig. 1 is a flowchart of a data processing method according to a first embodiment of the present invention. The execution subject of the data processing method in this embodiment is a terminal. The terminal comprises, but is not limited to, a mobile terminal such as a smart phone, a tablet computer, a wearable device and the like, and can also be a server, a desktop computer and the like. The data processing method as shown in the figure may comprise the steps of:
S101: receiving a data processing request sent by a user terminal; the data processing request comprises data to be processed and processing tasks for processing the data to be processed;
and receiving a data processing request sent by the user terminal, and determining the data to be processed and the processing task of the data to be processed in the user terminal through the data processing request. The data to be processed in this embodiment may be data cached in a hypervisor, may be data input by a user through a user terminal, may be data generated according to data input by the user terminal, or the like, and is not limited herein. The processing task in this embodiment may be a data processing task such as user registration, user login, uploading data, or storing data, which is not limited herein.
Further, after receiving the data processing request sent by the user terminal, we can verify the correctness or realizability of the data processing request. The correctness is used for indicating whether the format of the data processing request, the requester and the requested party meet the normal regulations or not; the realizability is used to indicate whether the data processing task in the data processing request is out of the functional scope of the hypervisor.
S102: and determining a target gateway interface corresponding to the processing task and target information of the target gateway interface in a preset gateway interface database according to the processing task, and sending the target information to the user terminal.
In this embodiment, a gateway interface database is preset and is configured to store gateway interfaces corresponding to various service environments, where the gateway interfaces may include an interface parameter, an interface identifier, and an authentication manner of each gateway interface. The interface parameters of the gateway interface may include information such as a parameter type, a parameter delivery mode, etc., an interface identifier of the gateway interface is used to represent a name or a number of the interface, etc., and an authentication mode of the gateway interface is used to verify a user identity or a use authority of a user terminal calling the gateway interface.
It should be noted that, along with the diversification of service types in the enterprise management system, in many service operation processes, not only the gateway data processing at the network layer is required to be invoked, but also the interface corresponding to the data function is required to be invoked again at the interface layer, so that the operation process is complex, and the time consumed by data processing is long. Therefore, the data processing interface is synthesized according to the gateway and the interface for processing data in each service environment in this embodiment, and is used as a gateway interface. In this way, the user terminal only needs to determine and send the data processing request, and after the processing task is acquired, the target gateway interface and the target information thereof corresponding to the processing task are determined in the gateway interface database so as to determine the target information corresponding to the data processing request, so that the user terminal can call the correct gateway interface to process the data.
Further, step S102 may specifically include steps S1021 and S1022:
s1021: if the gateway interface database does not have the target gateway interface corresponding to the processing task, calculating the similarity between the processing tasks corresponding to all network interfaces in the gateway interface database and the processing tasks, and determining the gateway interface with the highest similarity as the target gateway interface.
In practical application, the gateway interfaces in the gateway interface database always completely correspond to the data processing requests sent by the user terminal, and the corresponding interfaces can always be found through the data processing requests, but when the target gateway interfaces corresponding to the data processing requests do not exist in the gateway interface database, the target gateway interfaces corresponding to the data processing requests and the target information thereof are determined from the gateway interface database in an approximate matching mode. It should be noted that, in this embodiment, one or more target gateway interfaces may be provided, so as to ensure that all functions of the target gateway interfaces may completely correspond to processing tasks in the data processing request.
Specifically, after a data processing request sent by a user terminal according to a service scene is obtained, if a scene which is not recorded appears, calculating the similarity between processing tasks corresponding to all network interfaces in a gateway interface database and processing tasks in an interface calling request, and determining a gateway interface with the highest similarity as a target gateway interface.
Furthermore, in this embodiment, the processing task of each gateway interface may be represented in the form of a keyword or a character string code, which not only can identify the function of each gateway interface more clearly and definitely, but also can increase the calculation accuracy when calculating the similarity of the processing task. For example, we can use "entry" and "import" to represent the interface for obtaining data, after obtaining the interface call request sent by the user terminal, determine the processing task in the interface call request according to the existing function string, and perform similarity calculation on the obtained processing task string in the gateway interface database, and match the gateway interface with the highest similarity to obtain the target gateway interface.
Further, in this embodiment, the number of the gateway interfaces corresponding to the interface call request may be one or more, and when there are a plurality of gateway interfaces, the information may be sent to the user terminal, and one of the gateway interfaces is selected and called at the user terminal.
S1022: and sending the target information of the target gateway interface to the user terminal.
After determining at least one target gateway interface corresponding to the data processing request, the target information of the target gateway interfaces is sent to the user terminal, so that the user terminal can call the target gateway interfaces through the target information of the target gateway interfaces to realize the data processing task.
S103: and receiving an authentication request sent by the user terminal according to the target information, verifying the authentication request according to a pre-stored authentication rule, and calling the target gateway interface to process data to be processed sent by the user terminal after the authentication is passed.
After the target information of the target gateway interface is sent to the user terminal, the interface user terminal verifies the authentication request according to the authentication rule of the target gateway interface according to the authentication request sent by the target information. And after the verification is passed, the target gateway interface is called to process the data to be processed sent by the user terminal.
In practical application, the data processing objects corresponding to different gateways or interfaces are different, and the processing modes are different, so that the authority of the user terminals capable of calling the gateways and the interfaces is also different. Authentication means that whether a user has the right to access the system or not is verified, and after the data processing terminal interfaces with the authentication request sent by the user terminal, the data processing terminal verifies the authentication request according to the target information of the target gateway interface.
In this embodiment, the authentication can be performed by means of a password. The premise of this is that every user who obtains the password is already authorized. When the user is established, a password is allocated to the user, and the password of the user can be designated by an administrator or applied by the user.
According to the scheme, the data processing request sent by the user terminal is received; according to a processing task in a data processing request, determining a target gateway interface corresponding to the processing task and target information of the target gateway interface in a preset gateway interface database, and sending the target information to the user terminal; and receiving an authentication request sent by the user terminal according to the target information, verifying the authentication request according to a pre-stored authentication rule, and finally processing data to be processed by calling a target gateway interface after verification is passed, so that calling flows and steps of a plurality of gateways and interfaces when calling are simplified, and the efficiency of calling and data processing of the interfaces is improved.
Referring to fig. 2, fig. 2 is a flowchart of a data processing method according to a second embodiment of the present invention. The execution subject of the data processing method in this embodiment is a terminal. The terminal comprises, but is not limited to, a mobile terminal such as a smart phone, a tablet computer, a wearable device and the like, and can also be a server, a desktop computer and the like. The data processing method as shown in the figure may comprise the steps of:
S201: receiving a data processing request sent by a user terminal; the data processing request comprises data to be processed and processing tasks for processing the data to be processed.
In this embodiment, the implementation manner of S201 is identical to that of S101 in the embodiment corresponding to fig. 1, and specific reference may be made to the description related to S101 in the embodiment corresponding to fig. 1, which is not repeated here.
S202: determining a gateway and an interface corresponding to each service scene according to the preset service scene in a service system; the gateway is used for converting and transmitting data using different transmission protocols in two network segments; the interface is used for processing data to be processed in the service scene.
In practical application, the service system includes a plurality of service scenarios, each service scenario includes a plurality of functions, and different functions also correspond to different interfaces or gateways, where the number of corresponding interfaces and gateways may be one or more. The interfaces corresponding to each business scene are determined, and batch management is carried out on the interfaces.
It should be noted that, the gateway in this embodiment is used for interconnection of two networks with different higher-layer protocols, so as to perform conversion and mutual transmission on data using different transmission protocols in two network segments; the interface in this embodiment is used to process data to be processed in various service scenarios.
Before determining the target information corresponding to the data processing request of the user, the business scene according to the business system is analyzed, and at least one corresponding interface and gateway under different business scenes are determined. The specific analysis steps are that firstly, the service functions which can be realized in the service scene are determined, then, the flow for realizing each service function is determined according to each service function, the data transmission and processing modes in each flow are determined, and finally, the corresponding gateway and interface are determined according to the data transmission and processing modes, namely, the gateway and interface corresponding to the service scene.
S203: acquiring gateway information of the gateway and interface information of the interface corresponding to the service scene, and generating an interface list according to the gateway information and the interface information; the gateway information comprises gateway authentication rules of the gateway; the interface information comprises interface authentication rules of the interface.
After determining the gateway and the interface corresponding to each service scene according to the service scene in the service system, acquiring the gateway information of the gateway and the interface information of the interface corresponding to each service scene, and generating the interface list according to the gateway information and the interface information. The interface list in this embodiment is used to contain and display all gateway information and interface information, so that when the gateway and the interface are combined, the combination can be performed according to the information in the list.
Meanwhile, gateway authentication rules of the gateway are included in the gateway information, and interface authentication rules of the interface are included in the interface information and are used for verifying the identity and authority of the user terminal through the respective authentication rules.
S204: synthesizing a gateway and an interface corresponding to the service scene according to the gateway information and the interface information in the interface list to obtain a gateway interface, and synthesizing the gateway authentication rule and the interface authentication rule to obtain an authentication rule of the gateway interface; the authentication rule is used for verifying the interface calling authority of the user terminal calling the gateway interface.
After an interface list is generated according to the gateway information and the interface information, synthesizing a gateway and an interface corresponding to each service scene according to the gateway information and the interface information in the interface list to obtain a gateway interface. In the service scene that the gateway and the interface are required to be respectively called to process data, the gateway interface is directly called once, so that the data processing can be realized.
Specifically, when the gateway and the interface are combined according to the interface list, the gateway information and the interface information can be firstly divided according to the information elements, the interface list is generated according to different gateways, interfaces and the information elements thereof, the name of each information element is at the position of the horizontal bar table head of the interface list, the name of each gateway and the name of each interface are at the position of the vertical bar table head, the information of each gateway and each interface in the interface list are combined according to the information of each gateway and each interface in the information elements, and meanwhile, a correlation function is added between the gateway and the interface, so that the calling correlation is completed when the information is combined.
Furthermore, according to different usage environments of different interfaces, the authentication rules of the respective interfaces are respectively configured for each interface according to the usage environments or processing tasks of the interfaces. For example, scenario a requires enterprise authentication and scenario B requires personal authentication. Configuring a corresponding authentication rule in a database, wherein enterprise authentication is used for indicating that related enterprise information is needed for authentication verification, and the needed information can comprise information of a single individual in an enterprise unit, such as information of a work number, a part and the like; personal authentication is used to indicate that personal information or an identity information product is required for identity verification, and the required information only comprises the identity information of the person, such as an identity card number, a social security number and the like. Since different scenes require different authentication modes, or some service scenes do not require authentication. According to the gateway and the interface contained in the service scene, combining the gateway authentication rule of the gateway with the interface authentication rule of the interface to obtain the authentication rule in the service scene.
The various authentication rules obtained through combination and the business scene corresponding to each authentication rule are in one-to-one correspondence. After the interface corresponding to the data processing request of the user is determined from the gateway interface database, the authentication rules required for the data processing request are also determined.
Optionally, in this embodiment, the number of the gateways and the interfaces corresponding to one service scenario may be one or more, and if it is determined that there are a plurality of total numbers of gateways and interfaces corresponding to the service scenario, if the gateways and the interfaces are respectively called one by one to authenticate and process data, more time and data resources are wasted, so we can package all the gateways and interfaces according to the gateway information and the interface information. When the encapsulation is carried out, each gateway and each interface have the corresponding request head requirements, and the encapsulation required by the request heads is respectively configured. For example, the business interface in the a scene needs to initiate a request according to a fixed header request format, and a corresponding format needs to be specified in the configuration. For example, the interface a requests to add the length of the request body in the request header, the gateway interface realizes a part for encapsulating the additional request header similarly as a general module, the configuration of the request header rule is completed in a configuration mode, and the gateway completes the encapsulation of the request header of different interfaces by reading the configured rules, so as to reduce the additional operation of the user.
Specifically, the information that may be included in the request header of the gateway interface request in this embodiment includes: the protocol type, the protocol version number, the message identification, the message encryption mode, the message body length, the total number of packets of the message and other information, interfaces and message formats defined by different versions of protocols are different, and the protocols of different versions are incompatible.
After the interface configuration is finished, the generated interface can be simply tested, or whether the configuration of the interface is correct or not can be judged according to the use condition of a user, if the interface calling process is normal, the configured interface and target information thereof can be stored in a gateway interface database, so that the interface can be directly called in the same use environment or application scene next time.
S205: and storing the gateway interface and the authentication rule thereof into the gateway interface database.
After determining the interfaces in each service scene in the service system and generating an interface list, storing the authentication rule of each interface into a gateway interface database according to the interface list, and storing according to the interface list, so that the searching efficiency and the calling efficiency of the interfaces can be improved when the interfaces are modified or called.
S206: according to the processing task, determining a target gateway interface corresponding to the processing task and target information of the target gateway interface in a preset gateway interface database, and sending the target information to the user terminal; the gateway interface database is used for storing and managing gateway interfaces corresponding to various service environments; the gateway interface is a data processing interface synthesized by a gateway and an interface for processing data in each service environment;
in this embodiment, a gateway interface database is preset and is configured to store gateway interfaces corresponding to various service environments, where the gateway interfaces may include an interface parameter, an interface identifier, and an authentication manner of each gateway interface. The interface parameters of the gateway interface may include information such as a parameter type, a parameter delivery mode, etc., an interface identifier of the gateway interface is used to represent a name or a number of the interface, etc., and an authentication mode of the gateway interface is used to verify a user identity or a use authority of a user terminal calling the gateway interface.
It should be noted that, along with the diversification of service types in the enterprise management system, in many service operation processes, not only the gateway data processing at the network layer is required to be invoked, but also the interface corresponding to the data function is required to be invoked again at the interface layer, so that the operation process is complex, and the time consumed by data processing is long. Therefore, the data processing interface is synthesized according to the gateway and the interface for processing data in each service environment in this embodiment, and is used as a gateway interface. In this way, the user terminal only needs to determine and send the data processing request, and after the processing task is acquired, the target gateway interface and the target information thereof corresponding to the processing task are determined in the gateway interface database so as to determine the target information corresponding to the data processing request, so that the user terminal can call the correct gateway interface to process the data.
S207: and receiving an authentication request sent by the user terminal according to the target information, verifying the authentication request according to a pre-stored authentication rule, and calling the target gateway interface to process data to be processed sent by the user terminal after the authentication is passed.
After the target information of the target gateway interface is sent to the user terminal, the interface user terminal verifies the authentication request according to the authentication rule of the target gateway interface according to the authentication request sent by the target information. And after the verification is passed, the target gateway interface is called to process the data to be processed sent by the user terminal.
S2071: and receiving an authentication request sent by the user terminal, and verifying the authentication request according to the authentication rule.
After the target information of the target gateway interface is sent to the user terminal, the user terminal sends an authentication request to the data processing terminal according to the target information, and the data processing terminal verifies the authentication request according to the authentication rule of the target gateway interface and the target information after receiving the authentication request sent by the user terminal.
Optionally, in this embodiment, the authentication request sent by the user terminal may be verified by a password, that is, the user account and the user password of the user terminal are protected, and the authentication rule of the gateway interface corresponding to the authentication request is a password verification rule. The premise of this is that every user who obtains the password is already authorized. When the user is established, a password is allocated to the user, and the password of the user can be designated by an administrator or applied by the user.
S2072: if the authentication request passes the verification, and when at least two target gateway interfaces exist, a thread pool is constructed according to the data processing request sent by the user terminal and each target gateway interface; the thread pool comprises the same number of threads as the target gateway interfaces.
After verifying the authentication request according to the authentication rule and the target information, if the authentication request passes the verification, the current user terminal can call the target gateway interface to process the data, and the target gateway interface is used for processing the data to be processed sent by the user terminal. If the authentication request fails to pass, the current authority of the user terminal cannot call the target gateway interface, or the authentication request sent by the user terminal is in error, in this case, a notification of submitting the authentication request again can be sent to the user terminal, or the data processing request sent by the user terminal can be directly rejected.
Further, if the authentication request passes verification, there may be at least two target gateway interfaces, in which case we construct a thread pool based on the data processing request sent by the user terminal and each of the target gateway interfaces. The thread pool comprises threads with the same number as the target gateway interfaces, and the threads are respectively established in the user terminal to initiate interface call, so that the aim of concurrent call is fulfilled, and the response time of the interfaces is reduced.
S2073: and calling threads in the thread pool in parallel according to the priority of each target gateway interface to process the data to be processed in the data processing request.
In this embodiment, the priority of each target gateway interface may be set, so as to indicate the priority when multiple target gateway interfaces are called in parallel. The priority setting mode can be set according to the importance degree of the service scene, the higher the importance degree is, or the predicted processing data duration of the service scene is set, the longer the predicted processing duration is, the lower the priority is.
The thread pool in this embodiment is a multi-threaded processing form, in which tasks are added to a queue during processing, then after threads are created, parallel calls are made according to the priority of the target gateway interface, each thread uses a default stack size, runs with a default priority, and in a multi-threaded unit, if a certain thread is idle in managed code, the thread pool will insert another auxiliary thread to keep all processors busy. If all thread pools remain busy all the time, but the queue contains pending work, the number of helper threads will never exceed a maximum after a period of time. Threads that exceed the maximum value may be queued but they wait until the other threads are completed before starting.
It should be noted that, the data to be processed in this embodiment is data sent to the data processing terminal by the user terminal through calling the target gateway interface, and these data may be sent together with the authentication request, or may be sent after the authentication is passed, which is not limited herein.
According to the scheme, the data processing request sent by the user terminal is received; determining a gateway and an interface corresponding to each service scene according to the preset service scene in a service system; acquiring gateway information of the gateway and interface information of the interface corresponding to the service scene, and generating an interface list according to the gateway information and the interface information; synthesizing a gateway and an interface corresponding to the service scene according to the gateway information and the interface information in the interface list to obtain a gateway interface, and synthesizing the gateway authentication rule and the interface authentication rule to obtain an authentication rule of the gateway interface; and storing the gateway interface and the authentication rule thereof into the gateway interface database. According to a processing task in a data processing request, determining a target gateway interface corresponding to the processing task and target information of the target gateway interface in a preset gateway interface database, and sending the target information to the user terminal; and receiving an authentication request sent by the user terminal according to the target information, verifying the authentication request according to a pre-stored authentication rule, and finally processing data to be processed by calling a target gateway interface after verification is passed, so that calling flows and steps of a plurality of gateways and interfaces when calling are simplified, and the efficiency of calling and data processing of the interfaces is improved.
Referring to fig. 3, fig. 3 is a schematic diagram of a terminal device according to a third embodiment of the present invention. The terminal device includes units for executing the steps in the embodiments corresponding to fig. 1 to 2. Refer specifically to the related descriptions in the respective embodiments of fig. 1-2. For convenience of explanation, only the portions related to the present embodiment are shown. The terminal device 300 of the present embodiment includes:
a receiving unit 301, configured to receive a data processing request sent by a user terminal; the data processing request comprises data to be processed and processing tasks for processing the data to be processed;
a sending unit 302, configured to determine, according to the processing task, a target gateway interface corresponding to the processing task and target information of the target gateway interface in a preset gateway interface database, and send the target information to the user terminal; the gateway interface database is used for storing and managing gateway interfaces corresponding to various service environments; the gateway interface is a data processing interface synthesized by a gateway and an interface for processing data in each service environment;
and the verifying unit 303 is configured to receive an authentication request sent by the user terminal according to the target information, verify the authentication request according to a pre-stored authentication rule, and call the target gateway interface to process data to be processed sent by the user terminal after the authentication is passed.
Further, the terminal device may include:
the interface determining unit is used for determining a gateway and an interface corresponding to each service scene according to the preset service scene in the service system; the gateway is used for converting and transmitting data using different transmission protocols in two network segments; the interface is used for processing data to be processed in the service scene;
the list generation unit is used for acquiring gateway information of the gateway and interface information of the interface corresponding to the service scene, and generating an interface list according to the gateway information and the interface information; the gateway information comprises gateway authentication rules of the gateway; the interface information comprises interface authentication rules of the interface;
the rule merging unit is used for synthesizing a gateway and an interface corresponding to the service scene according to the gateway information and the interface information in the interface list to obtain a gateway interface, and synthesizing the gateway authentication rule and the interface authentication rule to obtain an authentication rule of the gateway interface; the authentication rule is used for verifying the interface calling authority of the user terminal calling the gateway interface;
and the rule storage unit is used for storing the gateway interface and the authentication rule thereof into the gateway interface database.
Further, the transmitting unit 302 may include:
an interface searching unit, for calculating the similarity between the processing tasks corresponding to all network interfaces in the gateway interface database and the processing tasks if the gateway interface database does not have the target gateway interface corresponding to the processing tasks, and determining the gateway interface with the highest similarity as the target gateway interface;
an information determining unit, configured to determine a target gateway interface corresponding to the data processing request and target information thereof from the gateway interface database;
and the information sending unit is used for sending the target information of the target gateway interface to the user terminal.
Further, the verification unit 303 may include:
the request receiving unit is used for receiving the authentication request sent by the user terminal and verifying the authentication request according to the authentication rule;
the construction unit is used for constructing a thread pool according to the data processing request sent by the user terminal and each target gateway interface if the authentication request passes the verification and when at least two target gateway interfaces exist; the thread pool comprises threads with the same number as the target gateway interfaces;
And the data processing unit is used for calling the threads in the thread pool in parallel according to the priority of each target gateway interface to process the data to be processed in the data processing request.
According to the scheme, the data processing request sent by the user terminal is received; determining a gateway and an interface corresponding to each service scene according to the preset service scene in a service system; acquiring gateway information of the gateway and interface information of the interface corresponding to the service scene, and generating an interface list according to the gateway information and the interface information; synthesizing a gateway and an interface corresponding to the service scene according to the gateway information and the interface information in the interface list to obtain a gateway interface, and synthesizing the gateway authentication rule and the interface authentication rule to obtain an authentication rule of the gateway interface; and storing the gateway interface and the authentication rule thereof into the gateway interface database. According to a processing task in a data processing request, determining a target gateway interface corresponding to the processing task and target information of the target gateway interface in a preset gateway interface database, and sending the target information to the user terminal; and receiving an authentication request sent by the user terminal according to the target information, verifying the authentication request according to a pre-stored authentication rule, and finally processing data to be processed by calling a target gateway interface after verification is passed, so that calling flows and steps of a plurality of gateways and interfaces when calling are simplified, and the efficiency of calling and data processing of the interfaces is improved.
Fig. 4 is a schematic diagram of a terminal device according to a fourth embodiment of the present invention. As shown in fig. 4, the terminal device 4 of this embodiment includes: a processor 40, a memory 41 and a computer program 42 stored in the memory 41 and executable on the processor 40. The steps of the various data processing method embodiments described above, such as steps 101 through 103 shown in fig. 1, are implemented when the processor 40 executes the computer program 42. Alternatively, the processor 40 may perform the functions of the modules/units of the apparatus embodiments described above, such as the functions of the units 301 to 303 shown in fig. 3, when executing the computer program 42.
Illustratively, the computer program 42 may be partitioned into one or more modules/units that are stored in the memory 41 and executed by the processor 40 to complete the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions for describing the execution of the computer program 42 in the terminal device 4.
The terminal device 4 may be a computing device such as a desktop computer, a notebook computer, a palm computer, a cloud server, etc. The terminal device may include, but is not limited to, a processor 40, a memory 41. It will be appreciated by those skilled in the art that fig. 4 is merely an example of the terminal device 4 and does not constitute a limitation of the terminal device 4, and may include more or less components than illustrated, or may combine certain components, or different components, e.g., the terminal device may further include an input-output device, a network access device, a bus, etc.
The processor 40 may be a central processing unit (Central Processing Unit, CPU), other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 41 may be an internal storage unit of the terminal device 4, such as a hard disk or a memory of the terminal device 4. The memory 41 may be an external storage device of the terminal device 4, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card, FC), or the like, which are provided on the terminal device 4. Further, the memory 41 may also include both an internal storage unit and an external storage device of the terminal device 4. The memory 41 is used for storing the computer program as well as other programs and data required by the terminal device. The memory 41 may also be used for temporarily storing data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
The integrated modules/units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present invention may implement all or part of the flow of the method of the above embodiment, or may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium.
The above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention, and are intended to be included in the scope of the present invention.

Claims (8)

1. A method of data processing, comprising:
receiving a data processing request sent by a user terminal; the data processing request comprises data to be processed and processing tasks for processing the data to be processed;
determining a gateway and an interface corresponding to each service scene according to the preset service scene in a service system; the gateway is used for converting and transmitting data using different transmission protocols in two network segments; the interface is used for processing data to be processed in the service scene;
acquiring gateway information of the gateway and interface information of the interface corresponding to the service scene, and generating an interface list according to the gateway information and the interface information; the gateway information comprises gateway authentication rules of the gateway; the interface information comprises interface authentication rules of the interface;
synthesizing a gateway and an interface corresponding to the service scene according to the gateway information and the interface information in the interface list to obtain a gateway interface, and synthesizing the gateway authentication rule and the interface authentication rule to obtain an authentication rule of the gateway interface; the authentication rule is used for verifying the interface calling authority of the user terminal calling the gateway interface;
Storing the gateway interface and the authentication rule thereof into a gateway interface database;
according to the processing task, determining a target gateway interface corresponding to the processing task and target information of the target gateway interface in a preset gateway interface database, and sending the target information to the user terminal; the gateway interface database is used for storing and managing gateway interfaces corresponding to various service environments; the gateway interface is a data processing interface synthesized by a gateway and an interface for processing data in each service environment;
and receiving an authentication request sent by the user terminal according to the target information, verifying the authentication request according to a pre-stored authentication rule, and calling the target gateway interface to process data to be processed sent by the user terminal after the authentication is passed.
2. The data processing method according to claim 1, wherein the determining, according to the processing task, a target gateway interface corresponding to the processing task and target information of the target gateway interface in a preset gateway interface database, and transmitting the target information to the user terminal, includes:
If the gateway interface database does not have the target gateway interface corresponding to the processing task, calculating the similarity between the processing tasks corresponding to all network interfaces in the gateway interface database and the processing tasks, and determining the gateway interface with the highest similarity as the target gateway interface;
determining a target gateway interface corresponding to the data processing request and target information thereof from the gateway interface database;
and sending the target information of the target gateway interface to the user terminal.
3. The data processing method according to claim 1, wherein said receiving an authentication request sent by the user terminal according to the target information, verifying the authentication request according to a pre-stored authentication rule, and after the verification is passed, invoking the target gateway interface to process the data to be processed sent by the user terminal, includes:
receiving an authentication request sent by the user terminal, and verifying the authentication request according to the authentication rule;
if the authentication request passes the verification, and when at least two target gateway interfaces exist, a thread pool is constructed according to the data processing request sent by the user terminal and each target gateway interface; the thread pool comprises threads with the same number as the target gateway interfaces;
And calling threads in the thread pool in parallel according to the priority of each target gateway interface to process the data to be processed in the data processing request.
4. A terminal device comprising a memory and a processor, said memory storing a computer program executable on said processor, characterized in that said processor, when executing said computer program, performs the steps of:
receiving a data processing request sent by a user terminal; the data processing request comprises data to be processed and processing tasks for processing the data to be processed;
determining a gateway and an interface corresponding to each service scene according to the preset service scene in a service system; the gateway is used for converting and transmitting data using different transmission protocols in two network segments; the interface is used for processing data to be processed in the service scene;
acquiring gateway information of the gateway and interface information of the interface corresponding to the service scene, and generating an interface list according to the gateway information and the interface information; the gateway information comprises gateway authentication rules of the gateway; the interface information comprises interface authentication rules of the interface;
Synthesizing a gateway and an interface corresponding to the service scene according to the gateway information and the interface information in the interface list to obtain a gateway interface, and synthesizing the gateway authentication rule and the interface authentication rule to obtain an authentication rule of the gateway interface; the authentication rule is used for verifying the interface calling authority of the user terminal calling the gateway interface;
storing the gateway interface and the authentication rule thereof into a gateway interface database;
according to the processing task, determining a target gateway interface corresponding to the processing task and target information of the target gateway interface in a preset gateway interface database, and sending the target information to the user terminal; the gateway interface database is used for storing and managing gateway interfaces in various service environments; the gateway interface is a data processing interface synthesized by a gateway and an interface for processing data in each service environment;
and receiving an authentication request sent by the user terminal according to the target information, verifying the authentication request according to a pre-stored authentication rule, and calling the target gateway interface to process data to be processed sent by the user terminal after the authentication is passed.
5. The terminal device according to claim 4, wherein the determining, according to the processing task, a target gateway interface corresponding to the processing task and target information of the target gateway interface in a preset gateway interface database, and transmitting the target information to the user terminal, includes:
if the gateway interface database does not have the target gateway interface corresponding to the processing task, calculating the similarity between the processing tasks corresponding to all network interfaces in the gateway interface database and the processing tasks, and determining the gateway interface with the highest similarity as the target gateway interface;
determining a target gateway interface corresponding to the data processing request and target information thereof from the gateway interface database;
and sending the target information of the target gateway interface to the user terminal.
6. The terminal device of claim 4, wherein receiving the authentication request sent by the user terminal according to the target information, verifying the authentication request according to a pre-stored authentication rule, and after the verification is passed, invoking the target gateway interface to process the data to be processed sent by the user terminal, comprises:
Receiving an authentication request sent by the user terminal, and verifying the authentication request according to the authentication rule;
if the authentication request passes the verification, and when at least two target gateway interfaces exist, a thread pool is constructed according to the data processing request sent by the user terminal and each target gateway interface; the thread pool comprises threads with the same number as the target gateway interfaces;
and calling threads in the thread pool in parallel according to the priority of each target gateway interface to process the data to be processed in the data processing request.
7. A terminal device, comprising:
a receiving unit, configured to receive a data processing request sent by a user terminal; the data processing request comprises identification information used for representing a processing task;
the interface determining unit is used for determining a gateway and an interface corresponding to each service scene according to the preset service scene in the service system; the gateway is used for converting and transmitting data using different transmission protocols in two network segments; the interface is used for processing data to be processed in the service scene;
the list generation unit is used for acquiring gateway information of the gateway and interface information of the interface corresponding to the service scene, and generating an interface list according to the gateway information and the interface information; the gateway information comprises gateway authentication rules of the gateway; the interface information comprises interface authentication rules of the interface;
The rule merging unit is used for synthesizing a gateway and an interface corresponding to the service scene according to the gateway information and the interface information in the interface list to obtain a gateway interface, and synthesizing the gateway authentication rule and the interface authentication rule to obtain an authentication rule of the gateway interface; the authentication rule is used for verifying the interface calling authority of the user terminal calling the gateway interface;
the rule storage unit is used for storing the gateway interface and the authentication rule thereof into a gateway interface database;
a sending unit, configured to determine, according to the processing task, a target gateway interface corresponding to the processing task and target information of the target gateway interface in a preset gateway interface database, and send the target information to the user terminal;
and the verification unit is used for receiving the authentication request sent by the user terminal through calling the target gateway interface and verifying the authentication request according to the target information.
8. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the steps of the method according to any one of claims 1 to 3.
CN201910422899.9A 2019-05-21 2019-05-21 Data processing method and terminal equipment Active CN110213250B (en)

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 CN110213250A (en) 2019-09-06
CN110213250B true 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)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111737022B (en) * 2019-09-30 2024-03-01 北京沃东天骏信息技术有限公司 Micro-service-based interface calling method, system, equipment and medium
CN113296912B (en) * 2021-05-25 2024-08-20 北京京东振世信息技术有限公司 Task processing method, device, system, storage medium and electronic equipment
CN113852474B (en) * 2021-09-23 2024-04-05 京东方科技集团股份有限公司 Task processing method, gateway, computer readable storage medium and electronic device

Citations (4)

* Cited by examiner, † Cited by third party
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

Patent Citations (4)

* Cited by examiner, † Cited by third party
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

Also Published As

Publication number Publication date
CN110213250A (en) 2019-09-06

Similar Documents

Publication Publication Date Title
US20230396669A1 (en) Technologies for transparent function as a service arbitration for edge systems
CN110213250B (en) Data processing method and terminal equipment
CN111711610B (en) Authentication method, system, computing device and computer readable storage medium based on micro service architecture
US8811944B2 (en) Authentication request management
CN114025021B (en) Communication method, system, medium and electronic equipment crossing Kubernetes cluster
US9589122B2 (en) Operation processing method and device
US10162952B2 (en) Security model for network information service
US20190372985A1 (en) Sensitive information accessibility in blockchain
CN110490416B (en) Task management method and terminal equipment
CN112202750B (en) Control method for policy execution, policy execution system and computing device
US9160754B2 (en) Location based authentication of users to a virtual machine in a computer system
CN111260475A (en) Data processing method, block chain node point equipment and storage medium
CN112150030A (en) Account management method based on multiple units and multiple identities, terminal equipment and storage medium
US10200864B2 (en) Method and device for managing wireless access point
CN113923130A (en) Multi-tenant open interface resource configuration method, device and terminal
CN113541981B (en) Member management method and system for network slice
CN113132400A (en) Business processing method, device, computer system and storage medium
CN112181599A (en) Model training method, device and storage medium
CN111310166A (en) Authority management method, device, equipment and storage medium
CN113392350A (en) Page routing processing method, device, equipment, storage medium and program product
CN112346888A (en) Data communication method and device based on software application and server equipment
CN103051607B (en) Access method, equipment and system
US20200322336A1 (en) Authentication broker apparatus and non-transitory computer readable medium storing authentication broker program
US20220407692A1 (en) Multiple device collaboration authentication
US10884832B2 (en) Aggregation messaging within an integration environment

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