A design methodology for a layered and crowdsourced programming language
Patent Information
- Application Number
- CN202211683601.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-27
- Publication Date
- 2026-09-01
- Estimated Expiration
- 2042-12-27
AI Technical Summary
现有的主流程序设计语言由于设计目标不同,且演化比较慢,无法直接支持现有的对多媒体数据进行处理的需求,只能用第三方库的方式对基本数据类型进行封装,实现对这些数据类型的间接支持,这给程序设计带来了额外的成本,也降低了程序的适用性
[0018]本发明所提供的编程语言内置图像、文本、音频、视频等数据类型,方便人工智能应用开发。该编程语言统一了远程服务的调用过程,通过两层语言将实现细节隐藏在传统编程语言层,在高层语言提供一致的调用方式,通过虚拟命名空间统一相同功能的接口。在程序设计的便利性上,较于传统程序设计语言,降低了软件开发的难度。该编程语言在语言演化效率上也优于传统程序设计语言。
Smart Images

Figure CN115904342B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of artificial intelligence applications and cloud computing technology, and in particular relates to a design method for a layered and crowdsourced programming language. Background Technology
[0002] Traditional programming languages prioritize runtime efficiency, neglecting the ease of invoking AI services in the context of artificial intelligence (AI). In AI, tasks essentially involve converting data types from one to another; the source and target data types may differ or be the same. Image, text, audio, and video types encompass most AI applications; tasks like text-to-image conversion and speech recognition involve type conversion between these four types through model calls. Existing mainstream programming languages, due to differing design goals and slow evolution, cannot directly support current multimedia data processing needs. They can only indirectly support these data types by encapsulating them in third-party libraries, adding extra cost and reducing program usability. Furthermore, the lack of native support for remote service calls in these languages further hinders the development of a unified approach to remote procedure calls. Summary of the Invention
[0003] The purpose of this invention is to provide a design method for a layered and crowdsourced programming language to solve the problems existing in the prior art.
[0004] To achieve the above objectives, this invention provides a layered and crowdsourced programming language design method, including an abstract language layer, a traditional programming language layer, and a virtual namespace; the abstract language layer supports streaming data operations, multimedia data types, and composite data structures; the streaming data operations include, but are not limited to, merging, filtering, and splitting; the multimedia data types include, but are not limited to, images, audio, video, text, and tables; and the composite data structures include, but are not limited to, combinations and nested arrays.
[0005] The traditional programming language layer includes a combination of several programming languages to support the streaming data operations, the multimedia data types, and the combined data structures.
[0006] The virtual namespace is a tree structure including non-leaf nodes and leaf nodes. The non-leaf nodes represent subdivided functional modules, and the leaf nodes represent specific services or functions.
[0007] Optionally, the abstract language layer supports streaming calls and parallel calls.
[0008] Optionally, the layered and crowdsourced programming language provides a unified data representation for the multimedia data type, while also providing built-in methods for manipulating the data, and treating the multimedia data type as a separate data type.
[0009] Optionally, in the virtual namespace, the functions under the same leaf node are implemented by the same calling interface, and the same leaf node includes multiple different calling interfaces.
[0010] Optionally, programmers in the abstract language layer may reference any module or function in the virtual namespace using a using declaration.
[0011] Optionally, the functions under the leaf nodes are defined by the node location, function name, and provider; the function name is the name by which the function is invoked; the provider includes, but is not limited to, company name and personal username.
[0012] Optionally, the developers of the traditional programming language layer implement the services or functions in the virtual namespace and upload or deploy the implemented modules.
[0013] Optionally, the developers of the traditional programming language layer can extend the virtual namespace by defining new names based on existing names and providing corresponding implementations.
[0014] Optionally, the virtual namespace adopts centralized management or blockchain-based distributed ledger, and the programmers of the abstract language layer reference the relevant implementations and build applications in the virtual namespace;
[0015] For multiple implementations of the same service or function in the virtual namespace, they are ranked by user ratings and evaluations, and the ranking results are provided for reference by other programmers.
[0016] Optionally, the layered and crowdsourced programming language supports cloud-based model and service calls, and programs constructed using the layered and crowdsourced programming language support both local and remote execution.
[0017] The technical effects of this invention are as follows:
[0018] The programming language provided by this invention has built-in data types such as images, text, audio, and video, facilitating the development of artificial intelligence applications. This programming language unifies the process of calling remote services, hiding implementation details in the traditional programming language layer through a two-layer language, while providing a consistent calling method in the higher-level language, and unifying interfaces for the same functions through virtual namespaces. In terms of ease of program design, it reduces the difficulty of software development compared to traditional programming languages. This programming language also outperforms traditional programming languages in terms of language evolution efficiency. Attached Figure Description
[0019] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:
[0020] Figure 1 This is a schematic diagram of the program design structure in an embodiment of the present invention;
[0021] Figure 2 This is a schematic diagram illustrating the rapid evolution of virtual namespaces and languages in an embodiment of the present invention;
[0022] Figure 3 This is a schematic diagram of multimedia types and semantic nested collection types in an embodiment of the present invention. Detailed Implementation
[0023] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0024] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0025] Example 1
[0026] like Figure 1-3 As shown, this embodiment provides a design method for a layered and crowdsourced programming language:
[0027] The programming language described is a hierarchical programming language. The first layer is an abstract language layer that supports streaming data operations (e.g., merging, filtering, splitting), multimedia data types (e.g., images, audio, video, text, and tables), and composite data structures (e.g., nested combinations of hashes and arrays). The first-layer language supports streaming calls, where data flows from the output of one operation to the input of the next through pipes, and this operation can be chained, meaning multiple pipe operations can run in parallel. The first-layer language supports coarse-grained data types in the context of artificial intelligence. For example, images, text, audio, video, and tabular data. Common programming languages often have numerous image processing or audio processing libraries, but lack a unified representation. This makes it difficult to apply AI models based on these types to all these basic representations, necessitating the conversion of all these types into a unified representation. This language provides a unified data representation and built-in methods for manipulating this data. Furthermore, nested collection data types are treated as separate data types to support more semantic data processing. The second layer, implemented using existing programming languages, forms the foundation and support for the first layer. Its basic approach is to support the streaming operations, coarse-grained data types, and composite data structures of the first layer through combinations of traditional languages. The first layer is geared towards non-professional users, primarily aiming to simplify program design and improve software development efficiency; the second layer is geared towards existing programmers, mainly to encapsulate more abstract operations based on existing language systems.
[0028] The programming language described uses a unified language standard library organization and supports crowdsourcing for collaborative development and sharing. The evolution of existing languages is relatively slow, with improvements lagging significantly behind the needs of practical application development. Generally, support for a function or feature begins at the library level, eventually escalating to the language level. Considering two factors—multiple programmers repeatedly developing the same modules and more enterprises increasingly providing AI and data analysis services to the public through cloud platforms—this invention conducts research in the fields of AI and big data, extracts common application operators, summarizes the coupling and association relationships between these operators, and transforms them into a tree-like virtual namespace for the language, organized as entity relationships. Each non-leaf node represents a subdivided functional module, while leaf nodes represent specific services or functions. Each leaf node's service or function can have multiple different implementations, which may come from enterprise cloud services or be independent modules implemented by individual developers. For example, "Image.Recognition" is a non-leaf node representing image classification; "Image.Recognition.Plant" is a leaf node representing plant classification within image classification. Functions under the same leaf node have the same calling interface, which simplifies program design. Even functions provided by different providers will have the same interface as long as they serve the same purpose and are within the same virtual namespace. This reduces the learning curve for new features. First-level programmers can use using declarations to reference any module or function within a namespace. The process from namespace reference to the actual cloud service call or the call to the module implemented by the programmer is implicitly handled by the language runtime system and is invisible to first-level programmers. This makes first-level programming simpler and the language easier to learn.
[0029] Functional modules under leaf nodes in a virtual namespace are marked by two fields (in fact, the leaf node itself is also a type of marker): function name and provider. The function name is the name by which the function is invoked, which might be "plantRecog," etc., while the provider might be a company name or an individual's username, etc. The node location, name, and provider fields uniquely define a function.
[0030] The programming language described is a crowdsourced, open language that supports rapid language evolution. Second-layer developers can implement services or functions within existing virtual namespaces and upload or deploy the implemented modules according to specifications. They can also extend the virtual namespaces by defining new namespaces and providing corresponding implementations based on the existing namespace tree. Virtual namespaces can be centrally managed or based on a blockchain-based distributed ledger, ensuring that any programmer's or organization's implementation of a service and updates to the virtual namespace are globally visible in real time. First-layer programmers can reference relevant implementations and build their own applications. Multiple implementations of the same service or function within a namespace can be ranked based on user ratings, with the ranking results provided for other designers' reference. Based on this mechanism, the language is constantly evolving, continuously enriched and improved through crowdsourcing. This ensures the language meets the evolving technological demands of software design and provides a mechanism for global collaboration and sharing.
[0031] The programming language described supports cloud-based calls to models and services. As artificial intelligence models and data analysis algorithms become increasingly complex, they typically rely on numerous third-party components or libraries, placing ever higher demands on the runtime environment and computing power. On the one hand, existing desktop systems often lack the computing power to support these programs; on the other hand, the computing environments of ordinary computers are also insufficient. Considering the ever-increasing network speeds, programs constructed using the programming language of this invention can be executed either locally or remotely. Whether execution is remote depends on the implementation of the namespaces introduced by the first-level programmer during programming. If the implementation is a cloud service, it will be sent to the remote execution location over the network. This fully utilizes the computing power of the cloud platform, simplifies program execution complexity, and improves resource utilization.
[0032] Figure 1 This invention introduces a two-tier programming structure for the language provided. The lower tier is consistent with conventional programming languages, offering greater flexibility and wider applicability. However, it requires a higher level of specialized knowledge, necessitating a certain level of fundamental computer programming understanding from the user. The program uses traditional data structures and algorithms as the underlying abstraction, functions and classes as the basic methods for code reuse, and libraries as the basic methods for logic reuse. The higher tier uses high-level data types as the basic data types (while also supporting traditional data types such as numbers and strings), and stream operations replace traditional command-based programming (while still supporting traditional procedures like flow statements, their use is not recommended). The higher tier can directly utilize the functionality provided by the lower tier, ensuring the flexibility of the lower tier while retaining the simplicity of the higher tier.
[0033] The rapid evolution of languages and virtual namespaces are closely linked. Figure 2 In the diagram, the left side represents services written in the low-level language, while the right side contains declarations of calls from the high-level language to the low-level language. The middle section is a virtual namespace, which maintains a tree structure of the virtual namespace and the low-level language services at each node.
[0034] Typically, when an organization or individual wants to upload a new service, they first write it as a JAR file or HTTP service in Java or another language. Then, they mount it to a node within the virtual namespace through its interface. The newly mounted service must conform to the virtual namespace's structural specifications; this step can be automated. Secondly, after mounting, the higher-level language can directly use the functionality provided by the lower-level language through using declarations. This allows for zero-configuration use of the service and eliminates concerns about versioning issues.
[0035] like Figure 3 In the context of artificial intelligence, images, text, audio, and video should be considered fundamental data types. Beyond these, in data processing applications, much data can be represented using nested dictionaries and lists. For example, a list might contain several movies, where each element is a dictionary storing information such as movie title and year; this is a list nested within a dictionary structure. In production practice, such nesting relationships rarely exceed three levels. However, in common programming languages, this nesting relationship can be arbitrarily defined in type definitions, or there may be no type at all, thus lacking semantics and making it difficult to use easily. Users need to understand the entire type definition to grasp the data structure. Therefore, this language enumerates two-level and three-level nesting and defines them as separate types, giving nested collection type semantics, better integrating with virtual namespaces, and making it easier to use.
[0036] Existing programming languages do not support images, text, video, and audio as basic data types, and calling artificial intelligence programs is inconvenient due to inconsistent interfaces. The language provided by this invention, however, incorporates image, text, audio, and video data types, facilitating the invocation of artificial intelligence services. Furthermore, the language provided by this invention unifies the remote service invocation process, hiding implementation details in the lower-level language while providing a consistent invocation method in the higher-level language, and unifying interfaces for the same functions through a virtual namespace. In terms of ease of programming, it reduces the difficulty of software development compared to traditional programming languages. It also outperforms traditional programming languages in terms of language evolution efficiency.
[0037] This language has the following characteristics:
[0038] (1) Layered, upper and lower layers, supporting streaming operations and multimedia data types;
[0039] (2) Based on the unified interface of the virtual namespace, the remote invocation of multiple services is implicitly implemented;
[0040] (3) Rapid evolution of language adaptive crowdsourcing based on virtual namespaces and blockchain.
[0041] The above description is merely a preferred embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A layered and crowd-sourced programming language design method, characterized in that, This includes an abstract language layer, a traditional programming language layer, and a virtual namespace; The abstract language layer supports streaming data operations, multimedia data types, and composite data structures. The streaming data operations include, but are not limited to, merging, filtering, and splitting. The multimedia data types include, but are not limited to, images, audio, video, text, and tables. The composite data structures include, but are not limited to, combinations and nested arrays. The traditional programming language layer includes a combination of several programming languages to support the streaming data operations, the multimedia data types, and the combined data structures. The virtual namespace is a tree structure including non-leaf nodes and leaf nodes. The non-leaf nodes represent subdivided functional modules, and the leaf nodes represent specific services or functions. In the virtual namespace, functions under the same leaf node have the same calling interface, and the same leaf node includes multiple different implementations; Developers in the traditional programming language layer implement services or functions in the virtual namespace and upload or deploy the implemented modules. Developers of the traditional programming language layer extend the virtual namespace by defining new names based on existing names and providing corresponding implementations. Programmers in the abstract language layer can reference any module or function in the virtual namespace using a using declaration; The virtual namespace is managed centrally or based on a blockchain-based distributed ledger. Programmers of the abstract language layer reference the relevant implementations and build applications within the virtual namespace. For multiple implementations of the same service or function in the virtual namespace, they are sorted by user ratings and evaluations, and the sorting results are provided for reference by other programmers. The layered and crowdsourced programming language supports models and cloud-based service calls, and programs constructed using the layered and crowdsourced programming language support both local and remote execution.
2. The design method for a layered and crowdsourced programming language according to claim 1, characterized in that, The abstract language layer supports streaming calls and parallel calls.
3. The design method for a layered and crowdsourced programming language according to claim 1, characterized in that, The layered and crowdsourced programming language provides a unified data representation for the multimedia data type, while also providing built-in methods for manipulating the data, and treating the multimedia data type as a separate data type.
4. The design method for a layered and crowdsourced programming language according to claim 1, characterized in that, The functions under the leaf nodes are defined by the node location, function name, and provider; the function name is the name by which the function is invoked; the provider includes, but is not limited to, company name and personal username.
Citation Information
Patent Citations
Direct Access of Language Metadata
US20080189683A1