CN110377273B - Data processing method, device, medium and electronic equipment - Google Patents

Data processing method, device, medium and electronic equipment Download PDF

Info

Publication number
CN110377273B
CN110377273B CN201910586251.5A CN201910586251A CN110377273B CN 110377273 B CN110377273 B CN 110377273B CN 201910586251 A CN201910586251 A CN 201910586251A CN 110377273 B CN110377273 B CN 110377273B
Authority
CN
China
Prior art keywords
information
extension
interface
data
annotation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910586251.5A
Other languages
Chinese (zh)
Other versions
CN110377273A (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

The disclosure provides a data processing method, a data processing device, a medium and electronic equipment. The method comprises the following steps: acquiring first interface description information and first annotation information conforming to an interface extension definition rule from a text of an interface description language; and interpreting the relation between the first interface description information and the first annotation information according to the interface extension definition rule to generate application programming interface information. The method adopts a non-invasive expansion mode, namely, the original semantics of the thread IDL are utilized, so that the expanded thread IDL file can be normally analyzed by a thread analyzer. The extended thread IDL contains data information and HTTP information of the API, and may fully describe the HTTP API. The method is simple, the expansion content is less, and the learning cost is lower. The IDS provided by the disclosure focuses data content, and has a simple structure and clear semantics. The method solves the problems of non-uniform development forms of the client and the server and high learning and understanding costs.

Description

Data processing method, device, medium and electronic equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method, an apparatus, a medium, and an electronic device for data processing.
Background
With the vigorous development of the internet, browser and Server network architecture (Browser/Server network architecture, abbreviated as B/S network architecture) is becoming the most widely used network architecture.
In the B/S network architecture, the user work interface is realized by a browser, a very small part of transaction logic is realized at the front end, and the main transaction logic is realized at the server end, so-called three-layer structure is formed. The client is unified under the B/S network architecture, and the browser is the most main application software of the client and is mainly responsible for UI display and interaction functions. The core part of the system function realization is concentrated on the server and is mainly responsible for business logic and data access.
The browser and server are typically connected by an application programming interface (Application Programming Interface, API) of the hypertext transfer protocol (HyperText Transfer Protocol, HTTP). The developers at the browser end and the server end need to know specific API information to successfully develop functions. However, the current development mode has the problems of non-uniform development modes of the client and the server and high learning and understanding costs.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
The present disclosure aims to provide a data processing method, a data processing device, a medium and an electronic device, which can solve at least one technical problem mentioned above. The specific scheme is as follows:
according to a first aspect of a specific embodiment of the present disclosure, the present disclosure provides a method of data processing, comprising:
acquiring first interface description information and first annotation information conforming to an interface extension definition rule from a text of an interface description language;
and interpreting the relation between the first interface description information and the first annotation information according to the interface extension definition rule to generate application programming interface information.
According to a second aspect of a specific embodiment of the present disclosure, the present disclosure provides an apparatus for data processing, including:
the acquisition unit is used for acquiring first interface description information and first annotation information which accord with the interface extension definition rule from the text of the interface description language;
and the generating unit is used for interpreting the relation between the first interface description information and the first annotation information according to the interface extension definition rule and generating application programming interface information.
According to a third aspect of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method of data processing according to any of the first aspects.
According to a fourth aspect of the present disclosure, there is provided an electronic device comprising: one or more processors; storage means for storing one or more programs which when executed by the one or more processors cause the one or more processors to implement the method of data processing as claimed in any of the first aspects.
Compared with the prior art, the scheme of the embodiment of the disclosure has at least the following beneficial effects:
the disclosure provides a data processing method, a data processing device, a medium and electronic equipment. The method comprises the following steps: acquiring first interface description information and first annotation information conforming to an interface extension definition rule from a text of an interface description language; and interpreting the relation between the first interface description information and the first annotation information according to the interface extension definition rule to generate application programming interface information.
The present disclosure extends the thread IDL in a manner that writes HTTP-related information into the annotation. On one hand, the expansion information is read by a developer and tells the developer the specific meaning of the corresponding thread type in the HTTP request; on the other hand, the extension information is analyzed by the analyzer, and the implementation mode of the corresponding thread type in the generated code base is determined.
The method adopts a non-invasive expansion mode, namely, the original semantics of the thread IDL are utilized, so that the expanded thread IDL file can be normally analyzed by a thread analyzer. The extended thread IDL contains data information and HTTP information of the API, and may fully describe the HTTP API. The method is simple, the expansion content is less, and the learning cost is lower. The IDS provided by the disclosure focuses data content, and has a simple structure and clear semantics. The method solves the problems of non-uniform development forms of the client and the server and high learning and understanding costs. The file of the IDS provided by the present disclosure can be used to generate a code library, thereby improving the development efficiency.
Drawings
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. The same or similar reference numbers will be used throughout the drawings to refer to the same or like elements. It should be understood that the figures are schematic and that elements and components are not necessarily drawn to scale. In the drawings:
FIG. 1 illustrates a flow chart of a method of data processing according to an embodiment of the present disclosure;
FIG. 2 shows a block diagram of a unit of an apparatus for data processing according to an embodiment of the present disclosure;
fig. 3 illustrates a schematic diagram of an electronic device connection structure according to an embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure have been shown in the accompanying drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order and/or performed in parallel. Furthermore, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "including" and variations thereof as used herein are intended to be open-ended, i.e., including, but not limited to. The term "based on" is based at least in part on. The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments. Related definitions of other terms will be given in the description below.
It should be noted that the terms "first," "second," and the like in this disclosure are merely used to distinguish between different devices, modules, or units and are not used to define an order or interdependence of functions performed by the devices, modules, or units.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be understood as "one or more" unless the context clearly indicates otherwise.
The names of messages or information interacted between the various devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
Alternative embodiments of the present disclosure are described in detail below with reference to the drawings.
The first embodiment provided in the present disclosure is an embodiment of a method of data processing.
Embodiments of the present disclosure will be described in detail below with reference to fig. 1, where fig. 1 is a flowchart of a method for data processing provided by embodiments of the present disclosure.
Step S101, acquiring first interface description information and first annotation information conforming to the interface extension definition rule from the text of the interface description language.
The interface description language (english full name Interface description language, IDL for short) is a computer language used to describe the interfaces of software components. IDLs describe interfaces in a neutral manner so that objects running on different platforms and programs written in different languages can communicate with each other. For example, one component is written in C++, the other component is written in Java, and data communication is performed between the two components through IDL.
IDLs are commonly used to remotely invoke software. In this case, the object components on the different operating systems are typically invoked by the remote client terminal, and may be written in different computer languages. IDLs establish a bridge for communication between two different operating systems.
For example, thread IDL is an interface description language that is independent of the programming language, allowing a developer to describe and define interfaces in a near-programmatic manner; the thread IDL has simple structure and clear semantic meaning; the type defined by the thread IDL is relatively close to the data type in various existing programming languages, and the learning cost is low; the thread IDL file can be directly used for generating a code library, so that the development efficiency is improved; however, thread IDL is used to describe a remote procedure call (r.p. Remote Procedure Call, RPC) API, and cannot be used directly to describe an HTTP API.
The present disclosure combines the above advantages of IDLs to extend IDLs by writing information related to HTTP APIs into annotations of IDLs. The developer can read the text of the interface description language and directly acquire the specific meaning of IDL data type in the HTTP request.
The interface extension definition rule defines the relationship between the first annotation information and the first interface description information.
The interface extension definition rule includes an expression of extension information of the first annotation information:
fer.<key>=<'value'>;
wherein, the liquid crystal display device comprises a liquid crystal display device,
ferf, the initial characteristic mark of the extension information of the first annotation information conforming to the interface extension definition rule;
=, with or without spaces before and after it;
< key >, representing extension information;
the value < value > represents the value of the extension information.
And a plurality of expressions which are continuous in the same row of the first annotation information are separated by a preset segmentation symbol. For example, the preset division symbol is comma. The first annotation information includes: a plurality of lines of annotation information, a single line of annotation information and an intra-line of annotation information.
The relation between the first interface description information and the first annotation information at least comprises one of the following relations:
an expression of a plurality of lines of annotations or a single line of annotations is valid for a type definition of the first interface description information following the expression;
a plurality of lines of annotations or expressions of a single line of annotations with or without empty lines between the type definition of the first interface description information;
the intra-row annotated expression is valid for the type definition of the first interface description information of the same row.
For example, the number of the cells to be processed,
the expressions "fer.key1= 'value1'" and "fer.key2= 'value2'" of the extension information in the plurality of lines of annotations are valid for the structure type definition "Struct1" of the first interface description information, the expression "fer.key3= 'value3'" of the extension information in the single line of annotations is valid for the string type definition "key1" of the first interface description information, and the expression "fer.key4= 'value4'" of the extension information in the line is valid for the string type definition "key2" of the first interface description information.
The extension information includes request extension information.
The request extension information includes: prefix information of the URL of the HTTP request, service information of the URL of the HTTP request, function information of the URL of the HTTP request, method information of the HTTP request, request message header information of the HTTP, and response message header information of the HTTP.
The request extension information further includes: version information and serialization information of data of the HTTP request.
Please refer to table 1, the thread IDL request extension information description:
TABLE 1
The extension information includes data extension information.
The data extension information includes: location information of the data in the HTTP request, actual value of the data at the time of transmission, and type of the data at the front end.
Please refer to table 2, the thread IDL data extension information indicates:
TABLE 2
Location information of the data in the HTTP request, including: path, query, header, cookie, body, form, entire body and status code.
Please refer to table 3 for a description of the location information of the thread IDL:
TABLE 3 Table 3
For example, the number of the cells to be processed,
/*
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’
}
the above example is the text of an interface description language. This text defines an HTTP API. The URL of the request is 'https:// www.example.com/api/Info/user/: type', wherein the value of 'type' is 1 or 2, determined by req.type. The requested Method is 'POST'. The request message header is 'Content-Type: application/json'. Body of the request message contains one uid data, and the encoding mode is JSON. When the request is sent, the data is not subjected to serialization operation. The response message header of the request is 'Content-Type: application/json'. The Body of the response message of the request contains data of the "UserResponse" type, coded in JSON. It can be seen that the text of the interface description language describes a HTTP API in its entirety. The developer can obtain all required API information from the text of the interface description language, and the compiler can analyze the text of the interface description language and generate a corresponding code base.
Step S102, the relation between the first interface description information and the first annotation information is interpreted according to the interface extension definition rule, and application programming interface information is generated.
That is, the extension information is parsed by the parser and determines the implementation of the corresponding thread type in the generated code library.
The generation of application programming interface information, i.e., the generation of API information.
The present disclosure extends the thread IDL in a manner that writes HTTP-related information into the annotation. On one hand, the expansion information is read by a developer and tells the developer the specific meaning of the corresponding thread type in the HTTP request; on the other hand, the extension information is analyzed by the analyzer, and the implementation mode of the corresponding thread type in the generated code base is determined.
The method adopts a non-invasive expansion mode, namely, the original semantics of the thread IDL are utilized, so that the expanded thread IDL file can be normally analyzed by a thread analyzer. The extended thread IDL contains data information and HTTP information of the API, and may fully describe the HTTP API. The method is simple, the expansion content is less, and the learning cost is lower. The IDS provided by the disclosure focuses data content, and has a simple structure and clear semantics. The method solves the problems of non-uniform development forms of the client and the server and high learning and understanding costs. The file of the IDS provided by the present disclosure can be used to generate a code library, thereby improving the development efficiency.
Corresponding to the first embodiment provided by the present disclosure, the present disclosure also provides a second embodiment, namely an apparatus for data processing. Since the second embodiment is substantially similar to the first embodiment, the description is relatively simple, and the relevant portions will be referred to the corresponding descriptions of the first embodiment. The device embodiments described below are merely illustrative.
Fig. 2 illustrates an embodiment of an apparatus for data processing provided by the present disclosure. Fig. 2 is a block diagram of a unit of an apparatus for data processing according to an embodiment of the present disclosure.
Referring to fig. 2, the present disclosure provides an apparatus for data processing, including: acquisition unit 201, generation unit 202.
An obtaining unit 201, configured to obtain, from a text of an interface description language, first interface description information and first annotation information that conform to an interface extension definition rule;
and the generating unit 202 is configured to interpret the relationship between the first interface description information and the first annotation information according to the interface extension definition rule, and generate application programming interface information.
Optionally, the interface extension defines a rule, including an expression of extension information of the first annotation information:
fer.<key>=<'value'>;
wherein, the liquid crystal display device comprises a liquid crystal display device,
ferf, the initial characteristic mark of the extension information of the first annotation information conforming to the interface extension definition rule;
=, with or without spaces before and after it;
< key >, representing extension information;
the value < value > represents the value of the extension information.
Optionally, a plurality of consecutive expressions in the same row of the first annotation information are separated by a preset segmentation symbol.
Optionally, the first annotation information includes: a plurality of lines of annotation information, a single line of annotation information and an intra-line of annotation information;
the relation between the first interface description information and the first annotation information at least comprises one of the following relations:
an expression of a plurality of lines of annotations or a single line of annotations is valid for a type definition of the first interface description information following the expression;
a plurality of lines of annotations or expressions of a single line of annotations with or without empty lines between the type definition of the first interface description information;
the intra-row annotated expression is valid for the type definition of the first interface description information of the same row.
Optionally, the extension information includes request extension information;
the request extension information includes: prefix information of the URL of the HTTP request, service information of the URL of the HTTP request, function information of the URL of the HTTP request, method information of the HTTP request, request message header information of the HTTP, and response message header information of the HTTP.
Optionally, the request for extension information further includes: version information and serialization information of data of the HTTP request.
Optionally, the extension information includes data extension information;
the data extension information includes: location information of the data in the HTTP request, actual value of the data at the time of transmission, and type of the data at the front end.
Optionally, the location information of the data in the HTTP request includes: path information, query information, header information, body information, table information, non-encoded body information, and status codes.
The present disclosure extends the thread IDL in a manner that writes HTTP-related information into the annotation. On one hand, the expansion information is read by a developer and tells the developer the specific meaning of the corresponding thread type in the HTTP request; on the other hand, the extension information is analyzed by the analyzer, and the implementation mode of the corresponding thread type in the generated code base is determined.
The method adopts a non-invasive expansion mode, namely, the original semantics of the thread IDL are utilized, so that the expanded thread IDL file can be normally analyzed by a thread analyzer. The extended thread IDL contains data information and HTTP information of the API, and may fully describe the HTTP API. The method is simple, the expansion content is less, and the learning cost is lower. The IDS provided by the disclosure focuses data content, and has a simple structure and clear semantics. The method solves the problems of non-uniform development forms of the client and the server and high learning and understanding costs. The file of the IDS provided by the present disclosure can be used to generate a code library, thereby improving the development efficiency.
An embodiment of the present disclosure provides a third embodiment, that is, an electronic device, which is used for a method for data processing, where the electronic device includes: at least one processor; and a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory stores instructions executable by the one processor to enable the at least one processor to perform the method of data processing as described in the first embodiment.
The present disclosure provides a fourth embodiment, namely a computer storage medium for data processing, where the computer storage medium stores computer executable instructions that can perform the method for data processing in any of the above-described method embodiments.
Referring now to fig. 3, a schematic diagram of an electronic device suitable for use in implementing embodiments of the present disclosure is shown. The terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 3 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 3, the electronic device may include a processing means (e.g., a central processor, a graphics processor, etc.) 301 that may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 302 or a program loaded from a storage means 308 into a Random Access Memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the electronic device are also stored. The processing device 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input/output (I/O) interface 305 is also connected to bus 304.
In general, the following devices may be connected to the I/O interface 305: input devices 306 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 307 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 308 including, for example, magnetic tape, hard disk, etc.; and communication means 309. The communication means 309 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. While fig. 3 shows an electronic device having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a non-transitory computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via a communication device 309, or installed from a storage device 308, or installed from a ROM 302. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing means 301.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In some implementations, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol ), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (e.g., the internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring at least two internet protocol addresses; sending a node evaluation request comprising the at least two internet protocol addresses to node evaluation equipment, wherein the node evaluation equipment selects an internet protocol address from the at least two internet protocol addresses and returns the internet protocol address; receiving an Internet protocol address returned by the node evaluation equipment; wherein the acquired internet protocol address indicates an edge node in the content distribution network.
Alternatively, the computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: receiving a node evaluation request comprising at least two internet protocol addresses; selecting an internet protocol address from the at least two internet protocol addresses; returning the selected internet protocol address; wherein the received internet protocol address indicates an edge node in the content distribution network.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including, but not limited to, an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. The name of the unit does not in any way constitute a limitation of the unit itself, for example the first acquisition unit may also be described as "unit acquiring at least two internet protocol addresses".
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by persons skilled in the art that the scope of the disclosure referred to in this disclosure is not limited to the specific combinations of features described above, but also covers other embodiments which may be formed by any combination of features described above or equivalents thereof without departing from the spirit of the disclosure. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).
Moreover, although operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are example forms of implementing the claims.

Claims (9)

1. A method of data processing, comprising:
acquiring first interface description information and first annotation information which accord with interface extension definition rules from a text of an interface description language, wherein the interface extension definition rules comprise an expression of extension information of the first annotation information, the expression comprises the extension information and a value of the extension information, and the extension information comprises request extension information and/or data extension information; the request extension information includes: prefix information of the URL of the HTTP request, service information of the URL of the HTTP request, function information of the URL of the HTTP request, method information of the HTTP request, request message header information of the HTTP and response message header information of the HTTP; the data extension information includes: position information of data in the HTTP request, actual value of the data in transmission and type of the data at the front end;
and interpreting the relation between the first interface description information and the first annotation information according to the interface extension definition rule to generate application programming interface information.
2. The method of claim 1, wherein the expression is:
fer.<key>=<'value'>;
wherein, the liquid crystal display device comprises a liquid crystal display device,
ferf, the initial characteristic mark of the extension information of the first annotation information conforming to the interface extension definition rule;
=, with or without spaces before and after it;
< key >, representing extension information;
the value < value > represents the value of the extension information.
3. The method of claim 2, wherein a plurality of the expressions in succession within the same row of the first annotation information are separated by a predetermined segmentation symbol.
4. The method of claim 2, wherein the first annotation information comprises: a plurality of lines of annotation information, a single line of annotation information and an intra-line of annotation information;
the relation between the first interface description information and the first annotation information at least comprises one of the following relations:
an expression of a plurality of lines of annotations or a single line of annotations is valid for a type definition of the first interface description information following the expression;
a plurality of lines of annotations or expressions of a single line of annotations with or without empty lines between the type definition of the first interface description information;
the intra-row annotated expression is valid for the type definition of the first interface description information of the same row.
5. The method of claim 1, wherein requesting extension information further comprises: version information and serialization information of data of the HTTP request.
6. The method of claim 1, wherein the location information of the data in the HTTP request comprises: path information, query information, header information, body information, table information, non-encoded body information, and status codes.
7. An apparatus for data processing, comprising:
an obtaining unit, configured to obtain, from a text of an interface description language, first interface description information and first annotation information that conform to an interface extension definition rule, where the interface extension definition rule includes an expression of extension information of the first annotation information, where the expression includes extension information and a value of the extension information, and where the extension information includes request extension information and/or data extension information; the request extension information includes: prefix information of the URL of the HTTP request, service information of the URL of the HTTP request, function information of the URL of the HTTP request, method information of the HTTP request, request message header information of the HTTP and response message header information of the HTTP; the data extension information includes: position information of data in the HTTP request, actual value of the data in transmission and type of the data at the front end;
and the generating unit is used for interpreting the relation between the first interface description information and the first annotation information according to the interface extension definition rule and generating application programming interface information.
8. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any one of claims 1 to 6.
9. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs which when executed by the one or more processors cause the one or more processors to implement the method of any of claims 1 to 6.
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 CN110377273A (en) 2019-10-25
CN110377273B true 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)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111414161B (en) * 2020-03-27 2023-05-12 北京字节跳动网络技术有限公司 Method, device, medium and electronic equipment for generating IDL file
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

Citations (6)

* 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
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
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

Family Cites Families (4)

* 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
US7243301B2 (en) * 2002-04-10 2007-07-10 Microsoft Corporation Common annotation framework
US7966625B2 (en) * 2006-10-26 2011-06-21 International Business Machines Corporation Extending web service description language for SIP/call flow interactions
US8756568B2 (en) * 2012-07-31 2014-06-17 Pivotal Software, Inc. Documentation generation for web APIs based on byte code analysis

Patent Citations (6)

* 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
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
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的信息技术试题标记语言的设计与实现;段会川等;《计算机工程与应用》;20040401(第04期);全文 *

Also Published As

Publication number Publication date
CN110377273A (en) 2019-10-25

Similar Documents

Publication Publication Date Title
CN110457144B (en) Method, device, medium and equipment for realizing front-end application
CN110377273B (en) Data processing method, device, medium and electronic equipment
CN110489323B (en) Visual RPC API debugging method, device, medium and equipment
CN112187558B (en) Data verification method and device and electronic equipment
CN111581555B (en) Document loading method, device, equipment and storage medium
CN114528044B (en) Interface calling method, device, equipment and medium
CN112684968A (en) Page display method and device, electronic equipment and computer readable medium
CN109062560B (en) Method and apparatus for generating information
CN110858202A (en) Method and device for generating where clause in database query statement
WO2020199659A1 (en) Method and apparatus for determining push priority information
CN111355784B (en) Method, device, medium and electronic equipment for processing request information
CN113761871A (en) Rich text rendering method and device, electronic equipment and storage medium
CN111752644A (en) Interface simulation method, device, equipment and storage medium
CN110489326B (en) IDS-based HTTPAPI debugging method device, medium and equipment
CN116561013A (en) Testing method and device based on target service framework, electronic equipment and medium
CN113807056B (en) Document name sequence error correction method, device and equipment
CN111414161B (en) Method, device, medium and electronic equipment for generating IDL file
CN113391860B (en) Service request processing method and device, electronic equipment and computer storage medium
CN112379967B (en) Simulator detection method, device, equipment and medium
CN111460020B (en) Method, device, electronic equipment and medium for resolving message
CN113778566A (en) Native application calling method and device, electronic equipment and computer readable medium
CN109669720B (en) Chain type asynchronous request processing method and device based on Promise and electronic equipment
CN112688863B (en) Gateway data processing method and device and electronic equipment
CN111399902B (en) Client source file processing method and device, readable medium and electronic equipment
CN113448550B (en) Method and device for realizing collection management of classes, electronic equipment and computer 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