CN108279983A - A kind of processing method and processing device that interface returns the result - Google Patents

A kind of processing method and processing device that interface returns the result Download PDF

Info

Publication number
CN108279983A
CN108279983A CN201611257173.7A CN201611257173A CN108279983A CN 108279983 A CN108279983 A CN 108279983A CN 201611257173 A CN201611257173 A CN 201611257173A CN 108279983 A CN108279983 A CN 108279983A
Authority
CN
China
Prior art keywords
interface
result
data
format
data format
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201611257173.7A
Other languages
Chinese (zh)
Inventor
任志伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN201611257173.7A priority Critical patent/CN108279983A/en
Publication of CN108279983A publication Critical patent/CN108279983A/en
Pending legal-status Critical Current

Links

Landscapes

  • Computer And Data Communications (AREA)

Abstract

The invention discloses a kind of processing method and processing devices that interface returns the result, and are related to field of computer technology, and main purpose is to solve the problems, such as that interface mating operation amount is excessive in the prior art.The method includes:Interface is generated according to the data operation request of reception to return the result, and the corresponding identification information of calling interface is carried in the data operation request;The uniform format that the interface is returned the result is preset data form;The interface of the preset data form is returned the result according to the calling interface corresponding identification information and is sent to corresponding calling interface.Present invention is mainly used for the processing that interface returns the result.

Description

A kind of processing method and processing device that interface returns the result
Technical field
The present invention relates to field of computer technology, especially a kind of processing method and processing device that interface returns the result.
Background technology
More and more web services are employed performance layer state transfer (Representational State now Transfer, abbreviation REST) style the network architecture, REST refers to one group of framework constraints and principle, and framework is accorded with The constraints and principle for closing REST are RESTful frameworks.It, can not only by using the network interface of RESTful frameworks Function is realized with front end page to be isolated, and also more convenient can provide service for the user of data.
Returning the result for the network interface of RESTful frameworks is calculated using certain after web application receives request As a result, directly using and avoiding complicated parsing work generally for facilitate front end, interface, which returns the result, can use Json Format is returned.Returning the result for the network interface of RESTful frameworks is typically directed to the progress of each interface in the prior art Design, can provide an individual interactive interfacing model for each interface.However, due to interface need in the process of development it is more Coding work, more interactive interfacing models are created, when front end or other interface sides need during calling interface Exploitation is customized to each interface, will produce a large amount of workload, causes the workload that interface docks excessive, so that connecing The R&D costs of mouth developer are excessively high.
Invention content
In view of the above problems, it is proposed that the present invention overcoming the above problem in order to provide one kind or solves at least partly The processing method and processing device that a kind of interface of problem returns the result is stated, it is excessive to solve interface mating operation amount in the prior art The problem of.
On the one hand, the present invention provides a kind of processing methods that interface returns the result, including:
Interface is generated according to the data operation request of reception to return the result, carrying calling in the data operation request connects The corresponding identification information of mouth;
The uniform format that the interface is returned the result is preset data form;
The interface of the preset data form is returned the result according to the calling interface corresponding identification information and is sent to Corresponding calling interface.
Further, the preset data form includes a variety of data formats, is asked according to the data manipulation of reception described It seeks survival into before interface returns the result, the method further includes:
Judge whether to carry in the data operation request and requires the specified data format that interface returns the result, the finger Determine one kind that data format is the preset data form.
Further, when carrying requires the specified data format that interface returns the result in the data operation request, The uniform format that the interface is returned the result includes for preset data form:
The specified data format for selecting interface to return the result from the preset data form;
The interface is returned the result and is unified for the interface of specified data format and returns the result.
When do not carried in the data operation request require specified data format that interface returns the result when, it is described by institute State the uniform format that interface returns the result includes for preset data form:
The sequence of data format in the preset data form is obtained according to the corresponding data format of calling interface;
The interface is returned the result and is unified for the forward data format of the sequence.
Further, the preset data form is bivariate table, and described return the result the interface is unified for present count Include according to format:
The uniform format that the interface is returned the result is the data format of bivariate table.
Further, row data are stored with the object that interface returns the result in the data format of the bivariate table, and described two The data format midrange evidence of dimension table is stored with the attribute value that interface returns the result;Or
The data format midrange evidence of the bivariate table is stored with the object that interface returns the result, the data of the bivariate table Row data are stored with the attribute value that interface returns the result in format
On the other hand, the present invention provides a kind of processing unit that interface returns the result, including:
Generation unit returns the result, the data operation request for generating interface according to the data operation request of reception In carry the corresponding identification information of calling interface;
Unified Element, the uniform format for returning the result the interface are preset data form;
Transmission unit, for being returned the interface of the preset data form according to the corresponding identification information of the calling interface It returns result and is sent to corresponding calling interface.
Further, the preset data form includes a variety of data formats, and described device further includes:
Judging unit, for judging whether carry the specified number for requiring interface and returning the result in the data operation request According to format, the specified data format is one kind of the preset data form.
Further, when carrying requires the specified data format that interface returns the result in the data operation request, The Unified Element includes:
Selecting module, the specified data format for selecting interface to return the result from the preset data form;
Unified modules are unified for the interface of specified data format and return the result for returning the result the interface;
When do not carried in the data operation request require specified data format that interface returns the result when, the unification Unit includes:
Acquisition module, for obtaining data format in the preset data form according to the corresponding data format of calling interface Sequence;
Unified modules are unified for the forward data format of the sequence for returning the result the interface.
Further, the preset data form is bivariate table, the Unified Element, specifically for returning to the interface As a result uniform format is the data format of bivariate table.
Further, row data are stored with the object that interface returns the result in the data format of the bivariate table, and described two The data format midrange evidence of dimension table is stored with the attribute value that interface returns the result;Or
The data format midrange evidence of the bivariate table is stored with the object that interface returns the result, the data of the bivariate table Row data are stored with the attribute value that interface returns the result in format.
By above-mentioned technical proposal, a kind of processing method and processing device that interface returns the result provided by the invention, first root Interface is generated according to the data operation request of reception to return the result, and the corresponding mark of calling interface is carried in the data operation request Information, interface here are returned the result for response data operation requests, then the uniform format by returning the result interface For preset data form, to which interface caller only needs that finite data format is parsed and used, finally according to interface The interface of preset format is returned the result and is sent to corresponding calling interface by corresponding identification information.It returns and ties with existing interface The processing method of fruit is compared, the embodiment of the present invention by being unified to the format that interface returns the result, be unified into it is a kind of or The limited several interaction models of person, facilitate the use of interface caller, reduce the complexity and workload of interface docking, together When reduce the learning cost of interface exploitation personnel.
Above description is only the general introduction of technical solution of the present invention, in order to better understand the technical means of the present invention, And can be implemented in accordance with the contents of the specification, and in order to allow above and other objects of the present invention, feature and advantage can It is clearer and more comprehensible, below the special specific implementation mode for lifting the present invention.
Description of the drawings
By reading the detailed description of hereafter preferred embodiment, various other advantages and benefit are common for this field Technical staff will become clear.Attached drawing only for the purpose of illustrating preferred embodiments, and is not considered as to the present invention Limitation.And throughout the drawings, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Fig. 1 shows the process flow schematic diagram that a kind of interface provided in an embodiment of the present invention returns the result;
Fig. 2 shows the process flow schematic diagrames that another interface provided in an embodiment of the present invention returns the result;
Fig. 3 shows the processing device structure diagram that a kind of interface provided in an embodiment of the present invention returns the result;
Fig. 4 shows the processing device structure diagram that another interface provided in an embodiment of the present invention returns the result;
Fig. 5 shows the processing device structure diagram that another interface provided in an embodiment of the present invention returns the result.
Specific implementation mode
The exemplary embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although showing the disclosure in attached drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure Completely it is communicated to those skilled in the art.
An embodiment of the present invention provides a kind of processing methods that interface returns the result, as shown in Figure 1, this method is applied to connect The processing that mouth returns the result, returns the result for interface before being sent to calling interface, the data lattice returned the result to interface Formula carries out unification, and specific steps include:
101, interface is generated according to the data operation request of reception to return the result.
Wherein, the corresponding identification information of calling interface is carried in data operation request, since each interface may correspond to There are multiple called sides, identification information here is the unique mark as called side, can be from multiple calling according to identification information Called side is identified in interface, to facilitate the mating operation for realizing interface and calling interface.
Here data operation request is the request that interface calls the operation of direction server end transmission data, such as asks additions and deletions It looks into and changes data, the data operation requests such as acquisition request data, similarly as interface called side is responded, server can be according to data Operation requests generate interface and return the result, for example, if data operation request is to increase a user, corresponding interface returns It can increase whether operation succeeds, or increase the user object information after operating successfully to return result, if data operation request To inquire data according to specified requirement, then it can be the result data or result data inquired that corresponding interface, which returns the result, The prompt message being not present.
102, the interface is returned the result and is unified for preset data form.
Wherein, preset data lattice can be the Internet media type (Internet media type, MIME), content class A variety of data formats such as type, Json data formats or bivariate table data format, the embodiment of the present invention do not do preset data form It limits, for Restful interfaces, the data format of generally use bivariate table data format or Json are compared In bivariate table data format, Json data formats are more compact and the built-in fast resolving of browser is supported so that more applicable In field of network data transmission.
It is usually carried out both for each interface it should be noted that the network interface of RESTful frameworks returns the result Design, can be that an individual interactive interfacing model is provided separately in interface, since the interaction models of each interface are different so that Front end or other interface called sides needs are customized exploitation to each interface, more workload are will produce, for this hair Bright embodiment is unified for preset data form by returning the result interface, can greatly reduce the mating operation amount of interface, So that interface research staff reduces interface exploitation personnel and interface docks personnel's without processing more interactive interfacing models Learning cost.
103, the interface of the preset data form is returned the result by hair according to the corresponding identification information of the calling interface It send to corresponding calling interface.
It should be noted that since the data format that the interface of different calling interfaces returns the result is different, present count The data format returned the result according to the interface of format not necessarily meets the data format of calling interface, therefore is sent out to calling interface After sending interface to return the result, calling interface end can be converted according to the data format of different calling interfaces, to facilitate root Carry out data processing is returned the result according to interface.
It can be sent to corresponding interface called side in order to which interface returns the result, further believed according to the corresponding mark of calling interface Breath, will be unified for the interface after preset data form and returns the result and be sent to the interface called side of corresponding identification information, to protect The interface that card interface called side receives request returns the result.
The processing side that a kind of interface provided in an embodiment of the present invention returns the result is can be seen that in conjunction with above-mentioned realization method Method generates interface according to the data operation request of reception first and returns the result, calling interface is carried in the data operation request Corresponding identification information, interface here is returned the result for response data operation requests, then by returning the result interface Uniform format be preset data form, only need that finite data format is parsed and used to interface caller, most The interface of preset format is returned the result according to interface corresponding identification information afterwards and is sent to corresponding calling interface.With it is existing The processing method that interface returns the result is compared, and the embodiment of the present invention is united by being unified to the format that interface returns the result 11% kind or limited several interaction models, facilitate the use of interface caller, reduce the complexity of interface docking And workload, while reducing the learning cost of interface exploitation personnel.
Below in order to the processing method that a kind of interface proposed by the present invention returns the result, especially needle is explained in more detail To judging whether carry the specified data format for requiring interface and returning the result in data operation request, the embodiment of the present invention also carries The processing method for having supplied another interface to return the result, as shown in Fig. 2, the specific steps of this method include:
201, interface is generated according to the data operation request of reception to return the result.
Wherein, the corresponding identification information of calling interface is carried in data operation request, which is used for from multiple Calling interface is identified in calling interface, to facilitate the mating operation for realizing interface and calling interface.
In addition, can also be carried other than carrying the corresponding identification information of calling interface in data operation request Interface called side requires the specified data format that interface returns the result, since most of interface data is all the number using bivariate table According to format, specified data format can be set to the data format of bivariate table, in addition the data format of bivariate table generally has By capable data format or by the data format of row, may further be connect come specific be arranged by the way that the parameter of calling interface is arranged The different data format that mouth returns the result.
More and more Web services all provide service using the network interface of RESTful frameworks at present, for example, RESTful can provide service by a set of unified interface for Web, iSO or Android, and RESTful framework styles are advised Fixed, the atom operation of data, i.e. the additions and deletions of data, which are looked into, changes operation, corresponds respectively to HTTP method:GET is used for obtaining resource, POST For creating resource (or more new resources), PUT is used for more new resources, and DELETE is used for deleting resource, has thus unified data The interface of operation, only passes through HTTP method, so that it may be looked into all additions and deletions of data and change work.
For the embodiment of the present invention, as the data behaviour that the received server-side based on RESTful frameworks to called side is sent After asking, server end can be realized corresponding according to data operation request by most common POST method in http protocol Function.
It should be noted that for different calling interfaces, the data lattice that the interface of server generation returns the result have Institute is different, such as the data operation request of the calling interface a increase users sent, and it is to increase that corresponding interface, which returns the result, Whether user is successful, and the data format which returns the result is json data formats, the inquiry sent for calling interface b The data operation request of scheduled date data, corresponding interface return the result be scheduled date data query result, the interface The data format returned the result is xml data formats.
202, judge whether to carry in the data operation request and require the specified data format that interface returns the result.
Here specified data format is that calling interface side requires interface to return the result in transmission data operation requests Data format is transmitted between server and client since interface returns the result needs, always may require that serializing and coding solution Code etc., it is therefore desirable to specify data format to limit the data format that interface returns the result by setting, to facilitate calling interface Root is returned the result according to the interface received and is handled.
For the embodiment of the present invention, the specified number that is returned the result by judging whether to carry interface in data operation request Confirm whether calling interface limits the data type that interface returns the result according to format so that server can more have needle Property returns the result interface according to the data format that calling interface requires interface to return the result and carries out unification, Convenient interface calls Person is directly returned the result using interface, and complicated parsing work is avoided.
Due to calling interface data format there are many, the data format for returning the result interface after reunification, although absolutely The data format of most of calling interfaces can be consistent, also has the case where returning the result specified data format to interface certainly or needs The data format for being suitble to most calling interfaces is chosen from preset data form.
203a, when in the data operation request carry require the specified data format that interface returns the result when, from institute State the specified data format for selecting interface to return the result in preset data form.
Since the data format returned the result comprising there are many in preset data form works as number for the embodiment of the present invention According to when carrying requires the specified data format that interface returns the result in operation requests, illustrate that calling interface returns the interface of support The data format for returning result has demand, then the specified data format for selecting interface to return the result from the preset data form, The specified data format is one kind of preset data form, and present example is to specified data format without limiting.
204a, it the interface is returned the result is unified for the interface of specified data format and returns the result.
It should be noted that due to calling interface promoter when calling in order to facilitate interface to request data, Data format requirement to return the result interface is specified data format, when server generates the interface of specified data format After returning the result, just the interface of specified data format is returned the result and is sent to calling interface, reduces the work of interface docking Amount, for example, if specified data format is xml data formats, further interface is returned the result and is unified for xml data formats Interface return the result.
For the embodiment of the present invention, since most interface data can use the data format of bivariate table, this hair Bright embodiment interface is returned the result the interface type for being defined as describing by way of a kind of key data has bivariate table come The specified data format that unified interface returns the result, to the use of more convenient interface caller.
In addition, since the occupation mode of bivariate table generally has by row and by two kinds of occupation modes of row, the embodiment of the present invention Occupation mode that can also be different to bivariate table at calling interface end is configured, so that server is returned the result in transmission interface When the bivariate tables of different occupation modes is sent for different calling interfaces.
The uniform format returned the result for interface is the data format of bivariate table, can will be in the data model of return Attribute is all as the row of bivariate table, and each row of the object as bivariate table, illustratively, a user object { name:” renzhiwei”,password:”123456”,email:" a@b ", its attribute and object are flattened to the data lattice at bivariate table When formula, as shown in table 1,
The data format of 1 bivariate table of table
Name Password Email
Renzhiwei 123456 a@b
It should be noted that column data can also be stored with to what interface returned the result in the data format of above-mentioned bivariate table Row data can also be stored with the attribute value that interface returns the result, the embodiment of the present invention in the data format of bivariate table by object The content of row or column data storage in bivariate table data format is not defined.
Correspondingly, the step 203b corresponding with step 203a, require interface when not carried in the data operation request When the specified data format returned the result, data in the preset data form are obtained according to the corresponding data format of calling interface The sequence of format.
For the embodiment of the present invention, when the specified data lattice for requiring interface and returning the result are not carried in data operation request When formula, illustrate that calling interface does not limit the data format that interface returns the result, since different calling interfaces may correspond to There is the interface of different data format to return the result, and preset data form includes multiple data formats, for of the invention real The sequence of data format in preset data form can be obtained according to the corresponding data format of calling interface by applying example, specifically can root It is ranked up, such as services according to the corresponding data format of calling interface and the corresponding calling interface quantity of each data format Device end is corresponding with tri- calling interfaces of a, b, c, and calling interface a and b call corresponding bivariate table data format, calling interface c to correspond to Dimensional table data format, to which the calling interface quantity corresponding to different data format is ordered as two dimension to data format Table data format, dimensional table number format.
Correspondingly, the step 204b corresponding with step 204a, the interface returns the result to be unified for the sequence forward Data format.
For the forward data format that sorts, illustrates that the data format meets the data format of most calling interfaces, pass through Interface is returned into result and is unified for the forward data format that sorts, interface is returned the result in order to which most calling interfaces can facilitate It is handled.
205, the interface of the preset data form is returned the result by hair according to the corresponding identification information of the calling interface It send to corresponding calling interface.
Concrete application scene for the embodiment of the present invention may include but be not limited to following realization methods:Work as server When receiving the calling of two interface callers initiation, it is firstly received the data operation request of interface called side transmission, the number According to carrying the corresponding parameter information of different calling interfaces in operation requests, the corresponding data operation request point of different calling interfaces Not Wei data inquiry request and data removal request, then judge whether to carry in data operation request require interface return knot The specified data format of fruit, the corresponding data inquiry request of first calling interface, which does not carry, requires the finger that interface returns the result Determine data format, is carried in the corresponding data removal request of second calling interface and require the specified data that interface returns the result Format is bivariate table data format, and generating interface according to different data operation requests respectively returns the result, and interface is returned As a result be unified for the data format of bivariate table, to according to the identification information of calling interface by the interface of the data format of bivariate table It returns the result correspondence and is sent to first calling interface and the second calling interface, if the interface of the second calling interface returns the result Corresponding data format is not the data format of bivariate table, and the interface received is returned the result and is converted into symbol by the second calling interface Close the data format of calling interface.
Returning the result for the network interface of middle RESTful frameworks is typically set for each interface in the prior art Meter, can provide an individual interactive interfacing model for each interface.Since interface exploitation needs to create multi-party interactive interfacing mould Type so that interface mating operation amount is big, while also increasing the learning cost of interface research staff and interface docking personnel.
The processing method that another kind interface provided in an embodiment of the present invention returns the result, by judging in data operation request Whether carrying requires the specified data format that interface returns the result, and the specified data returned the result are required further directed to carrying The data format that interface returns the result is unified for specified data format by the calling interface of format, to which Convenient interface docks, needle The calling interface for the specified data format that interface returns the result is required to not carrying, it can be by obtaining in preset data form Interface is returned the result and is unified for the forward data format that sorts by the sequence of data format, to realize that interface docks, is reduced The complexity and workload of interface docking.
Further, the specific implementation as method shown in Fig. 1, the embodiment of the present invention provide what a kind of interface returned the result Processing unit, the device embodiment is corresponding with preceding method embodiment, and for ease of reading, the present apparatus is not implemented to preceding method Detail content in example is repeated one by one, it should be understood that the device in the present embodiment, which can correspond to, realizes that preceding method is real The full content in example is applied, as shown in figure 3, described device includes:
Generation unit 31 can be used for being returned the result according to the data operation request of reception generation interface, the data behaviour The corresponding identification information of calling interface is carried in asking, the generation unit 31 is to generate interface in the present apparatus to return the result Main functional modules, can specifically be returned the result according to the particular content of data operation request to generate interface, as data grasp Make request as request modification data file, then it can be modified file that the interface generated, which returns the result, or modification File object afterwards;
Unified Element 32, the uniform format that can be used for returning the result the interface are preset data form, the system One unit 32 is the main functional modules for returning the result format in the present apparatus for unified interface, specifically can be by returning interface The object returned in result flattens the data format at bivariate table with attribute value;
Transmission unit 33 can be used for the preset data form according to the corresponding identification information of the calling interface Interface, which returns the result, is sent to corresponding calling interface, and the transmission unit 33 is to be returned the result for transmission interface in the present apparatus To the main functional modules of corresponding calling interface.
The processing unit that a kind of interface provided in an embodiment of the present invention returns the result, is asked according to the data manipulation of reception first It seeks survival into interface to return the result, the corresponding identification information of calling interface is carried in the data operation request, interface here returns It returns result and is used for response data operation requests, be then preset data form by the uniform format for returning the result interface, from And interface caller only needs that finite data format is parsed and used, it finally will be pre- according to the corresponding identification information of interface If the interface of format, which returns the result, is sent to corresponding calling interface.Compared with the processing method that existing interface returns the result, The embodiment of the present invention is unified into a kind of or limited several interactive moulds by being unified to the format that interface returns the result Type facilitates the use of interface caller, reduces the complexity and workload of interface docking, while reducing interface exploitation people The learning cost of member.
Further, as shown in figure 4, described device further includes:
Whether judging unit 34, can be used for judging carrying in the data operation request and require what interface returned the result Specified data format, the specified data format are one kind of the preset data form.
Further, the preset data form includes a variety of, and interface is required when being carried in the data operation request When the specified data format returned the result, the Unified Element 32 includes:
Selecting module 321, the specified data lattice that can be used for that interface is selected to return the result from the preset data form Formula;
Unified modules 322 can be used for returning the result the interface interface return knot for being unified for specified data format Fruit;
Further, as shown in figure 5, do not carry in the data operation request require interface return the result it is specified When data format, the Unified Element 32 includes:
Acquisition module 321 can be used for being obtained in the preset data form according to the corresponding data format of calling interface The sequence of data format;
Unified modules 322, can be used for returning the result the interface and are unified for the forward data format of the sequence.
Further, the preset data form is bivariate table, and the Unified Element 32 specifically can be used for connecing described The uniform format that mouth returns the result is the data format of bivariate table.
Further, row data are stored with the object that interface returns the result in the data format of the bivariate table, and described two The data format midrange evidence of dimension table is stored with the attribute value that interface returns the result;Or
The data format midrange evidence of the bivariate table is stored with the object that interface returns the result, the data of the bivariate table Row data are stored with the attribute value that interface returns the result in format.
The processing unit that another kind interface provided by the invention returns the result, by judging whether taken in data operation request Band requires the specified data format that interface returns the result, and the specified data format returned the result is required further directed to carrying The data format that interface returns the result is unified for specified data format by calling interface, to which Convenient interface docks, for not taking Band requires the calling interface for the specified data format that interface returns the result, can be by obtaining data lattice in preset data form Interface is returned the result and is unified for the forward data format that sorts by the sequence of formula, to realize that interface docks, reduces interface pair The complexity and workload connect.
The data transmission device includes processor and memory, and above-mentioned generation unit 31, Unified Element 32 and transmission are single Member 33 is equal to be used as program unit storage in memory, by processor execute above procedure unit stored in memory Lai Realize corresponding function.
Include kernel in processor, is gone in memory to transfer corresponding program unit by kernel.Kernel can be arranged one Or more, manpower is saved by adjusting kernel parameter, solves the problems, such as that interface mating operation amount is excessive in the prior art.
Memory may include computer-readable medium in volatile memory, random access memory (RAM) and/ Or the forms such as Nonvolatile memory, if read-only memory (ROM) or flash memory (flash RAM), memory include at least one deposit Store up chip.
Present invention also provides a kind of computer program products, when being executed on data processing equipment, are adapted for carrying out just The program code of beginningization there are as below methods step:Interface is generated according to the data operation request of reception to return the result, the data The corresponding identification information of calling interface is carried in operation requests, the interface is returned the result asks for responding the data manipulation It asks;The uniform format that the interface is returned the result is preset data form;According to the corresponding identification information of the calling interface The interface of the preset data form is returned the result and is sent to corresponding calling interface.
It should be understood by those skilled in the art that, embodiments herein can be provided as method, system or computer program Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the application Apply the form of example.Moreover, the application can be used in one or more wherein include computer usable program code computer The computer program production implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) The form of product.
The application is with reference to method, the flow of equipment (system) and computer program product according to the embodiment of the present application Figure and/or block diagram describe.It should be understood that can be realized by computer program instructions every first-class in flowchart and/or the block diagram The combination of flow and/or box in journey and/or box and flowchart and/or the block diagram.These computer programs can be provided Instruct the processor of all-purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine so that the instruction executed by computer or the processor of other programmable data processing devices is generated for real The device for the function of being specified in present one flow of flow chart or one box of multiple flows and/or block diagram or multiple boxes.
These computer program instructions, which may also be stored in, can guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works so that instruction generation stored in the computer readable memory includes referring to Enable the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one box of block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device so that count Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, in computer or The instruction executed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one The step of function of being specified in a box or multiple boxes.
In a typical configuration, computing device includes one or more processors (CPU), input/output interface, net Network interface and memory.
Memory may include computer-readable medium in volatile memory, random access memory (RAM) and/ Or the forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable Jie The example of matter.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology realizes information storage.Information can be computer-readable instruction, data structure, the module of program or other data. The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM (SRAM), moves State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable Programmable read only memory (EEPROM), fast flash memory bank or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM), Digital versatile disc (DVD) or other optical storages, magnetic tape cassette, tape magnetic disk storage or other magnetic storage apparatus Or any other non-transmission medium, it can be used for storage and can be accessed by a computing device information.As defined in this article, it calculates Machine readable medium does not include temporary computer readable media (transitory media), such as data-signal and carrier wave of modulation.
It these are only embodiments herein, be not intended to limit this application.To those skilled in the art, The application can have various modifications and variations.It is all within spirit herein and principle made by any modification, equivalent replacement, Improve etc., it should be included within the scope of claims hereof.

Claims (10)

1. a kind of processing method that interface returns the result, which is characterized in that including:
Interface is generated according to the data operation request of reception to return the result, and calling interface pair is carried in the data operation request The identification information answered;
The uniform format that the interface is returned the result is preset data form;
The interface of the preset data form is returned the result according to the calling interface corresponding identification information and is sent to correspondence Calling interface.
2. according to the method described in claim 1, it is characterized in that, the preset data form includes a variety of data formats, Before the uniform format that the interface is returned the result is preset data form, the method further includes:
Judge whether to carry in the data operation request and requires the specified data format that interface returns the result, the specified number According to one kind that format is the preset data form.
3. according to the method described in claim 2, being returned it is characterized in that, working as carrying in the data operation request and requiring interface When returning the specified data format of result, the uniform format that the interface is returned the result includes for preset data form:
The specified data format for selecting interface to return the result from the preset data form;
The interface is returned the result and is unified for the interface of specified data format and returns the result;
When do not carried in the data operation request require specified data format that interface returns the result when, it is described to be connect described The uniform format that returns the result of mouth includes for preset data form:
The sequence of data format in the preset data form is obtained according to the corresponding data format of calling interface;
The interface is returned the result and is unified for the forward data format of the sequence.
4. method according to any one of claim 1-3, which is characterized in that the preset data form is bivariate table, Described return the result the interface is unified for preset data form and includes:
The uniform format that the interface is returned the result is the data format of bivariate table.
5. according to the method described in claim 4, it is characterized in that, row data are stored with and connect in the data format of the bivariate table The data format midrange evidence of the object that mouth returns the result, the bivariate table is stored with the attribute value that interface returns the result;Or
The data format midrange evidence of the bivariate table is stored with the object that interface returns the result, the data format of the bivariate table Middle row data are stored with the attribute value that interface returns the result.
6. a kind of processing unit that interface returns the result, which is characterized in that including:
Generation unit is returned the result for generating interface according to the data operation request of reception, is taken in the data operation request With the corresponding identification information of calling interface;
Unified Element, the uniform format for returning the result the interface are preset data form;
Transmission unit, for the interface of the preset data form to be returned to knot according to the calling interface corresponding identification information Fruit is sent to corresponding calling interface.
7. device according to claim 6, which is characterized in that the preset data form includes a variety of, and described device is also Including:
Judging unit, for judging whether carry the specified data lattice for requiring interface and returning the result in the data operation request Formula, the specified data format are one kind of the preset data form.
8. device according to claim 7, which is characterized in that require interface when being carried in the data operation request and return When returning the specified data format of result, the Unified Element includes:
Selecting module, the specified data format for selecting interface to return the result from the preset data form;
Unified modules are unified for the interface of specified data format and return the result for returning the result the interface;
When do not carried in the data operation request require specified data format that interface returns the result when, the Unified Element Including:
Acquisition module, the row for obtaining data format in the preset data form according to the corresponding data format of calling interface Sequence;
Unified modules are unified for the forward data format of the sequence for returning the result the interface.
9. according to the device described in any one of claim 6-8, which is characterized in that the preset data form is bivariate table, The Unified Element, specifically for the data format that the uniform format for returning the result the interface is bivariate table.
10. device according to claim 9, which is characterized in that row data are stored in the data format of the bivariate table The data format midrange evidence of the object that interface returns the result, the bivariate table is stored with the attribute value that interface returns the result;Or
The data format midrange evidence of the bivariate table is stored with the object that interface returns the result, the data format of the bivariate table Middle row data are stored with the attribute value that interface returns the result.
CN201611257173.7A 2016-12-30 2016-12-30 A kind of processing method and processing device that interface returns the result Pending CN108279983A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611257173.7A CN108279983A (en) 2016-12-30 2016-12-30 A kind of processing method and processing device that interface returns the result

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611257173.7A CN108279983A (en) 2016-12-30 2016-12-30 A kind of processing method and processing device that interface returns the result

Publications (1)

Publication Number Publication Date
CN108279983A true CN108279983A (en) 2018-07-13

Family

ID=62800196

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611257173.7A Pending CN108279983A (en) 2016-12-30 2016-12-30 A kind of processing method and processing device that interface returns the result

Country Status (1)

Country Link
CN (1) CN108279983A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109189509A (en) * 2018-09-03 2019-01-11 中国平安人寿保险股份有限公司 The response method and server that call method, the interface of interface call

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103309674A (en) * 2013-06-25 2013-09-18 深圳中兴网信科技有限公司 Software architecture system
CN103348633A (en) * 2011-03-21 2013-10-09 苹果公司 Apparatus and method for managing peer-to-peer connections between different service providers
CN104932895A (en) * 2015-06-26 2015-09-23 南京邮电大学 Middleware based on SOA (Service-Oriented Architecture) and information publishing method thereof
CN105446819A (en) * 2015-11-06 2016-03-30 中国南方电网有限责任公司 Service connection system and design method therefor
US20160224667A1 (en) * 2015-02-04 2016-08-04 Xinyu Xingbang Information Industry Co., Ltd. Method and system of implementing an integrated interface supporting operation in multi-type databases

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103348633A (en) * 2011-03-21 2013-10-09 苹果公司 Apparatus and method for managing peer-to-peer connections between different service providers
CN103309674A (en) * 2013-06-25 2013-09-18 深圳中兴网信科技有限公司 Software architecture system
US20160224667A1 (en) * 2015-02-04 2016-08-04 Xinyu Xingbang Information Industry Co., Ltd. Method and system of implementing an integrated interface supporting operation in multi-type databases
CN104932895A (en) * 2015-06-26 2015-09-23 南京邮电大学 Middleware based on SOA (Service-Oriented Architecture) and information publishing method thereof
CN105446819A (en) * 2015-11-06 2016-03-30 中国南方电网有限责任公司 Service connection system and design method therefor

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109189509A (en) * 2018-09-03 2019-01-11 中国平安人寿保险股份有限公司 The response method and server that call method, the interface of interface call
CN109189509B (en) * 2018-09-03 2024-04-26 中国平安人寿保险股份有限公司 Interface calling method, interface calling response method and server

Similar Documents

Publication Publication Date Title
US10412167B2 (en) Hybrid cloud communication system
US10951552B2 (en) Generation of a chatbot interface for an application programming interface
CN106250987B (en) A kind of machine learning method, device and big data platform
US10083112B2 (en) Production-like testing and complex business to business auditing system
CN110119294A (en) The generation method of menu page, apparatus and system
CN109213758B (en) Data access method, device, equipment and computer readable storage medium
CN110781180B (en) Data screening method and data screening device
CN113505520A (en) Method, device and system for supporting heterogeneous federated learning
CN109241033A (en) The method and apparatus for creating real-time data warehouse
CN112346717A (en) Micro service system creating method, device, equipment, medium and micro service system
CN108984496A (en) The method and apparatus for generating report
US20240211883A1 (en) Routing business documents based on events
CN108664510A (en) Information acquisition method and device
US11748801B2 (en) Processing documents
EP2812860A1 (en) Retrieving availability information from published calendars
CN109408092A (en) Method and device, storage medium and the electronic equipment of front end version publication
CN108279983A (en) A kind of processing method and processing device that interface returns the result
CN108460002A (en) Affiliate's automatic butt method, apparatus, equipment and storage medium
CN112035156A (en) E-commerce platform docking device, method, equipment and medium
CN109525550B (en) Data message processing method, device and system
WO2017084515A1 (en) Method and device for transmitting data code stream
CN115328997A (en) Data synchronization method, system, device and storage medium
CN110347654A (en) A kind of method and apparatus of online cluster features
CN109344372B (en) Big data-based document generation method and system
CN114238585A (en) Query method and device based on 5G message, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 100083 No. 401, 4th Floor, Haitai Building, 229 North Fourth Ring Road, Haidian District, Beijing

Applicant after: BEIJING GRIDSUM TECHNOLOGY Co.,Ltd.

Address before: 100086 Beijing city Haidian District Shuangyushu Area No. 76 Zhichun Road cuigongfandian 8 layer A

Applicant before: BEIJING GRIDSUM TECHNOLOGY Co.,Ltd.

CB02 Change of applicant information
RJ01 Rejection of invention patent application after publication

Application publication date: 20180713

RJ01 Rejection of invention patent application after publication