CN110377273A - A kind of method, apparatus of data processing, medium and electronic equipment - Google Patents

A kind of method, apparatus of data processing, medium and electronic equipment Download PDF

Info

Publication number
CN110377273A
CN110377273A CN201910586251.5A CN201910586251A CN110377273A CN 110377273 A CN110377273 A CN 110377273A CN 201910586251 A CN201910586251 A CN 201910586251A CN 110377273 A CN110377273 A CN 110377273A
Authority
CN
China
Prior art keywords
information
annotation
interface
data
interface description
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910586251.5A
Other languages
Chinese (zh)
Other versions
CN110377273B (en
Inventor
邬亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network 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 ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN201910586251.5A priority Critical patent/CN110377273B/en
Publication of CN110377273A publication Critical patent/CN110377273A/en
Application granted granted Critical
Publication of CN110377273B publication Critical patent/CN110377273B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • 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

Abstract

Present disclose provides a kind of method, apparatus of data processing, medium and electronic equipments.The described method includes: obtaining the first interface description information and the first annotation information for meeting Interface Expanding definition rule from the text of interface description language;The relationship of the first interface description information Yu first annotation information is explained according to the Interface Expanding definition rule, generates application programming interface information.Disclosed method uses the extended mode of non-invasive, that is, the original semanteme of Thrift IDL is utilized, and the Thrift idl file after alloing extension is normally parsed by Thrift resolver.Thrift IDL after extension contains the data information and HTTP information of API, can be fully described by HTTP API.Disclosed method is simple, and extension content is few, and learning cost is lower.The IDS focus data content that the disclosure proposes, it is simple for structure, it is semantic clear.Solve client and server-side Development Finance disunity, study and the high problem of understanding cost.

Description

A kind of method, apparatus of data processing, medium and electronic equipment
Technical field
This disclosure relates to field of computer technology, in particular to a kind of method, apparatus of data processing, medium and Electronic equipment.
Background technique
With flourishing for internet, the browser and server network architecture (the Browser/Server network architecture, letter Claim the B/S network architecture) it is increasingly becoming the currently used most commonly used network architecture.
Under the B/S network architecture, user job interface is realized by browser, and few partial transaction logic is in front end It realizes, and major affairs logic is realized in server end, forms so-called three-decker.Client is unified under the B/S network architecture End, browser is the most important application software of client, is mainly responsible for UI displaying and interactive function.And realize system function Core focuses on server, is mainly responsible for service logic and data access.
Browser and server generally passes through hypertext transfer protocol (HyperText Transfer Protocol, abbreviation HTTP application programming interface (Application Programming Interface, abbreviation API)) connects.It is clear The developer of device end and server end of looking at is both needed to it is to be understood that specific API information could successfully carry out functional development.But work as There are clients and server-side Development Finance disunity for preceding development scheme, learn and the high problem of understanding cost.
Summary of the invention
The Summary is provided so that with brief form introduction design, these designs will be in specific implementation below Mode part is described in detail.The Summary is not intended to identify the key feature of claimed technical solution or must Feature is wanted, is intended to be used to limit the range of the technical solution of required protection.
The method, apparatus for being designed to provide a kind of data processing, medium and the electronic equipment of the disclosure, are able to solve State at least one technical problem mentioned.Concrete scheme is as follows:
According to the specific embodiment of the disclosure, in a first aspect, the disclosure provides a kind of method of data processing, comprising:
The first interface description information and for meeting Interface Expanding definition rule is obtained from the text of interface description language One annotation information;
The first interface description information and first annotation information are explained according to the Interface Expanding definition rule Relationship generates application programming interface information.
According to the specific embodiment of the disclosure, second aspect, the disclosure provides a kind of device of data processing, feature It is, comprising:
Acquiring unit, for obtaining the first interface for meeting Interface Expanding definition rule from the text of interface description language Description information and the first annotation information;
Generation unit, for explaining the first interface description information and described the according to the Interface Expanding definition rule The relationship of one annotation information generates application programming interface information.
According to the specific embodiment of the disclosure, the third aspect, the disclosure provides a kind of computer readable storage medium, On be stored with computer program, when described program is executed by processor realize as described in any one of first aspect data processing side Method.
According to the specific embodiment of the disclosure, fourth aspect, the disclosure provides a kind of electronic equipment, comprising: one or Multiple processors;Storage device, for storing one or more programs, when one or more of programs are by one or more When a processor executes, so that one or more of processors realize the side of the data processing as described in any one of first aspect Method.
The above scheme of the embodiment of the present disclosure compared with prior art, at least has the advantages that
Present disclose provides a kind of method, apparatus of data processing, medium and electronic equipments.The described method includes: from connecing The first interface description information and the first annotation information for meeting Interface Expanding definition rule are obtained in the text of mouth description language;Root The relationship of the first interface description information Yu first annotation information is explained according to the Interface Expanding definition rule, generation is answered With Program Interfaces information.
The disclosure is extended the mode that the relevant information of HTTP writes annotation the inside to Thrift IDL.On the one hand, Extending information is read for developer, tells specific meaning of the corresponding Thrift type of developer in HTTP request;Separately On the one hand, extension information is parsed for resolver, determines realization side of the corresponding Thrift type in the code library of generation Formula.
Disclosed method uses the extended mode of non-invasive, that is, the original semanteme of Thrift IDL is utilized, Thrift idl file after alloing extension is normally parsed by Thrift resolver.Thrift IDL after extension is contained The data information and HTTP information of API, can be fully described by HTTP API.Disclosed method is simple, and extension content is few, study Cost is relatively low.The IDS focus data content that the disclosure proposes, it is simple for structure, it is semantic clear.It solves client to open with server-side Hair form disunity, study and the high problem of understanding cost.The file of the IDS proposed using the disclosure can be used to generate code Library promotes development efficiency.
Detailed description of the invention
In conjunction with attached drawing and refer to following specific embodiments, the above and other feature, advantage of each embodiment of the disclosure and Aspect will be apparent.In attached drawing, the same or similar appended drawing reference indicates the same or similar element.It should manage Solution attached drawing is schematically that original part and element are not necessarily drawn to scale.In the accompanying drawings:
Fig. 1 shows the flow chart of the method for the data processing according to the embodiment of the present disclosure;
Fig. 2 shows the unit block diagrams according to the device of the data processing of the embodiment of the present disclosure;
Fig. 3 shows electronic equipment attachment structure schematic diagram according to an embodiment of the present disclosure.
Specific embodiment
Embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although showing the certain of the disclosure in attached drawing Embodiment, it should be understood that, the disclosure can be realized by various forms, and should not be construed as being limited to this In the embodiment that illustrates, providing these embodiments on the contrary is in order to more thorough and be fully understood by the disclosure.It should be understood that It is that being given for example only property of the accompanying drawings and embodiments effect of the disclosure is not intended to limit the protection scope of the disclosure.
It should be appreciated that each step recorded in disclosed method embodiment can execute in a different order, And/or parallel execution.In addition, method implementation may include additional step and/or omit the step of execution is shown.This public affairs The range opened is not limited in this respect.
Terms used herein " comprising " and its deformation are that opening includes, i.e., " including but not limited to ".Term "based" It is " being based at least partially on ".Term " one embodiment " expression " at least one embodiment ";Term " another embodiment " indicates " at least one other embodiment ";Term " some embodiments " expression " at least some embodiments ".The correlation of other terms is fixed Justice provides in will be described below.
It is noted that the concepts such as " first " that refers in the disclosure, " second " are only used for different devices, module or list Member distinguishes, and is not intended to limit the sequence or relation of interdependence of function performed by these devices, module or unit.
It is noted that referred in the disclosure "one", the modification of " multiple " be schematically and not restrictive this field It will be appreciated by the skilled person that being otherwise construed as " one or more " unless clearly indicate otherwise in context.
The being merely to illustrate property of title of the message or information that are interacted between multiple devices in disclosure embodiment Purpose, and be not used to limit the range of these message or information.
The alternative embodiment of the disclosure is described in detail with reference to the accompanying drawing.
To the first embodiment that the disclosure provides, i.e., a kind of embodiment of the method for data processing.
The embodiment of the present disclosure is described in detail below with reference to Fig. 1, wherein Fig. 1 is the number that the embodiment of the present disclosure provides According to the flow chart of the method for processing.
Step S101 obtains the first interface description for meeting Interface Expanding definition rule from the text of interface description language Information and the first annotation information.
Interface description language (full name in English Interface description language, abbreviation IDL), is for retouching State a kind of computer language of component software interface.IDL describes interface by way of a kind of neutrality, so that in different platform The object of upper operation can be in communication with each other with the program write with different language and exchange.For example, a component is write as with C++, separately One component is write as with Java, carries out data communication by IDL between two components.
IDL is commonly used in far call software.In this case, different operation is usually called by remote client terminal Subject component in system, and these subject components may be to be write by different computer languages.IDL establishes two The bridge communicated between different operating system.
For example, Thrift IDL is exactly a kind of interface description language unrelated with programming language, developer is allowed to connect with one kind The mode closely programmed describes and defining interface;Thrift IDL is simple for structure, semantic clear;The type that Thrift IDL is defined Relatively the data type in existing various programming languages, learning cost are lower;Thrift idl file can be used directly To generate code library, promotion development efficiency;But Thrift IDL is for describing remote procedure call (full name in English Remote Procedure Call, abbreviation RPC) API, description HTTP API can not be used directly to.
The above-mentioned advantage of disclosure combination IDL, information relevant to HTTP API write in the annotation of IDL to IDL into Row extension.Developer can read the text of interface description language, directly acquire specific meaning of the IDL data type in HTTP request Justice.
The Interface Expanding definition rule defines the first annotation information and first interface description information and the first annotation The relationship of information.
The Interface Expanding definition rule, the expression formula of the extension information including the first annotation information:
Fer.<key>=<' value'>;
Wherein,
Fer indicates the initiation feature mark for meeting the extension information of the first annotation information of Interface Expanding definition rule;
=, front and back is with or without space;
<key>indicates extension information;
<' value'>, indicate the value of extension information.
Separated between continuous multiple expression formulas with default segmentation symbol in same a line of first annotation information.Example Such as, the default segmentation symbol is comma.First annotation information, comprising: multirow annotation information, uniline annotation information and row Interior annotation information.
The relationship of the first interface description information and the first annotation information includes at least one of following relationship:
Type definition of the expression formula of multirow annotation or uniline annotation to the first interface description information after the expression formula Effectively;
Sky is with or without between the type definition of the expression formula and first interface description information of multirow annotation or uniline annotation Row;
The expression formula annotated in row is effective to the type definition of the first interface description information of same a line.
For example,
The expression formula " fer.key1='value1' " and " fer.key2=' of extension information in multirow annotation Value2' " defines " Struct1 " effectively to the structure type of first interface description information, the table of the extension information of uniline annotation Up to formula " fer.key3='value3' " to the string type definition " key1 " of first interface description information effectively, annotation in row Extension information expression formula " fer.key4='value4' " to the string type definition of first interface description information " key2 " is effective.
The extension information, including request extension information.
The request extends information, comprising: the service of the prefix information of the URL of HTTP request, the URL of HTTP request The function information of the URL of information, HTTP request, the method information of HTTP request, the request message head information of HTTP and The response message head information of HTTP.
The request extends information, further includes: the serialization information of the data of version information and HTTP request.
It refers to shown in table 1, Thrift IDL request extension information explanation:
Table 1
The extension information, including Data expansion information.
The Data expansion information, comprising: location information, data actual value in transmission of the data in HTTP request And data are in the type of front end.
It refers to shown in table 2, Thrift IDL Data expansion information explanation:
Table 2
Location information of the data in HTTP request, comprising: path, query, header, cookie, body, Form, entire_body and status_code.
It refers to shown in table 3, the location information explanation of Thrift IDL:
Table 3
For example,
/*
Fer.url.prefix=' https: //www.example.com/api '
Fer.req.headers=' Content-Type:application/json
Fer.res.headers=' Content-Type:application/json
*/
Enum InfoType{
PUBLIC=1
PRIVATE=2
}
Struct UserInfo{
1:string id
2:optional string name
3:optional string sex
4:optional bool marry
}
Struct UserRequest{
1:InfoType type#fer.position=' path '
2:string uid//fer.position=' body '
}
Struct UserReponse{
1:i8code=0
2:optional string msg
3:optional UserInfo data
}
//fer.methed=' POST '
Service Info{
UserResponse user (1:UserRequest req) #fer.url.function='/user/:type '
}
Above-mentioned example is the text of interface description language.The text defines a HTTP API.The URL of request is ' https: //www.example.com/api/Info/user/:type ', wherein ': the value of type ' is 1 or 2, by Req.type is determined.The Method of request be ' POST'.Request message head be ' Content-Type:application/ json'.The Body of request message includes a uid data, coding mode JSON.When request is sent, data are without sequence Change operation.The response message head of request be ' Content-Type:application/json'.The Body of the response message of request Data comprising " UserResponse " type, coding mode JSON.It can be seen that the text of the interface description language is complete Ground describes a HTTP API.Developer can obtain institute's API information in need from the text of the interface description language, Compiler can parse the text of the interface description language and generate corresponding code library.
Step S102 explains the first interface description information and first note according to the Interface Expanding definition rule The relationship of information is released, application programming interface information is generated.
Namely extension information is parsed by resolver, and determines reality of the corresponding Thrift type in the code library of generation Existing mode.
The generation application programming interface information, that is, generate API information.
The disclosure is extended the mode that the relevant information of HTTP writes annotation the inside to Thrift IDL.On the one hand, Extending information is read for developer, tells specific meaning of the corresponding Thrift type of developer in HTTP request;Separately On the one hand, extension information is parsed for resolver, determines realization side of the corresponding Thrift type in the code library of generation Formula.
Disclosed method uses the extended mode of non-invasive, that is, the original semanteme of Thrift IDL is utilized, Thrift idl file after alloing extension is normally parsed by Thrift resolver.Thrift IDL after extension is contained The data information and HTTP information of API, can be fully described by HTTP API.Disclosed method is simple, and extension content is few, study Cost is relatively low.The IDS focus data content that the disclosure proposes, it is simple for structure, it is semantic clear.It solves client to open with server-side Hair form disunity, study and the high problem of understanding cost.The file of the IDS proposed using the disclosure can be used to generate code Library promotes development efficiency.
Corresponding with the first embodiment that the disclosure provides, the disclosure additionally provides second embodiment, i.e., at a kind of data The device of reason.Since second embodiment is substantially similar to first embodiment, so describing fairly simple, relevant part please join See the corresponding explanation of first embodiment.Installation practice described below is only schematical.
Fig. 2 shows a kind of embodiments of the device of data processing of disclosure offer.Fig. 2 provides for the embodiment of the present disclosure Data processing device unit block diagram.
Shown in Figure 2, the disclosure provides a kind of device of data processing, comprising: acquiring unit 201, generation unit 202。
Acquiring unit 201 meets the first of Interface Expanding definition rule for obtaining from the text of interface description language Interface description information and the first annotation information;
Generation unit 202, for explaining the first interface description information and institute according to the Interface Expanding definition rule The relationship of the first annotation information is stated, application programming interface information is generated.
Optionally, the Interface Expanding definition rule, the expression formula of the extension information including the first annotation information:
Fer.<key>=<' value'>;
Wherein,
Fer indicates the initiation feature mark for meeting the extension information of the first annotation information of Interface Expanding definition rule;
=, front and back is with or without space;
<key>indicates extension information;
<' value'>, indicate the value of extension information.
Optionally, divided between continuous multiple expression formulas with default segmentation symbol in same a line of first annotation information Every.
Optionally, first annotation information, comprising: annotation information in multirow annotation information, uniline annotation information and row;
The relationship of the first interface description information and the first annotation information includes at least one of following relationship:
Type definition of the expression formula of multirow annotation or uniline annotation to the first interface description information after the expression formula Effectively;
Sky is with or without between the type definition of the expression formula and first interface description information of multirow annotation or uniline annotation Row;
The expression formula annotated in row is effective to the type definition of the first interface description information of same a line.
Optionally, the extension information, including request extension information;
The request extends information, comprising: the service of the prefix information of the URL of HTTP request, the URL of HTTP request The function information of the URL of information, HTTP request, the method information of HTTP request, the request message head information of HTTP and The response message head information of HTTP.
Optionally, the request extends information, further includes: the serialization information of the data of version information and HTTP request.
Optionally, the extension information, including Data expansion information;
The Data expansion information, comprising: location information, data actual value in transmission of the data in HTTP request And data are in the type of front end.
Optionally, location information of the data in HTTP request, comprising: routing information, query information, head information, Body information, form data, non-coding body information and status code.
The disclosure is extended the mode that the relevant information of HTTP writes annotation the inside to Thrift IDL.On the one hand, Extending information is read for developer, tells specific meaning of the corresponding Thrift type of developer in HTTP request;Separately On the one hand, extension information is parsed for resolver, determines realization side of the corresponding Thrift type in the code library of generation Formula.
Disclosed method uses the extended mode of non-invasive, that is, the original semanteme of Thrift IDL is utilized, Thrift idl file after alloing extension is normally parsed by Thrift resolver.Thrift IDL after extension is contained The data information and HTTP information of API, can be fully described by HTTP API.Disclosed method is simple, and extension content is few, study Cost is relatively low.The IDS focus data content that the disclosure proposes, it is simple for structure, it is semantic clear.It solves client to open with server-side Hair form disunity, study and the high problem of understanding cost.The file of the IDS proposed using the disclosure can be used to generate code Library promotes development efficiency.
The embodiment of the present disclosure provides 3rd embodiment, i.e. a kind of electronic equipment, the method which is used for data processing, The electronic equipment, comprising: at least one processor;And the memory being connect at least one described processor communication;Its In,
The memory is stored with the instruction that can be executed by one processor, and described instruction is by described at least one It manages device to execute, so that the method that at least one described processor is able to carry out data processing as in the first embodiment.
The embodiment of the present disclosure provides fourth embodiment, i.e., a kind of computer storage medium of data processing, the calculating Machine storage medium is stored with computer executable instructions, which can be performed in above-mentioned any means embodiment The method of the data processing.
Below with reference to Fig. 3, it illustrates the structural schematic diagrams for the electronic equipment for being suitable for being used to realize the embodiment of the present disclosure.This Terminal device in open embodiment can include but is not limited to such as mobile phone, laptop, digit broadcasting receiver, PDA (personal digital assistant), PAD (tablet computer), PMP (portable media player), car-mounted terminal (such as vehicle mounted guidance Terminal) etc. mobile terminal and such as number TV, desktop computer etc. fixed terminal.Electronic equipment shown in Fig. 3 An only example, should not function to the embodiment of the present disclosure and use scope bring any restrictions.
As shown in figure 3, electronic equipment may include processing unit (such as central processing unit, graphics processor etc.) 301, Random access storage device can be loaded into according to the program being stored in read-only memory (ROM) 302 or from storage device 308 (RAM) program in 303 and execute various movements appropriate and processing.In RAM 303, it is also stored with electronic device institute The various programs and data needed.Processing unit 301, ROM 302 and RAM 303 are connected with each other by bus 304.Input/defeated (I/O) interface 305 is also connected to bus 304 out.
In general, following device can connect to I/O interface 305: including such as touch screen, touch tablet, keyboard, mouse, taking the photograph As the input unit 306 of head, microphone, accelerometer, gyroscope etc.;Including such as liquid crystal display (LCD), loudspeaker, vibration The output device 307 of dynamic device etc.;Storage device 308 including such as tape, hard disk etc.;And communication device 309.Communication device 309, which can permit electronic equipment, is wirelessly or non-wirelessly communicated with other equipment to exchange data.Although Fig. 3, which is shown, to be had respectively The electronic equipment of kind device, it should be understood that being not required for implementing or having all devices shown.It can be alternatively real Apply or have more or fewer devices.
Particularly, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description Software program.For example, embodiment of the disclosure includes a kind of computer program product comprising being carried on non-transient computer can The computer program on medium is read, which includes the program code for method shown in execution flow chart.At this In the embodiment of sample, which can be downloaded and installed from network by communication device 309, or be filled from storage It sets 308 to be mounted, or is mounted from ROM 302.When the computer program is executed by processing unit 301, the disclosure is executed The above-mentioned function of being limited in the method for embodiment.
It should be noted that the above-mentioned computer-readable medium of the disclosure can be computer-readable signal media or meter Calculation machine readable storage medium storing program for executing either the two any combination.Computer readable storage medium for example can be --- but not Be limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination.Meter The more specific example of calculation machine readable storage medium storing program for executing can include but is not limited to: have the electrical connection, just of one or more conducting wires Taking formula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed read-only storage Device (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device, Or above-mentioned any appropriate combination.In the disclosure, computer readable storage medium can be it is any include or storage journey The tangible medium of sequence, the program can be commanded execution system, device or device use or in connection.And at this In open, computer-readable signal media may include in a base band or as the data-signal that carrier wave a part is propagated, In carry computer-readable program code.The data-signal of this propagation can take various forms, including but not limited to Electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be computer-readable and deposit Any computer-readable medium other than storage media, the computer-readable signal media can send, propagate or transmit and be used for By the use of instruction execution system, device or device or program in connection.Include on computer-readable medium Program code can transmit with any suitable medium, including but not limited to: electric wire, optical cable, RF (radio frequency) etc. are above-mentioned Any appropriate combination.
In some embodiments, client, server can use such as HTTP (HyperText Transfer Protocol, hypertext transfer protocol) etc the network protocols of any currently known or following research and development communicated, and can To be interconnected with the digital data communications (for example, communication network) of arbitrary form or medium.The example of communication network includes local area network (" LAN "), wide area network (" WAN "), Internet (for example, internet) and ad-hoc network are (for example, the end-to-end net of ad hoc Network) and any currently known or following research and development network.
Above-mentioned computer-readable medium can be included in above-mentioned electronic equipment;It is also possible to individualism, and not It is fitted into the electronic equipment.
Above-mentioned computer-readable medium carries one or more program, when said one or multiple programs are by the electricity When sub- equipment executes, so that the electronic equipment: obtaining at least two internet protocol addresses;Send to Node evaluation equipment includes institute State the Node evaluation request of at least two internet protocol addresses, wherein the Node evaluation equipment is internet from described at least two In protocol address, chooses internet protocol address and return;Receive the internet protocol address that the Node evaluation equipment returns;Its In, the fringe node in acquired internet protocol address instruction content distributing network.
Alternatively, above-mentioned computer-readable medium carries one or more program, when said one or multiple programs When being executed by the electronic equipment, so that the electronic equipment: receiving the Node evaluation including at least two internet protocol addresses and request; From at least two internet protocol address, internet protocol address is chosen;Return to the internet protocol address selected;Wherein, The fringe node in internet protocol address instruction content distributing network received.
The calculating of the operation for executing the disclosure can be write with one or more programming languages or combinations thereof Machine program code, above procedure design language include but is not limited to object oriented program language-such as Java, Smalltalk, C++ further include conventional procedural programming language-such as " C " language or similar program design language Speech.Program code can be executed fully on the user computer, partly be executed on the user computer, as an independence Software package execute, part on the user computer part execute on the remote computer or completely in remote computer or It is executed on server.In situations involving remote computers, remote computer can pass through the network of any kind --- packet It includes local area network (LAN) or wide area network (WAN)-is connected to subscriber computer, or, it may be connected to outer computer (such as benefit It is connected with ISP by internet).
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the disclosure, method and computer journey The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation A part of one module, program segment or code of table, a part of the module, program segment or code include one or more use The executable instruction of the logic function as defined in realizing.It should also be noted that in some implementations as replacements, being marked in box The function of note can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are actually It can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it to infuse Meaning, the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart can be with holding The dedicated hardware based system of functions or operations as defined in row is realized, or can use specialized hardware and computer instruction Combination realize.
Being described in unit involved in the embodiment of the present disclosure can be realized by way of software, can also be by hard The mode of part is realized.Wherein, the title of unit does not constitute the restriction to the unit itself under certain conditions, for example, the One acquiring unit is also described as " obtaining the unit of at least two internet protocol addresses ".
Function described herein can be executed at least partly by one or more hardware logic components.Example Such as, without limitation, the hardware logic component for the exemplary type that can be used include: field programmable gate array (FPGA), specially With integrated circuit (ASIC), Application Specific Standard Product (ASSP), system on chip (SOC), complex programmable logic equipment (CPLD) etc. Deng.
In the context of the disclosure, machine readable media can be tangible medium, may include or is stored for The program that instruction execution system, device or equipment are used or is used in combination with instruction execution system, device or equipment.Machine can Reading medium can be machine-readable signal medium or machine-readable storage medium.Machine readable media can include but is not limited to electricity Son, magnetic, optical, electromagnetism, infrared or semiconductor system, device or equipment or above content any conjunction Suitable combination.The more specific example of machine readable storage medium will include the electrical connection of line based on one or more, portable meter Calculation machine disk, hard disk, random access memory (RAM), read-only memory (ROM), Erasable Programmable Read Only Memory EPROM (EPROM Or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage facilities or Any appropriate combination of above content.
Above description is only the preferred embodiment of the disclosure and the explanation to institute's application technology principle.Those skilled in the art Member is it should be appreciated that the open scope involved in the disclosure, however it is not limited to technology made of the specific combination of above-mentioned technical characteristic Scheme, while should also cover in the case where not departing from design disclosed above, it is carried out by above-mentioned technical characteristic or its equivalent feature Any combination and the other technical solutions formed.Such as features described above has similar function with (but being not limited to) disclosed in the disclosure Can technical characteristic replaced mutually and the technical solution that is formed.
Although this is not construed as requiring these operations with institute in addition, depicting each operation using certain order The certain order that shows executes in sequential order to execute.Under certain environment, multitask and parallel processing may be advantageous 's.Similarly, although containing several specific implementation details in being discussed above, these are not construed as to this public affairs The limitation for the range opened.Certain features described in the context of individual embodiment can also be realized in combination single real It applies in example.On the contrary, the various features described in the context of single embodiment can also be individually or with any suitable The mode of sub-portfolio is realized in various embodiments.
Although having used specific to this theme of the language description of structure feature and/or method logical action, answer When understanding that theme defined in the appended claims is not necessarily limited to special characteristic described above or movement.On on the contrary, Special characteristic described in face and movement are only to realize the exemplary forms of claims.

Claims (11)

1. a kind of method of data processing characterized by comprising
The first interface description information and the first note for meeting Interface Expanding definition rule are obtained from the text of interface description language Release information;
The relationship of the first interface description information Yu first annotation information is explained according to the Interface Expanding definition rule, Generate application programming interface information.
2. the method according to claim 1, wherein the Interface Expanding definition rule, including the first annotation are believed The expression formula of the extension information of breath:
Fer.<key>=<' value'>;
Wherein,
Fer indicates the initiation feature mark for meeting the extension information of the first annotation information of Interface Expanding definition rule;
=, front and back is with or without space;
<key>indicates extension information;
<' value'>, indicate the value of extension information.
3. according to the method described in claim 2, it is characterized in that, continuous multiple institutes in same a line of first annotation information It states and is separated between expression formula with default segmentation symbol.
4. according to the method described in claim 2, it is characterized in that, first annotation information, comprising: multirow annotation information, Annotation information in uniline annotation information and row;
The relationship of the first interface description information and the first annotation information includes at least one of following relationship:
The expression formula of multirow annotation or uniline annotation is effective to the type definition of the first interface description information after the expression formula;
Null is with or without between the type definition of the expression formula and first interface description information of multirow annotation or uniline annotation;
The expression formula annotated in row is effective to the type definition of the first interface description information of same a line.
5. according to the method described in claim 2, it is characterized in that, the extension information, including request extend information;
The request extends information, comprising: the prefix information of the URL of HTTP request, the URL of HTTP request service information, Function information, the method information of HTTP request, the request message head information of HTTP and the sound of HTTP of the URL of HTTP request Answer message header information.
6. according to the method described in claim 5, it is characterized in that, the request extend information, further includes: version information and The serialization information of the data of HTTP request.
7. according to the method described in claim 2, it is characterized in that, the extension information, including Data expansion information;
The Data expansion information, comprising: actual value in transmission of location information of the data in HTTP request, data and Type of the data in front end.
8. according to the method described in claim 2, it is characterized in that, location information of the data in HTTP request, comprising: Routing information, query information, head information, body information, form data, non-coding body information and status code.
9. a kind of device of data processing characterized by comprising
Acquiring unit, for obtaining the first interface description for meeting Interface Expanding definition rule from the text of interface description language Information and the first annotation information;
Generation unit, for explaining the first interface description information and first note according to the Interface Expanding definition rule The relationship of information is released, application programming interface information is generated.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that described program is processed Such as method described in any item of the claim 1 to 8 is realized when device executes.
11. a kind of electronic equipment characterized by comprising
One or more processors;
Storage device, for storing one or more programs, when one or more of programs are by one or more of processing When device executes, so that one or more of processors realize such as method described in any item of the claim 1 to 8.
CN201910586251.5A 2019-07-01 2019-07-01 Data processing method, device, medium and electronic equipment Active CN110377273B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910586251.5A CN110377273B (en) 2019-07-01 2019-07-01 Data processing method, device, medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910586251.5A CN110377273B (en) 2019-07-01 2019-07-01 Data processing method, device, medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN110377273A true CN110377273A (en) 2019-10-25
CN110377273B CN110377273B (en) 2023-07-28

Family

ID=68251512

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910586251.5A Active CN110377273B (en) 2019-07-01 2019-07-01 Data processing method, device, medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN110377273B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111414161A (en) * 2020-03-27 2020-07-14 北京字节跳动网络技术有限公司 Method, device, medium and electronic equipment for generating ID L file
CN111831288A (en) * 2020-06-30 2020-10-27 厦门亿联网络技术股份有限公司 Method and system for automatically generating Thrift IDL data structure and automatic transfer function
CN111950239A (en) * 2020-08-07 2020-11-17 北京字节跳动网络技术有限公司 Schema document generation method and device, computer equipment and medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040201600A1 (en) * 2001-12-14 2004-10-14 Microsoft Corporation Methods and system for providing an XML-based interface description language
US20040205545A1 (en) * 2002-04-10 2004-10-14 Bargeron David M. Common annotation framework
CN1552029A (en) * 2001-07-02 2004-12-01 Bea系统公司 Web service development platform for asynchronous web services
US20080104238A1 (en) * 2006-10-26 2008-05-01 Gilfix Michael A Extending web service description language for sip/call flow interactions
CN101233502A (en) * 2005-07-29 2008-07-30 微软公司 Lightweight application program interface (API) for extensible markup language (XML)
CN101536021A (en) * 2006-11-01 2009-09-16 微软公司 Health integration platform API
US20140040863A1 (en) * 2012-07-31 2014-02-06 Vmware, Inc. Documentation generation for web apis based on byte code analysis
CN104932910A (en) * 2014-03-20 2015-09-23 中国移动通信集团公司 Method and system for application program interface extension
CN107301098A (en) * 2017-06-15 2017-10-27 搜易贷(北京)金融信息服务有限公司 A kind of remote procedure call device based on Thrift agreements, method and system
CN107832045A (en) * 2017-10-16 2018-03-23 北京京东尚科信息技术有限公司 Across the method and apparatus of programming language interface conversion

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1552029A (en) * 2001-07-02 2004-12-01 Bea系统公司 Web service development platform for asynchronous web services
US20040201600A1 (en) * 2001-12-14 2004-10-14 Microsoft Corporation Methods and system for providing an XML-based interface description language
US20040205545A1 (en) * 2002-04-10 2004-10-14 Bargeron David M. Common annotation framework
CN101233502A (en) * 2005-07-29 2008-07-30 微软公司 Lightweight application program interface (API) for extensible markup language (XML)
US20080104238A1 (en) * 2006-10-26 2008-05-01 Gilfix Michael A Extending web service description language for sip/call flow interactions
CN101536021A (en) * 2006-11-01 2009-09-16 微软公司 Health integration platform API
US20140040863A1 (en) * 2012-07-31 2014-02-06 Vmware, Inc. Documentation generation for web apis based on byte code analysis
CN104932910A (en) * 2014-03-20 2015-09-23 中国移动通信集团公司 Method and system for application program interface extension
CN107301098A (en) * 2017-06-15 2017-10-27 搜易贷(北京)金融信息服务有限公司 A kind of remote procedure call device based on Thrift agreements, method and system
CN107832045A (en) * 2017-10-16 2018-03-23 北京京东尚科信息技术有限公司 Across the method and apparatus of programming language interface conversion

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
段会川等: "基于XML的信息技术试题标记语言的设计与实现", 《计算机工程与应用》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111414161A (en) * 2020-03-27 2020-07-14 北京字节跳动网络技术有限公司 Method, device, medium and electronic equipment for generating ID L file
CN111414161B (en) * 2020-03-27 2023-05-12 北京字节跳动网络技术有限公司 Method, device, medium and electronic equipment for generating IDL file
CN111831288A (en) * 2020-06-30 2020-10-27 厦门亿联网络技术股份有限公司 Method and system for automatically generating Thrift IDL data structure and automatic transfer function
CN111831288B (en) * 2020-06-30 2022-06-07 厦门亿联网络技术股份有限公司 Method and system for automatically generating Thrift IDL data structure and automatic transfer function
CN111950239A (en) * 2020-08-07 2020-11-17 北京字节跳动网络技术有限公司 Schema document generation method and device, computer equipment and medium

Also Published As

Publication number Publication date
CN110377273B (en) 2023-07-28

Similar Documents

Publication Publication Date Title
CN110457144A (en) A kind of method, apparatus that realizing front end applications, medium and equipment
CN110162670A (en) Method and apparatus for generating expression packet
CN110489323A (en) Visual RPC API adjustment method, device, medium and equipment
CN110377273A (en) A kind of method, apparatus of data processing, medium and electronic equipment
CN110275723A (en) Obtain method, apparatus, electronic equipment and the readable medium of resource
CN110213614A (en) The method and apparatus of key frame are extracted from video file
CN109714332A (en) The method for converting protocol and device parsed based on Thrift and syntax tree
CN110391938A (en) Method and apparatus for deployment services
CN110069308A (en) The page starts method, apparatus, electronic equipment and storage medium
CN110390493A (en) Task management method, device, storage medium and electronic equipment
CN108494860A (en) WEB accesses system, WEB access methods and device for client
CN110536149A (en) Message display method, device, readable medium and electronic equipment
WO2020199659A1 (en) Method and apparatus for determining push priority information
CN110489474A (en) A kind of method, apparatus of data processing, medium and electronic equipment
CN110275736A (en) Obtain operation data method, apparatus, equipment and the readable medium of application program
WO2021227953A1 (en) Image special effect configuration method, image recognition method, apparatuses, and electronic device
CN110110693A (en) The method and apparatus of face character for identification
CN109947423A (en) Code generating method, device, terminal and medium
CN109814915A (en) Method for parameter configuration, device, medium and electronic equipment based on lua
CN109697034A (en) A kind of method for writing data, device, electronic equipment and storage medium
CN113742005A (en) Platform docking method and device
CN111752644A (en) Interface simulation method, device, equipment and storage medium
CN110489326A (en) HTTPAPI adjustment method device, medium and equipment based on IDS
CN110489621A (en) A kind of method, apparatus, medium and the electronic equipment of dynamic adjustment routing
CN110427584A (en) Page generation method, device, electronic equipment and computer readable 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
GR01 Patent grant
GR01 Patent grant