Detailed Description
In order to make those skilled in the art better understand the technical solutions in the present specification, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any inventive step based on the embodiments of the present disclosure, shall fall within the scope of protection of the present disclosure.
As described above, in the prior art, because there is no suitable interface extension scheme, even after the service end receives the parsing logic, in an application scenario where the service is complex and the structure of the service data is changeable, the data interface still has a lot of difficulties in design and use, for example, when the service end makes a data interface, the data interface is often changed, which is very inconvenient for extension and version management of the data interface, and also easily affects compatibility of the data interface with new and old service data.
The data interface extension method provided in the embodiment of the present specification provides a solution for an application scenario in which a service is complex and variable, and a data structure of service data is also complex and variable by using a design mode that conforms to an object-oriented design specification, so that the data interface is designed and used while conforming to the object-oriented design specification, and the data interface is internally expandable, externally downward compatible, and stable.
Specifically, the data Interface extension method provided in this embodiment of the present specification establishes a model by using a data structure of data and an Interface implementation method corresponding to the data structure, encapsulates the Interface implementation method in the model, and provides the model externally in a uniform Interface form, where a schematic diagram of an overall implementation concept is shown in fig. 1, where a class of the model is named SampleInfo, an external object to which the model belongs is MainVO, an external Interface (Interface) corresponding to the model is named isamplementvn, data V1 to VN in a service end correspond to data structures V1 to VN, parsing logic corresponding to data structures V1 to VN is gathered in the SampleInfo, that is, interface implementation methods SampleContentV1 to SampleContentVN are named in the SampleInfo, where attribute parameters SampleContentV1 to SampleContentVN corresponding to the Interface implementation methods SampleContentV1 to SampleContentVN are defined in the Interface implementation methods, and if a service parameter vxvx corresponding to the data structure of the sample contentvx is returned, the service data structure is vxvx parameter vxi returned to the Interface implementation methods vxi. And = null ", so that the analysis work of the data VX conforming to the data structure VX can be implemented on the corresponding interface implementation method sampleContentVX by traversing the attribute parameters sampleContentV1, sampleContentV2, \\8230 \\ 8230of the interface implementation method until the interface implementation method sampleContentVX is traversed, thereby determining the interface implementation method sampleContentVX. Furthermore, an interface matching method queryVersion can be defined in the ISampleContent, so that when the corresponding interface implementation method is determined to exist, the corresponding interface implementation method is directly obtained through queryVersion, the expansion and management of a server side in a data interface are facilitated, and when a caller traverses the existing interface implementation method, the analysis work is rapidly implemented on the interface implementation method corresponding to the data structure.
In a specific implementation, the traversal method exists may adopt implementation logic represented by a code segment shown in fig. 2, and at this time, since the attribute parameter of the data returned by the server is not null, sample contentv1, sample contentv2, and up to sample contentvn are traversed by the exist, when the first attribute parameter sample contentvx which is not null is traversed, the data VX which is returned by the server and conforms to the data structure VX has a corresponding interface implementation method sample contentvx in sample info. For simplicity of illustration, "\8230;" omitting the description of the traversal conditions of priveinfocontentv 3 to priveinfocontentvn-1.
Therefore, when a new data structure is added at the server side, the interface implementation method corresponding to the data structure is packaged into the model to form the independently corresponding sub-data interfaces, namely, a downward compatible expansion mode is adopted, so that each data structure has the independently corresponding sub-data interface for analysis, the analysis logic is closed, and the isolation between the new and old sub-data interfaces is ensured; in addition, through traversing each subdata interface in the data interface first, and only when the subdata interface can perceive the data sent by the server, the serialization operation of the data is carried out, so even if the server issues the data interface of the new version, even if the data interface of the calling party is not updated to the new version, because a plurality of subdata interfaces are reserved, as long as the data sent by the server still conforms to the interface of the old version, the calling party can normally carry out the deserialization operation through the corresponding subdata interface to obtain the data, and for the data information of the new data structure which is not required to be perceived by the calling party, the new data is directly ignored during the first pass, so the new version is issued by the server, and the calling party can not cause the serialization abnormity when not upgrading, and the situation of calling abnormity can not occur in the function of calling the data interface. Therefore, by using the data interface extension method provided in the embodiment of the present specification, in the extended data interface, because each interface implementation method is independent, the interface extension is free of history packets, and it is ensured that the interface has good extensibility, and it is possible to easily extend internally and keep downward compatibility and stability externally. The downward compatibility means that the system of the calling party can still normally run without error when the system of the calling party uses the class library of the old version to call the new version program of the service release system.
It should be noted that the model refers to abstraction of data features in software design, for example, the transaction model describes features of a transaction, such as an order number, a user identifier, a purchase amount, marketing information, and the like, so the model referred to in this specification refers to abstraction of a data structure and an interface implementation method corresponding to the data structure.
It should be noted that the server is a side for providing service data to a calling terminal device that calls the service data, and here, by performing extension and management of a data interface at the server, an analysis logic of data received by the server is implemented.
The technical solutions provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.
Example 1
In the data interface extension method provided in the embodiment of the present specification, from the perspective of a device, an execution subject is a server, where the server may be a device that can be used to extend a data interface, such as a server, a computer, a mobile intelligent device, and the like, and this application is not particularly limited thereto.
As shown in fig. 3, the data interface extension method provided in the embodiment of the present application includes the following steps:
step S102, judging whether a new data structure exists, if so, executing step S104.
In an application scenario with complex service and variable data structure, new service data may appear in service upgrade of a server, and a data structure corresponding to the new service data is also newly added, so that the server is required to update an interface in time according to the newly added data structure to meet the requirement of issuing new data.
In specific implementation, according to the needs of the business application, the business data may be represented by data structures such as an array, a list data structure, a dictionary data structure, and an aggregate data structure, for example, for the application of the ticket data, in a simple transaction scenario, one ticket is used for each transaction, and at this time, the ticket data only needs one id for correspondence, and may be described by an array of a character string type, or for example, in a complex transaction scenario, multiple tickets are used for multiple types, and the ticket information has both the ticket id and the ticket type, and at this time, the list data structure (e.g., list data structure), the dictionary data structure (e.g., map data structure), and the aggregate data structure (e.g., set data structure) may be selected for description.
And step S104, acquiring an interface implementation method corresponding to the data structure.
When a data structure is newly added at the server side, the data of the data structure is analyzed by setting an independent corresponding interface implementation method, so that when the server side monitors the newly added data structure, the newly added data structure can be timely associated with the corresponding interface implementation method, the closing analysis logic of the server side is realized, and the internal structure of the data can not be exposed to an interface caller.
And step S106, extracting a first attribute parameter of the interface implementation method.
The first attribute parameter is used for representing a data structure corresponding to data which can be analyzed by the interface implementation method.
Step S108, the first attribute parameters are aggregated into the traversal method of the data interface, so as to expand the subdata interface corresponding to the data structure in the data interface.
The traversal method is used for determining a sub data interface corresponding to a second attribute parameter according to the second attribute parameter, the second attribute parameter is used for representing a data structure corresponding to data returned by a server, and the sub data interface is used for analyzing the data returned by the server through an interface implementation method corresponding to the sub data interface.
In some embodiments, when the first attribute parameter is aggregated into a traversal method of the data interface, the first attribute parameter may be aggregated into a traversal condition of the traversal method, so that the first attribute parameter is used as the traversal condition in the exist method, and whether a corresponding interface implementation method exists is quickly determined through the traversal condition.
Further, when determining the sub data interface corresponding to the second attribute parameter according to the second attribute parameter, determining whether a first attribute parameter matching the second attribute parameter exists in the traversal condition through traversal according to the second attribute parameter, and if so, determining the sub data interface corresponding to the matched first attribute parameter as the sub data interface corresponding to the second attribute parameter according to the matched first attribute parameter.
In some embodiments, the packaging and publishing management is performed by expanding the data interface according to the data interface expansion method. Specifically, the data interface extension method further includes: and packaging the data interface comprising the subdata interface, and then issuing the packaged data interface so as to facilitate a caller to upgrade the data interface according to the self requirement. In specific implementation, the jar package can be packaged to form a jar package and issued as a two-party package.
In some embodiments, the server further sends the publishing information of the two-party package to the caller, for example, when there is new publishing information, the publishing information is pushed to the caller, so that the caller determines whether to upgrade according to the need of the caller.
In some embodiments, the caller may further obtain the publishing information of the two-party package from the server every preset time period, so as to upgrade according to the need of the caller.
Therefore, after the steps S102 to S108 are adopted, on one hand, the parsing logic closing-in is realized, and the calling party is allowed to access the data through a uniform interface, so that the internal structure of the data is not exposed to the calling party, and the peripheral use complexity is simplified; on one hand, the downward compatible expansion is realized, so that after a new data structure appears, the server side can firstly encapsulate an interface implementation method corresponding to the newly added data structure into a data interface, and isolate the new and old data structures, so that the expansion is free of historical bundle, the internal expansion is ensured, the external stability and compatibility can be kept, the server side can issue the data first, the calling side can not perform the upgrade, the old service can also operate normally, and when the calling side needs to sense the scene of the new data structure, the corresponding upgrade can be performed. Service compatibility risks caused by frequent changes are effectively avoided, and the difficulty in realizing model changes is reduced.
The following describes a process of extending the data interface by the data interface extension method and an instantiation process of an object (or method) in combination with an application scenario.
Suppose that in a business, a ticket, ticket information can be described by a String type ticket id for each transaction in the first scheme. However, as business development needs, in the second phase scheme, each transaction has multiple types of multiple tickets, and the ticket information has both the ticket id and the ticket type and is suitable for being described by a list data structure (such as list) and a dictionary data structure (such as map).
At this time, an overall schematic diagram of the extended data interface in the first term scheme is shown in fig. 4, in the first term scheme, an object MainVO is instantiated as an OrderVO object, a model smallnfo is instantiated as a model priveinfo, and an exist is instantiated as a hasPrize, because the structure of the first term ticket information only needs one String, only one String attribute is needed in the interface implementation method priveintocontanv 1, the corresponding queryVersion return value type may be set to the String type, for example, the return String "1" indicates that the interface implementation method priveintocontanv 1 is used, and further, the data return method queryPrizeIds may be used to obtain the ticket id corresponding to the ticket.
In a specific implementation, the implementation logic of the hasPrize method in PrzeInfo may adopt the implementation logic represented by the code segment shown in FIG. 5, and is not described herein again.
Therefore, when the caller inquires about the ticket information, if OrderVO is currently available, the service end will necessarily return PrzeInfoContentV 1!because the ticket using logic of the service end is the first logic! If the hash method returns true, so that the ticket id can be continuously queried, the method of PrzeInfo. QueryPrzeIds is called (PrzeInfo implements PrzeInfoContent interface and hosts the implementation of QueryPrzeIds to PrzeInfoContentV 1) to obtain, and the method of QueryPrzeIds of PrzeInContentV 1 is called actually, so that the ticket id can be obtained.
In the second phase, since the structure of the ticket information needs a new data structure (such as a Map data structure) to carry in a new transaction, the overall schematic diagram of the extended data interface is shown in fig. 6, and different from the first phase, because the Map data structure is newly added, the corresponding interface implementation method prizelnfocontentv 2 is encapsulated into the data interface, where prizelnfocontentv 2 is a Map member attribute, the corresponding queryVersion may return "2", and queryPrizeIds returns the ticket ids of all elements in the Map, and the basic process may refer to the description of the first phase.
In a specific implementation, in the second phase, the implementation logic of the hasPrize method in PrzeInfo may use the implementation logic represented by the code segment shown in FIG. 7, and is not described herein again.
Thus, the new coupon information model is successfully expanded, and the expansion can be downward compatible, which is explained as follows:
it is assumed that, after the server issues the new version of the data interface package, the caller also follows the upgrade to the package.
Thus, when the caller inquires the ticket information, if the current OrderVO has the ticket, if the ticket using logic of the service end is the first logic, the service end will necessarily return the priveInfoContentV 1! = null, then hasPrize method will return true, and the corresponding query will be hosted to PrzeInfoContentV 1 by queryVersion, consistent with the first phase query.
If there is a ticket in OrderVO currently, if the ticket using logic of the service end is the second logic, the service end will necessarily return PrzeInfoContentV 1= = null and PrzeInfoContentV 2! = null, then hasPrize method will return true, and then host the corresponding query to PrzeInfoContentV 2 via queryVersion, and will also query all ticket ids in the map.
If there is no ticket in OrderVO currently, no matter whether the ticket logic of the server is the first-stage logic or the second-stage logic, wherein the server will return PrzeInfoContentV 1= = null during the first-stage logic, and the server will return PrzeInfoContentV 1= = null and PrzeInfoContentV 2= = null during the second-stage logic, so the hasPrize method will return false, and then it is not necessary to call queryVersion again, and certainly it is not necessary to implement the corresponding parsing work on PrzeInfoContentV 1 or PrzeInfoContentV 2.
The above is described for the case that the caller has updated correspondingly with the new version issued by the server. To facilitate understanding of the data interface extension method provided in this specification, a second phase scheme in which a server issues an online second phase is used as a reference to describe a case where a caller is updated or not updated to a new version, where in the second phase scheme, there are actually two member attributes priveinfocontentv 1 and priveinfocontentv 2 in privatelnfo, and thus, under different coupon logics, the cases of the server returning data and deserializing of old and new callers are as follows:
1. the ticket using logic of the server is the first stage logic
At this time, the attribute parameters returned by the server are:
prizeInfo.prizeInfoContentV1!=null
prizeInfo.prizeInfoContentV2==null
after the calling party deserializes the serialized data returned by the server, the result is obtained:
at this time, regardless of whether the calling party is the data interface of the old version or the data interface of the new version, the PrzeInfo has PrzeInfoContentV 1, that is, the PrzeInfoContentV 1 has a sub data interface corresponding to the data structure of the first-period scheme, and according to the first-period logic, the service end returns the PrzeInfoContentV 1! In this way, true is obtained by the hasPrize method, and the caller can call the method with the same name as the priveinfoContentV 1, that is, the data is analyzed by the interface implementation method PrizeinfoContentV1 corresponding to the priveinfoContentV 1, wherein the data return method queryPrizziids belongs to the method for returning the ticket id in the interface implementation method PrizeinfoContentV 1.
2. The ticket using logic of the server is second-phase logic
At this time, the server returns data:
prizeInfo.prizeInfoContentV1==null
prizeInfo.prizeInfoContentV2!=null
after the calling party carries out deserialization on the serialized data returned by the server side, the obtained result is as follows:
at this time, when the caller is an old version, the PrizeInfo only has prizelnfocontentv 1, and according to the second phase logic, the server returns prizelnfocontentv 1= = null, so that false is obtained by the hasgrind method, and then the data of the new version is directly ignored, that is, the caller does not sense the data of the new version at this time.
Accordingly, when the caller is a new version, przeInfo has PrzeInfoContentV 1 and PrzeInfoContentV 2, and according to the second logic, the service returns PrzeInfoContentV 1= = null and PrzeInfoContentV 2! In this way, the caller can call the method with the same name as the priveinfocontentv 2, that is, the data is analyzed by the interface implementation method priveinfocontentv 2 corresponding to the priveinfocontentv 2.
Therefore, if the caller is an old version and needs to perceive new data, it can be done by upgrading, for example, the data interface for the first stage logic to the data interface for the second stage logic, so that the coupon information of the second stage logic can be processed.
3. The ticket information of the server is null
At this time, the server returns data:
prizeInfo.prizeInfoContentV1==null
prizeInfo.prizeInfoContentV2==null
after the calling party carries out deserialization on the serialized data returned by the server side, the obtained result is as follows:
by the way of illustration of the above situation, it can be seen that, even if the caller does not update after the server issues the new version, serialization exception is not caused, and only the new version of the ticket information data cannot be perceived, but for the caller who does not perceive the new version of the ticket information data, the caller does not need to update, and the problem of serialization cannot occur in function.
It should be noted that, when data is transmitted between the server and the caller, the data is usually serialized and transmitted, and then the receiver performs deserialization, for example, the serialization and deserialization adopt JSON format.
Based on the same inventive concept, the embodiment of the present specification further provides a data interface expansion apparatus corresponding to the foregoing data interface expansion method, an electronic device for expanding a data interface, and a non-volatile computer storage medium.
In view of the foregoing detailed description of the data interface extension method in the foregoing embodiment, corresponding contents related to the apparatus, the device, and the nonvolatile computer storage medium in this embodiment will not be described again.
Example 2
As shown in fig. 8, wherein the dashed square represents an optional module, the datainterface extension apparatus 10 includes an obtainingmodule 11, an extractingmodule 12, an aggregatingmodule 13, and atraversing module 14.
In this implementation, the obtainingmodule 11 is configured to obtain, when a newly added data structure exists, an interface implementation method corresponding to the data structure; the extractingmodule 12 is configured to extract a first attribute parameter of the interface implementation method, where the first attribute parameter is used to characterize a data structure corresponding to data resolvable by the interface implementation method; theaggregation module 13 is configured to aggregate the first attribute parameter into the traversal module, so as to expand a sub data interface corresponding to the data structure in the data interface; thetraversal module 14 is configured to determine, according to a second attribute parameter, a sub data interface corresponding to the second attribute parameter; the second attribute parameter is used for representing a data structure corresponding to data returned by a server, and the subdata interface is used for analyzing the data returned by the server through an interface implementation method corresponding to the subdata interface.
Optionally, the aggregatingmodule 13 is configured to aggregate the first attribute parameter into a traversal condition in thetraversal module 14.
Optionally, the data interface extension apparatus further includes aninterface matching module 15. Thetraversal module 14 is configured to determine, according to the second attribute parameter, whether a first attribute parameter matching the second attribute parameter exists in the traversal condition, and if yes, invoke theinterface matching module 15; theinterface matching module 15 is configured to determine, according to the matched first attribute parameter, a sub data interface corresponding to the matched first attribute parameter as a sub data interface corresponding to the second attribute parameter.
Optionally, the data interface expansion apparatus further includes apackaging module 16 and apublishing module 17. Thepacking module 16 is configured to pack a data interface including the sub data interface; theissuing module 17 is configured to issue the packed data interface.
Optionally, the data structure comprises at least one of a list data structure, a dictionary data structure, and a collection data structure.
Based on the same inventive concept, the electronic device for extending a data interface provided in the embodiments of the present specification includes:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
when a new data structure exists, acquiring an interface implementation method corresponding to the data structure;
extracting a first attribute parameter of the interface implementation method, wherein the first attribute parameter is used for representing a data structure corresponding to data which can be analyzed by the interface implementation method;
aggregating the first attribute parameters into a traversal method of the data interface so as to expand a subdata interface corresponding to the data structure in the data interface;
the traversal method is used for determining a sub data interface corresponding to a second attribute parameter according to the second attribute parameter, the second attribute parameter is used for representing a data structure corresponding to data returned by a server, and the sub data interface is used for analyzing the data returned by the server through an interface implementation method corresponding to the sub data interface.
Based on the same idea, embodiments of the present specification provide a non-volatile computer storage medium corresponding to the data interface extension method, and store computer-executable instructions, where the computer-executable instructions are configured to:
when a newly added data structure exists, acquiring an interface implementation method corresponding to the data structure;
extracting a first attribute parameter of the interface implementation method, wherein the first attribute parameter is used for representing a data structure corresponding to data resolvable by the interface implementation method;
aggregating the first attribute parameters into a traversal method of the data interface so as to expand a subdata interface corresponding to the data structure in the data interface;
the traversal method is used for determining a sub data interface corresponding to a second attribute parameter according to the second attribute parameter, the second attribute parameter is used for representing a data structure corresponding to data returned by a server, and the sub data interface is used for analyzing the data returned by the server through an interface implementation method corresponding to the sub data interface.
Example 3
Based on the same inventive concept, embodiments of the present specification provide a data processing method, where the data interface extended in embodiment 1 is used as a terminal device on a calling party side, so that the calling party can analyze data returned by a server through the data interface by using the terminal device. In view of the detailed description of the data interface extension method in embodiment 1, details are not described here.
The terminal device used by the caller may be a server, a computer, a mobile intelligent device, or the like.
Specifically, as shown in fig. 9, the data processing method includes:
step S202, receiving data returned by a server and second attribute parameters corresponding to the data returned by the server, wherein the second attribute parameters are used for representing a data structure corresponding to the data returned by the server.
Each piece of data in the server is stored according to the corresponding data structure, and the corresponding second attribute parameter is recorded for each data structure, so that when the server returns the data to the calling party, the second attribute parameter is not null.
Step S204, determining a sub data interface corresponding to the second attribute parameter from data interfaces, where the data interfaces are data interfaces extended by the data interface extension method in any one of the foregoing embodiments 1.
It should be noted that, in the terminal device used by the caller, the data interface in step S204 may be a new version data interface that is upgraded with a new version released by the server, or an old version data interface that is not upgraded with a new version released by the server. In addition, after the server side releases the data interface of the new version, whether the calling party needs to be upgraded or not can be judged according to whether the calling party needs to sense whether the server side sends the data of the new data structure or not, and if sensing is not needed, upgrading can be omitted.
And step S206, analyzing the data returned by the server by using the subdata interface.
Example 4
Based on the same inventive concept, in the embodiment of the present specification, a data processing apparatus is provided, as shown in fig. 10, thedata query apparatus 20 includes a receivingmodule 21, a determiningmodule 22, and aparsing module 23. The receivingmodule 21 is configured to receive data returned by a server and a second attribute parameter corresponding to the data returned by the server, where the second attribute parameter is used to represent a data structure corresponding to the data returned by the server; the determiningmodule 22 is configured to determine a sub data interface corresponding to the second attribute parameter from data interfaces, where the data interfaces are data interfaces extended by the data interface extending apparatus in any embodiment 2; theparsing module 23 parses the data returned by the server by using the sub data interface.
Based on the same inventive concept, an embodiment of this specification provides an electronic device for data processing, including:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
receiving data returned by a server and second attribute parameters corresponding to the data returned by the server, wherein the second attribute parameters are used for representing a data structure corresponding to the data returned by the server;
determining a sub data interface corresponding to the second attribute parameter from a data interface, where the data interface is an extended data interface extended by the data interface extension method in any embodiment 1;
and analyzing the data returned by the server by using the subdata interface.
Based on the same idea, embodiments of the present specification provide a non-volatile computer storage medium corresponding to the data processing method, and store computer-executable instructions configured to:
receiving data returned by a server and second attribute parameters corresponding to the data returned by the server, wherein the second attribute parameters are used for representing a data structure corresponding to the data returned by the server;
determining a sub data interface corresponding to the second attribute parameter from a data interface, where the data interface is an extended data interface extended by the data interface extension method in any embodiment 1;
and analyzing the data returned by the server by using the subdata interface.
The foregoing description of specific embodiments has been presented for purposes of illustration and description. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
All the embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the embodiments of the apparatus, the device, and the nonvolatile computer storage medium, since they are substantially similar to the embodiments of the method, the description is simple, and for the relevant points, reference may be made to the partial description of the embodiments of the method.
In the various embodiments of the present disclosure, it should be understood by those skilled in the art that the terms "first" and "second" are not used in a limiting sense, but are used for convenience of distinction and to prevent confusion of concepts.
The apparatus, the device, the nonvolatile computer storage medium, and the method provided in the embodiments of the present specification correspond to each other, and therefore, the apparatus, the device, and the nonvolatile computer storage medium also have advantageous technical effects similar to those of the corresponding method.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD) (e.g., a Field Programmable Gate Array (FPGA)) is an integrated circuit whose Logic functions are determined by a user programming the Device. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as ABEL (Advanced Boolean Expression Language), AHDL (alternate Hardware Description Language), traffic, CUPL (core universal Programming Language), HDCal, jhddl (Java Hardware Description Language), lava, lola, HDL, PALASM, rhyd (Hardware Description Language), and vhigh-Language (Hardware Description Language), which is currently used in most popular applications. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, atmel AT91SAM, microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be regarded as a hardware component and the means for performing the various functions included therein may also be regarded as structures within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, apparatuses, modules or units described in the above embodiments may be specifically implemented by a computer chip or an entity, or implemented by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, respectively. Of course, the functionality of the various elements may be implemented in the same one or more pieces of software and/or hardware in the practice of the present application.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both permanent and non-permanent, removable and non-removable media, may implement the information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of other like elements in a process, method, article, or apparatus comprising the element.
The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
All the embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, as for the system embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and reference may be made to the partial description of the method embodiment for relevant points.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.