CN113656007A - Scene construction method, device, equipment and storage medium - Google Patents

Scene construction method, device, equipment and storage medium Download PDF

Info

Publication number
CN113656007A
CN113656007A CN202110968548.5A CN202110968548A CN113656007A CN 113656007 A CN113656007 A CN 113656007A CN 202110968548 A CN202110968548 A CN 202110968548A CN 113656007 A CN113656007 A CN 113656007A
Authority
CN
China
Prior art keywords
scene
component
signal
contact
operator
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110968548.5A
Other languages
Chinese (zh)
Inventor
刘春龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zebred Network Technology Co Ltd
Original Assignee
Zebred 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 Zebred Network Technology Co Ltd filed Critical Zebred Network Technology Co Ltd
Priority to CN202110968548.5A priority Critical patent/CN113656007A/en
Publication of CN113656007A publication Critical patent/CN113656007A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code

Abstract

The invention provides a scene construction method, a scene construction device, scene construction equipment and a storage medium, wherein the method comprises the following steps: the method comprises the steps of obtaining a scene component set selected by a user, wherein the scene component set comprises a signal component, a contact component and an operator component, the signal component is a component obtained by packaging signal content and at least one specific implementation logic, the contact component is a component obtained by packaging contact content and at least one specific implementation logic, and the operator component is a component obtained by packaging at least one processing logic; constructing a target scene by using the signal component, the contact component and the operator component, and generating a graphic scene corresponding to the target scene; and generating a general code file corresponding to the target scene according to the graphic scene. The method of the invention can simplify the process of scene development by the user and improve the efficiency of scene development by modularizing the scene signal, the service contact and the operator which are depended by the scene.

Description

Scene construction method, device, equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for constructing a scene.
Background
With the development of the car networking technology, in order to enable users to have more and richer car experience scenes, each large intelligent car scheme provider opens own technical capability to developers and Original Equipment Manufacturers (OEMs) in a dispute so as to jointly construct a whole car intelligent scene ecology.
Generally, a scenario is developed by connecting scenario trigger logic in series with car bottom signals, car content and service contacts to generate executable rules. In which the in-vehicle bottom signal, content and service contacts require scene developers to spend a lot of time and effort to hold their implementation details, and they are strongly related to in-vehicle hardware and system software versions. Therefore, different vehicle model projects have different signal or contact implementation modes of the same vehicle due to different hardware configurations or system software versions, so that scene development, iterative upgrade, transplantation and the like are very difficult.
In the prior art, two methods are mainly used in a development scene, firstly, high-level language development is used and is realized through coding of professional research and development personnel, and the method has long period and poor timeliness; secondly, a custom scene development Language, namely, Domain Specific Language (DSL) development, is strong in Domain and not universal, needs a large amount of learning access cost, and is not easy to open. In addition, the above two development methods also have the following disadvantages: (1) the development cost is high, developers need to comprehensively master scene trigger conditions, signals and contact bottom layer implementation, the development is complex, and the maintainability is poor; (2) the upgrading cost is high, when the same signal or contact is expanded to have a new function, the existing scene may need secondary development to complete iterative upgrading; (3) the transplanting cost is high, the two development methods are strongly coupled with the vehicle bottom layer, and in different vehicle type projects, the specific implementation of the same signal or contact point is different due to the difference of hardware configuration or system software versions, so that the same scene is difficult to transplant and reuse in a plurality of projects.
Disclosure of Invention
In view of the foregoing problems in the prior art, an object of the present invention is to provide a method, an apparatus, a device and a storage medium for constructing a scene, which can simplify the scene development process and improve the scene development efficiency.
In order to solve the above problem, the present invention provides a scene construction method, including:
the method comprises the steps of obtaining a scene component set selected by a user, wherein the scene component set comprises a signal component, a contact component and an operator component, the signal component is a component obtained by packaging signal content and at least one specific implementation logic, the contact component is a component obtained by packaging contact content and at least one specific implementation logic, and the operator component is a component obtained by packaging at least one processing logic;
constructing a target scene by using the signal component, the contact component and the operator component, and generating a graphic scene corresponding to the target scene;
and generating a general code file corresponding to the target scene according to the graphic scene.
Further, the method further comprises:
acquiring a target application project selected by a user, and determining project information of the target application project;
and generating an executable code file of the target scene in the target application project based on the general code file and the project information.
Further, the acquiring the set of scene components selected by the user comprises:
providing a scene construction interface to a user, the scene construction interface displaying a visual representation of a plurality of scene components;
and responding to a first trigger operation of a user on the scene component displayed in the scene construction interface, and taking the scene component corresponding to the first trigger operation as the scene component selected by the user.
Further, the constructing a target scene by using the signal component, the contact component and the operator component, and generating a graphic scene corresponding to the target scene includes:
acquiring the coupling relation between the signal assembly, the contact assembly and the operator assembly;
and arranging the signal assembly, the contact assembly and the operator assembly based on the coupling relation to obtain a graphic scene corresponding to the target scene.
Further, the acquiring the target application item selected by the user comprises:
providing a scene construction interface to a user, the scene construction interface displaying a visual representation of at least one application project;
and responding to a second trigger operation of the user on the application item displayed in the scene construction interface, and taking the application item corresponding to the second trigger operation as the target application item.
Further, the signal component generation method comprises the following steps:
acquiring signal content of a scene signal and at least one corresponding specific implementation logic;
packaging the signal content and at least one corresponding specific implementation logic to obtain the signal component;
the generation method of the contact assembly comprises the following steps:
acquiring contact content of a service contact and at least one corresponding specific implementation logic;
and packaging the contact content and the corresponding at least one specific implementation logic to obtain the contact component.
Further, the operator component comprises a signal processing component, a logic and arithmetic component and a custom function component, wherein the signal processing component is used for filtering, combining or converting the signal content, and the logic and arithmetic component is used for carrying out logic or arithmetic operation on the signal content.
Another aspect of the present invention provides a scene constructing apparatus, including:
the system comprises a scene component acquisition module, a scene component acquisition module and an operator component, wherein the scene component acquisition module is used for acquiring a scene component set selected by a user, the scene component set comprises a signal component, a contact component and an operator component, the signal component is a component obtained by packaging signal content and at least one specific implementation logic, the contact component is a component obtained by packaging contact content and at least one specific implementation logic, and the operator component is a component obtained by packaging at least one processing logic;
the graphic scene generation module is used for constructing a target scene by utilizing the signal component, the contact component and the operator component and generating a graphic scene corresponding to the target scene;
and the code file generating module is used for generating a general code file corresponding to the target scene according to the graphic scene.
Another aspect of the present invention provides an electronic device, including a processor and a memory, where at least one instruction or at least one program is stored in the memory, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the scene constructing method as described above.
Another aspect of the present invention provides a computer-readable storage medium, in which at least one instruction or at least one program is stored, and the at least one instruction or the at least one program is loaded and executed by a processor to implement the scene constructing method as described above.
Due to the technical scheme, the invention has the following beneficial effects:
according to the scene construction method, the scene signals, the service contacts and the operators are modularized by separating the definition of the scene signals and the service contacts which are depended by the scene from the specific implementation, a user can independently construct a target scene by selecting a scene assembly set according to the business logic of the scene, and a corresponding graphic scene and a general code file are generated.
Drawings
In order to more clearly illustrate the technical solution of the present invention, the drawings used in the description of the embodiment or the prior art will be briefly described below. It is obvious that the drawings in the following description are only some embodiments of the invention, and that for a person skilled in the art, other drawings can be derived from them without inventive effort.
FIG. 1 is a system architecture diagram provided by one embodiment of the present invention;
FIG. 2 is a flow diagram of a method for scene construction provided by an embodiment of the invention;
FIG. 3 is a schematic diagram of signal content provided by one embodiment of the present invention;
FIG. 4 is a schematic diagram of specific implementation logic provided by one embodiment of the present invention;
FIG. 5 is a schematic diagram of a signaling assembly provided by one embodiment of the present invention;
figure 6 is a schematic view of a contact assembly provided by one embodiment of the present invention;
FIG. 7 is a diagram of a windows operator component provided by one embodiment of the invention;
FIG. 8 is a schematic diagram of logical and arithmetic components provided in accordance with one embodiment of the present invention;
FIG. 9 is a diagram of a get user account category component provided by one embodiment of the invention;
FIG. 10 is a schematic illustration of an image scene provided by one embodiment of the invention;
FIG. 11 is a flow chart of a scene construction method provided by another embodiment of the present invention;
FIG. 12 is a schematic illustration of an instantiation of a target scenario provided by an embodiment of the invention;
fig. 13 is a schematic structural diagram of a scene constructing apparatus according to an embodiment of the present invention;
fig. 14 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, apparatus, article, or device that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or device.
Referring to the specification fig. 1, a schematic diagram of a system architecture provided by an embodiment of the present invention is shown, and the system architecture may include a plurality of application items 110 and a plurality of common scenes 120. The application item 110 is a set of specific application implementations of a scene, and includes a plurality of scenes; when a scene references a particular application item, then executable code associated with the application item is generated. The common scene 120 is stored in a common resource pool, is generated by arranging a signal component, an operator component and a contact component according to a certain rule, is an abstract common resource, and is irrelevant to a specific application project and implementation. The scene construction method provided by the embodiment of the present invention can be used to construct the public scene 120, and combine the public scene 120 with the application item 110 to obtain an executable code related to the application item.
In the embodiment of the invention, one scene comprises a process of triggering scene operation on the premise that the scene condition is met. Wherein the scene condition may be determined from a scene dependent signal, which may be used to represent a carrier of data. The signal may be generated or received by a signal source that may acquire the signal through various triggering mechanisms, such as through a passive triggering mechanism (e.g., a mechanism that is not actively triggered by a user) or an active triggering mechanism (e.g., a mechanism that is actively triggered by a user). In the passive triggering mode, the signal source may obtain signals from other devices, signals from sensors, data from various messages (such as broadcast messages, application messages, notifications, and the like) inside the signal source, state information generated according to the state of the signal source, and the like. For an active triggering mode, a signal source may trigger to acquire a signal through user operation, for example, a two-dimensional code signal acquired by scanning a two-dimensional code by a user may correspond to a certain service function, such as a link or a shortcut entry shared by the user and related to a service agent, or such as a signal acquired by the user may be selected from a set providing a plurality of signals.
For example, in the field of car networking, the data carried by the scene-dependent signal may include: the vehicle machine data and/or the vehicle machine receiving data; the vehicle-mounted device data may include software and hardware data in the vehicle-mounted device, such as vehicle-mounted device software interactive instruction data, sensor signals, Global Positioning System (GPS) data, Time (Time) data, weather data, interface data, and the like, and the vehicle-mounted device receiving data may include vehicle-mounted device received instruction data, hardware, interface data, and the like.
In this embodiment of the present invention, the scenario operation may be to execute a certain action or provide a certain service, and the specific manner may include: providing cards, outputting notification information, outputting links, calling Applications (APPs), or controlling other terminal devices, etc.
In practical application, a user can determine any scene condition and any scene operation of a scene according to practical application requirements. Wherein the user may include: a developer of the scenario, and/or a user receiving the scenario service. That is, a scene developer can determine any scene condition and any scene operation of a scene according to operation requirements; similarly, a user receiving the scene service can determine any scene condition and any scene operation of the scene according to the own requirements so as to meet the own personalized requirements.
Referring to the specification, fig. 2 illustrates a flow of a scene construction method according to an embodiment of the present invention, and as shown in fig. 2, the method may include the following steps:
s210: the method comprises the steps of obtaining a scene component set selected by a user, wherein the scene component set comprises a signal component, a contact component and an operator component, the signal component is obtained by packaging signal content and at least one specific implementation logic, the contact component is obtained by packaging the contact content and the at least one specific implementation logic, and the operator component is obtained by packaging at least one processing logic.
In the embodiment of the present invention, the scene component set may include one or more signal components, one or more contact components, and one or more operator components.
In embodiments of the present invention, the signal component may be used to represent a scene-dependent signal, which is an input source of a scene, closely related to the underlying hardware or system version implementation, and quite complex. Therefore, the definition and implementation of the signal can be separated, and the abstraction is split into two parts: one is signal content and the other is implementation specific logic. The signal content is used as an interface for exposing signals to the outside and is used as a generating component for scene developers to use; the specific implementation logic is related to the hardware or system version of the application project and is provided by the bottom developer. Since the hardware or system versions of different applications may not be identical, a signal corresponds to a standard signal content, one or more implementing logic. By defining and realizing separation, scene developers do not need to concern the specific implementation logic of the bottom layer, the bottom layer developers do not need to concern the upper layer service logic, the parallel development of the scene is realized in a mutual decoupling mode, and the efficiency of the scene development is improved.
In the embodiment of the invention, the contact component can be used for representing the operation executed after the scene condition is met, and is also very relevant to the system version and the service. Therefore, similar definitions and implementations of signals may be adopted so that it can be applied to different application items, and the detailed description of the embodiments of the present invention is omitted here.
In this embodiment of the present invention, the operator component may include logic for processing the signal content and/or the contact content, or may include processing logic for implementing a certain custom function. Specifically, the operator components may include signal processing components, logic and arithmetic components, custom function components, and the like. The operator component can be used for arranging a plurality of signal components into a complex scene condition according to a certain rule, and arranging the complex scene condition and the contact component into a target scene according to a certain rule, that is, when a plurality of signal components are combined into a specific scene condition through the operator component, the corresponding operation of the contact component can be triggered.
In this embodiment of the present invention, before performing step S210, one or more scene signals, service contacts, and operators may be predefined, and the defined scene signals, service contacts, and operators are componentized. Illustratively, the structure of JSON (JavaScript Object Notation) can be used to describe each scene component, and the specific structure is as follows:
Figure BDA0003224822180000071
each key-value pair represents a component attribute, which is specifically illustrated in the following table:
Figure BDA0003224822180000072
Figure BDA0003224822180000081
from the above structure, the developed signal components, contact components, and operator components can be defined.
In one possible embodiment, the signal component generation method may include:
acquiring signal content of a scene signal and at least one corresponding specific implementation logic;
and packaging the signal content and the corresponding at least one specific implementation logic to obtain the signal component.
Specifically, as shown in fig. 3, the signal content of the scene signal may include parameters of the scene signal externally output, such as a parameter name, a type, an output mode, an example value, and the like; as shown in fig. 4, the specific implementation logic of the scene signal may include implementation sources, obtaining manners, obtaining sources, example values, and the like, and the specific implementation logic of the scene signal may include specific implementation logic in different hardware devices or different system versions.
Since each scene signal is similar in structure except for different parameters of external output, a template for converting the scene signal into a signal component can be defined, and the specific structure is as follows:
Figure BDA0003224822180000082
and by taking the character strings at the beginning and the end of the "$" as the replacing variables, the signal content of each scene signal and at least one corresponding specific implementation logic can be encapsulated through the template to obtain a corresponding signal component. In practical applications, a plurality of different signal components may be packaged in advance for the user to select, as shown in fig. 5, and the generated signal components may be displayed visually in the form of building blocks.
In one possible embodiment, the method for generating the contact assembly may include:
acquiring contact content of a service contact and at least one corresponding specific implementation logic;
and packaging the contact content and the corresponding at least one specific implementation logic to obtain the contact component.
Specifically, the contact content of the service contact and the corresponding at least one specific implementation logic are similar to the scene signal, and are not described herein again in the embodiments of the present invention. A template for converting the service contact into a contact assembly may also be defined, and the specific structure is as follows:
Figure BDA0003224822180000091
and the contact content of each service contact and at least one corresponding specific implementation logic can be encapsulated by using the character strings at the beginning and the end of the "$" as the replacement variables through the template, so that a corresponding contact component is obtained. In practical applications, a plurality of different contact assemblies may be packaged in advance for the user to select and use, as shown in fig. 6, and the generated contact assemblies may be displayed visually in the form of building blocks.
In one possible embodiment, the operator components may include signal processing components, logical and arithmetic components, and custom function components. Wherein, the signal processing component is used for filtering, merging or converting the signal content. Taking windows operator as an example, it means that a certain scene signal or a scene signal set is limited to trigger a limited number of times within a certain time period, and the definition is described as follows:
Figure BDA0003224822180000101
as shown in fig. 7, the generated windows operator component may also be visually displayed in the form of a building block. In practical applications, a plurality of different signal processing components may be predefined for user selection, for example, the signal processing components shown in the following table may be predefined:
name (R) Description of the invention
filter Filtering an input signal
map Varying signal output
debounce Signal debouncing
distinct Signal deduplication
windows Limiting output to signal
distinctUntilChanged Signal deduplication until attribute transformation yields a new value
query Inquiry signal
combine_last/merge Combining multiple signals
The logical and arithmetic component is used for carrying out logical or arithmetic operation on the signal content. In practical applications, a plurality of different logical and arithmetic components may be predefined for the user to select, for example, components such as null, true/false, text, number, logical negation, etc., as shown in fig. 8, and the generated logical and arithmetic components may be displayed visually in the form of building blocks.
The custom function component is a component implemented to implement a specific function. For example, the custom function component may include a get user account category component, which may include one output and two inputs, and may be structurally described as follows:
Figure BDA0003224822180000111
Figure BDA0003224822180000121
as shown in fig. 9, the generated component for acquiring the user account category may also be visually displayed in the form of a building block. In practical application, the self-defined function component can be self-defined by a developer or a user according to actual requirements so as to meet personalized requirements of the self-defined function component.
It should be noted that, in some possible embodiments, other types of signal components, contact components, and operator components may also be generated in advance, and this is not limited by the embodiment of the present invention.
In one possible embodiment, the obtaining the set of scene components selected by the user may include:
providing a scene construction interface to a user, the scene construction interface displaying a visual representation of a plurality of scene components;
and responding to a first trigger operation of a user on the scene component displayed in the scene construction interface, and taking the scene component corresponding to the first trigger operation as the scene component selected by the user.
Specifically, the scene construction interface may include graphical representations of the signal component, the contact component, and the operator component, and a user may perform a first trigger operation based on the graphical representations to select each scene component that constructs the target scene. For example, the signal component, the contact component and the operator component may be represented in a building block form, and the first trigger operation may be a drag operation, if the user drags the signal component, the contact component and/or the operator component represented in the building block form to the target display area, that is, the user selects the signal component, the contact component and/or the operator component.
In a possible embodiment, the signal component, the contact component, and the operator component may also be represented by a tree structure, where the first trigger operation may be a click operation, that is, a user may determine a selected signal component, contact component, and/or operator component by clicking the signal component, contact component, and/or operator component in the tree structure.
According to the embodiment of the invention, the signals, the service contacts and the operators which are dependent on the scene are abstractly packaged into the components which are used as basic elements for constructing the scene, and the packaged signal components, the contact components and the operator components are visually represented, so that a user can develop the scene in a visual mode, the scene development process is modularized and visualized, and the method has the characteristics of simplicity in operation, high flexibility and strong expansibility.
S220: and constructing a target scene by using the signal component, the contact component and the operator component, and generating a graphic scene corresponding to the target scene.
In the embodiment of the invention, the operator component can be used for arranging a plurality of signal components into a complex scene condition according to a certain rule, and arranging the complex scene condition and the contact component into a target scene according to a certain rule. A graphical scene may be generated from the visual representations of the signal component, the contact component, and the operator component, and after the graphical scene is generated, the graphical scene may be presented in a user interface, such as a scene construction interface provided to a user.
In one possible embodiment, the constructing a target scene by using the signal component, the contact component, and the operator component, and the generating a graphic scene corresponding to the target scene may include:
acquiring the coupling relation between the signal assembly, the contact assembly and the operator assembly;
and arranging the signal assembly, the contact assembly and the operator assembly based on the coupling relation to obtain a graphic scene corresponding to the target scene.
In particular, the corresponding coupling relationship may be determined from a user's coupling operation of the graphical representations of the signal component, the contact component and the operator component. That is, if the user couples the graphical representations of two components selected, it can be determined that there is a coupling relationship between the two components. The graphical representations of the signal components, the contact components and the operator components may be arranged according to the coupling relationship to obtain the graphical scene.
Illustratively, a recommended coffee ordering scenario is taken as an example, namely when the user drives to a company in the morning for a distance of less than 10 minutes and coffee activities preferred by the user exist around the company, a reminding notice of whether coffee ordering is required is pushed to the user. The graphic scene generated by the method is shown in fig. 10, and the graphic scene shown in fig. 10 may include: the "user-ordered coffee (preferred coffee)" and the "navigation destination information signal (estimated time remaining to arrive)" as signal components, the "AIPush contact C type" as contact component, and "≠", "null", "and", "<" and "10" as operator components, wherein there is a coupling relationship between the two components "user-ordered coffee (preferred coffee)" and "≠" and there is also a coupling relationship between the two components "navigation destination information signal (estimated time remaining to arrive)" and "<".
S230: and generating a general code file corresponding to the target scene according to the graphic scene.
In the embodiment of the present invention, according to parameters corresponding to a signal component, a contact component, and an operator component in the graphic scene, the signal component, the contact component, and the operator component may be converted into attribute items of a general code file corresponding to the target scene; and determining the relationship between the attribute items of the universal code file according to the coupling relationship between the signal assembly, the contact assembly and the operator assembly. Wherein the relationship between the attribute items of the generic code file can be used to determine the execution logic of the code.
In the embodiment of the invention, after the general code file corresponding to the target scene is generated, the general code file can be stored in a public resource pool as a public scene for specific application projects.
In summary, the scene construction method of the present invention separates the definition of the scene signal and the service contact that the scene depends on from the specific implementation, and modularizes the scene signal, the service contact and the operator, and the user can independently construct the target scene by selecting the scene component set according to the business logic of the scene itself, and generate the corresponding graphic scene and the general code file, and the user does not need to know the implementation details and the differences between different implementations of the signal, the contact and the operator that the user depends on, thereby greatly simplifying the scene development process and improving the scene development efficiency.
In one possible embodiment, as shown in fig. 11, the method may further include:
s240: acquiring a target application project selected by a user, and determining project information of the target application project.
Specifically, the acquiring of the target application item selected by the user may include:
providing a scene construction interface to a user, the scene construction interface displaying a visual representation of at least one application project;
and responding to a second trigger operation of the user on the application item displayed in the scene construction interface, and taking the application item corresponding to the second trigger operation as the target application item.
Specifically, the scene construction interface may include a graphical representation of at least one application item, and the user may perform a second trigger operation based on the graphical representation to select a target application item. The second trigger operation may be a drag operation, a click operation, and the like, which is not limited in the embodiment of the present invention. Illustratively, if the user drags the graphical representation of a certain application item to the target display area, this means that the user has selected the application item as the target application item.
S250: and generating an executable code file of the target scene in the target application project based on the general code file and the project information.
Specifically, the project information may include hardware information and system version information corresponding to the target application project, and an instantiated application of a scene may be completed based on the common code file according to the project information, so as to generate an executable code related to the target project. After the executable code is generated, the executable code can be distributed to a scene engine for execution.
Illustratively, taking a recommended coffee ordering scenario as an example, introducing it into an intelligent service flow project, where the system engine version is 3.1.1, as shown in fig. 12, then the corresponding executable code may be generated as follows:
Figure BDA0003224822180000151
Figure BDA0003224822180000161
Figure BDA0003224822180000171
Figure BDA0003224822180000181
in summary, the scene construction method of the present invention generates the executable code file of the scene related to the application project by introducing the general scene into the specific application project, so that the scene engine can execute the executable code and provide the corresponding scene service, thereby greatly reducing the costs of scene development, upgrade, migration, and the like.
Referring to the specification, fig. 13 shows a structure of a scene constructing apparatus 1300 according to an embodiment of the present invention. As shown in fig. 13, the apparatus 1300 may include:
a scene component obtaining module 1310, configured to obtain a scene component set selected by a user, where the scene component set includes a signal component, a contact component, and an operator component, where the signal component is a component obtained by encapsulating signal content and at least one specific implementation logic, the contact component is a component obtained by encapsulating contact content and at least one specific implementation logic, and the operator component is a component obtained by encapsulating at least one processing logic;
a graphic scene generation module 1320, configured to construct a target scene by using the signal component, the contact component, and the operator component, and generate a graphic scene corresponding to the target scene;
a code file generating module 1330, configured to generate a general code file corresponding to the target scene according to the graph scene.
In one possible embodiment, the apparatus 1300 may further include:
and the application item acquisition module is used for acquiring the target application item selected by the user and determining the item information of the target application item.
And the executable code file generation module is used for generating the executable code file of the target scene in the target application project based on the general code file and the project information.
It should be noted that, when the apparatus provided in the foregoing embodiment implements the functions thereof, only the division of the functional modules is illustrated, and in practical applications, the functions may be distributed by different functional modules according to needs, that is, the internal structure of the apparatus may be divided into different functional modules to implement all or part of the functions described above. In addition, the apparatus provided in the above embodiments and the corresponding method embodiments belong to the same concept, and specific implementation processes thereof are detailed in the corresponding method embodiments and are not described herein again.
An embodiment of the present invention further provides an electronic device, which includes a processor and a memory, where the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the scene constructing method provided by the foregoing method embodiment.
The memory may be used to store software programs and modules, and the processor may execute various functional applications and data processing by operating the software programs and modules stored in the memory. The memory can mainly comprise a program storage area and a data storage area, wherein the program storage area can store an operating system, application programs needed by functions and the like; the storage data area may store data created according to use of the apparatus, and the like. Further, the memory may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory may also include a memory controller to provide the processor access to the memory.
In a specific embodiment, fig. 14 is a schematic hardware structure diagram of an electronic device for implementing the method provided by the embodiment of the present invention, where the electronic device may be a computer terminal, a mobile terminal, or other devices, and the electronic device may also participate in forming or including the apparatus provided by the embodiment of the present invention. As shown in fig. 14, the electronic device 1400 may include components such as a memory 1410 of one or more computer-readable storage media, a processor 1420 of one or more processing cores, an input unit 1430, a display unit 1440, Radio Frequency (RF) circuitry 1450, a wireless fidelity (WiFi) module 1460, and a power supply 1470. Those skilled in the art will appreciate that the electronic device architecture shown in fig. 14 does not constitute a limitation of the electronic device 1400 and may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. Wherein:
the memory 1410 may be used to store software programs and modules, and the processor 1420 executes various functional applications and data processing by operating or executing the software programs and modules stored in the memory 1410 and calling data stored in the memory 1410. The memory 1410 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to use of the electronic device, and the like. In addition, the memory 1410 may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device. Accordingly, the memory 1410 may also include a memory controller to provide the processor 1420 with access to the memory 1410.
The processor 1420 is a control center of the electronic device 1400, connects various parts of the entire electronic device using various interfaces and lines, and performs various functions of the electronic device 1400 and processes data by operating or executing software programs and/or modules stored in the memory 1410 and calling data stored in the memory 1410, thereby performing overall monitoring of the electronic device 1400. The Processor 1420 may be a central processing unit, or may be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The input unit 1430 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, the input unit 1430 may include an image input device 1431 and other input devices 1432. The image input device 1431 may be a camera or may be a photo scanning device. The input unit 1430 may include other input devices 1432 in addition to the image input device 1431. In particular, other input devices 1432 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 1440 may be used to display information input by or provided to a user as well as various graphical user interfaces of an electronic device, which may be made up of graphics, text, icons, video, and any combination thereof. The Display unit 1440 may include a Display panel 1441, and optionally, the Display panel 1441 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The RF circuit 1450 may be used for receiving and transmitting signals during information transmission and reception or during a call, and in particular, for receiving downlink information from a base station and then processing the received downlink information by the one or more processors 1420; in addition, data relating to uplink is transmitted to the base station. In general, RF circuitry 1450 includes, but is not limited to, an antenna, at least one Amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, the RF circuit 1450 can also communicate with networks and other devices via wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), and the like.
WiFi belongs to short-distance wireless transmission technology, and the electronic device 1400 can help the user send and receive e-mails, browse webpages, access streaming media and the like through the WiFi module 1460, and it provides wireless broadband internet access for the user. Although fig. 14 shows the WiFi module 1460, it is understood that it does not belong to the essential constitution of the electronic device 1400, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The electronic device 1400 also includes a power supply 1470 (e.g., a battery) that provides power to the various components, and preferably, the power supply may be logically coupled to the processor 1420 via a power management system to manage charging, discharging, and power consumption via the power management system. The power supply 1470 may also include one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and any other components.
It should be noted that, although not shown, the electronic device 1400 may further include a bluetooth module, and the like, which is not described herein again.
An embodiment of the present invention further provides a computer-readable storage medium, which may be disposed in an electronic device to store at least one instruction or at least one program for implementing a scene construction method, where the at least one instruction or the at least one program is loaded and executed by the processor to implement the scene construction method provided by the foregoing method embodiment.
Optionally, in an embodiment of the present invention, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
It should be noted that: the precedence order of the above embodiments of the present invention is only for description, and does not represent the merits of the embodiments. And specific embodiments thereof have been described above. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may 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.
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 the other embodiments. In particular, as for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (10)

1. A method of scene construction, comprising:
the method comprises the steps of obtaining a scene component set selected by a user, wherein the scene component set comprises a signal component, a contact component and an operator component, the signal component is a component obtained by packaging signal content and at least one specific implementation logic, the contact component is a component obtained by packaging contact content and at least one specific implementation logic, and the operator component is a component obtained by packaging at least one processing logic;
constructing a target scene by using the signal component, the contact component and the operator component, and generating a graphic scene corresponding to the target scene;
and generating a general code file corresponding to the target scene according to the graphic scene.
2. The method of claim 1, further comprising:
acquiring a target application project selected by a user, and determining project information of the target application project;
and generating an executable code file of the target scene in the target application project based on the general code file and the project information.
3. The method of claim 1 or 2, wherein the obtaining the set of user-selected scene components comprises:
providing a scene construction interface to a user, the scene construction interface displaying a visual representation of a plurality of scene components;
and responding to a first trigger operation of a user on the scene component displayed in the scene construction interface, and taking the scene component corresponding to the first trigger operation as the scene component selected by the user.
4. The method of claim 1 or 2, wherein constructing the object scene using the signal component, the contact component, and the operator component, and generating the graphical scene corresponding to the object scene comprises:
acquiring the coupling relation between the signal assembly, the contact assembly and the operator assembly;
and arranging the signal assembly, the contact assembly and the operator assembly based on the coupling relation to obtain a graphic scene corresponding to the target scene.
5. The method of claim 2, wherein the obtaining the target application item selected by the user comprises:
providing a scene construction interface to a user, the scene construction interface displaying a visual representation of at least one application project;
and responding to a second trigger operation of the user on the application item displayed in the scene construction interface, and taking the application item corresponding to the second trigger operation as the target application item.
6. The method of claim 1 or 2, wherein the method of generating the signal component comprises:
acquiring signal content of a scene signal and at least one corresponding specific implementation logic;
packaging the signal content and at least one corresponding specific implementation logic to obtain the signal component;
the generation method of the contact assembly comprises the following steps:
acquiring contact content of a service contact and at least one corresponding specific implementation logic;
and packaging the contact content and the corresponding at least one specific implementation logic to obtain the contact component.
7. The method of claim 1, wherein the operator components comprise a signal processing component for filtering, combining or converting signal content, a logical and arithmetic component for performing logical or arithmetic operations on signal content, and a custom function component.
8. A scene construction apparatus, comprising:
the system comprises a scene component acquisition module, a scene component acquisition module and an operator component, wherein the scene component acquisition module is used for acquiring a scene component set selected by a user, the scene component set comprises a signal component, a contact component and an operator component, the signal component is a component obtained by packaging signal content and at least one specific implementation logic, the contact component is a component obtained by packaging contact content and at least one specific implementation logic, and the operator component is a component obtained by packaging at least one processing logic;
the graphic scene generation module is used for constructing a target scene by utilizing the signal component, the contact component and the operator component and generating a graphic scene corresponding to the target scene;
and the code file generating module is used for generating a general code file corresponding to the target scene according to the graphic scene.
9. An electronic device, comprising a processor and a memory, wherein at least one instruction or at least one program is stored in the memory, and the at least one instruction or the at least one program is loaded by the processor and executed to implement the scene construction method according to any one of claims 1 to 7.
10. A computer-readable storage medium, wherein at least one instruction or at least one program is stored in the computer-readable storage medium, and the at least one instruction or the at least one program is loaded by a processor and executed to implement the scene construction method according to any one of claims 1 to 7.
CN202110968548.5A 2021-08-23 2021-08-23 Scene construction method, device, equipment and storage medium Pending CN113656007A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110968548.5A CN113656007A (en) 2021-08-23 2021-08-23 Scene construction method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110968548.5A CN113656007A (en) 2021-08-23 2021-08-23 Scene construction method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113656007A true CN113656007A (en) 2021-11-16

Family

ID=78491989

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110968548.5A Pending CN113656007A (en) 2021-08-23 2021-08-23 Scene construction method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113656007A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104182232A (en) * 2014-08-22 2014-12-03 华为技术有限公司 Method for establishing context-aware applications and user terminal
US20170242780A1 (en) * 2016-02-08 2017-08-24 Vtool Ltd. Graphical Sequence Builder
CN108614689A (en) * 2017-01-09 2018-10-02 阿里巴巴集团控股有限公司 Generation method, device and the terminal device of scene service
CN109966740A (en) * 2019-03-18 2019-07-05 腾讯科技(上海)有限公司 A kind of Scene realization method, device and equipment
CN110764753A (en) * 2019-09-18 2020-02-07 亚信创新技术(南京)有限公司 Business logic code generation method, device, equipment and storage medium
CN112215960A (en) * 2019-07-10 2021-01-12 阿里巴巴集团控股有限公司 Scene construction method, scene rendering method, device and computing equipment
CN112230907A (en) * 2019-07-15 2021-01-15 腾讯科技(深圳)有限公司 Program generation method, device, terminal and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104182232A (en) * 2014-08-22 2014-12-03 华为技术有限公司 Method for establishing context-aware applications and user terminal
US20170242780A1 (en) * 2016-02-08 2017-08-24 Vtool Ltd. Graphical Sequence Builder
CN108614689A (en) * 2017-01-09 2018-10-02 阿里巴巴集团控股有限公司 Generation method, device and the terminal device of scene service
CN109966740A (en) * 2019-03-18 2019-07-05 腾讯科技(上海)有限公司 A kind of Scene realization method, device and equipment
CN112215960A (en) * 2019-07-10 2021-01-12 阿里巴巴集团控股有限公司 Scene construction method, scene rendering method, device and computing equipment
CN112230907A (en) * 2019-07-15 2021-01-15 腾讯科技(深圳)有限公司 Program generation method, device, terminal and storage medium
CN110764753A (en) * 2019-09-18 2020-02-07 亚信创新技术(南京)有限公司 Business logic code generation method, device, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
陈宏君;刘克金;冯亚东;周强;王国栋;文继锋;: "一种基于组件和脚本的可视化程序产物形成架构及应用", 工业控制计算机, no. 12 *

Similar Documents

Publication Publication Date Title
US20150160372A1 (en) Systems and Methods for Weather Forecasting
CN105119806B (en) message updating method and device
CN107741844B (en) Method and device for generating application installation package
CN109684054A (en) Information processing method and device, electronic equipment and memory
CN107666406B (en) Intelligent card display method and device
CN105867730A (en) Display method and device for status bar
CN111897544B (en) Method and device for controlling application program installation
US20170046144A1 (en) Aercloud application express and aercloud application express launcher
CN103455333A (en) Desktop icon processing method and device and mobile terminal
EP3843362A1 (en) Apparatus and method for managing concurrent activation of bundle installed in smart security platform
CN112558968B (en) Method, device, equipment and storage medium for generating resource tree view
CN113656007A (en) Scene construction method, device, equipment and storage medium
CN105897567B (en) A kind of method and device of information sharing
CN112311818B (en) Method, device, terminal and storage medium for downloading applet data packet
CN106708501A (en) Activity monitoring method and device
CN100568178C (en) A kind of control adding method
CN113347609A (en) Wireless intelligent control platform
CN114546436A (en) Micro front-end service updating method and device, electronic equipment and storage medium
CN114422436A (en) Gateway, gateway control method, gateway control device, electronic equipment and storage medium
CN113791766A (en) Method for combining data interfaces, electronic device and readable storage medium
CN106572163B (en) A kind of method and terminal of Data Migration
CN108572858B (en) Method and device for loading notification bar
CN113821276B (en) Custom service management method and related device
CN110472015B (en) Text information extraction method, text information extraction device, terminal and storage medium
CN107273468B (en) A kind of database data processing method, device and terminal

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