Product deployment and display method and device in demonstration scene
By introducing simulation components into the Spring Boot framework, the product source code is rapidly refactored and packaged and deployed, and the traditional deployment methods are solved and the problems of slow speed and external dependence in demonstration scenarios are achieved, and fast and efficient product deployment and display are achieved.
Patent Information
- Application Number
- CN202510624552.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-15
- Publication Date
- 2025-06-13
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In product demonstration scenarios, traditional applications are slow to deploy and rely on external network environments, which increases the complexity and cost of the demonstration.
By introducing simulated components into the Spring Boot framework, rapid restructuring and packaging deployment of product source code is achieved, and dependence on external services is reduced.
It greatly simplifies the deployment process, reduces dependence on network and external resources, improves deployment efficiency, and is suitable for fast and low-cost exhibition and product promotion scenarios.
Smart Images

Figure CN120144176A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology. Specifically, this application relates to a method and device for product deployment and display in a demonstration scenario. Background Art
[0002] With the development of modern technology, the deployment of various applications and services has become an important part of enterprise display and promotion. Especially in scenarios such as exhibitions and demonstrations, how to deploy applications quickly and at low cost has become the core requirement of enterprise and brand display.
[0003] However, traditional application deployment often relies on external network environments and complex system configurations, which is very inefficient in occasions such as exhibitions that require quick response and efficient display, increasing the complexity and cost of demonstrations. Summary of the Invention
[0004] The embodiments of this application provide a method for product deployment and display in a demonstration scenario to solve the problems of slow deployment speed and many external dependencies in the prior art in the product demonstration scenario.
[0005] Correspondingly, the embodiments of this application also provide a device for product deployment and display in a demonstration scenario, an electronic device, and a storage medium to ensure the implementation and application of the above method.
[0006] To solve the above problems, the embodiments of this application disclose a method for product deployment and display in a demonstration scenario, which is applied to a device deploying the Spring Boot framework. The Spring Boot framework includes at least one simulation component for simulating a third-party service. The method includes: Receiving a reconstruction request for product source code from a client and obtaining the product source code; Based on the simulation component, reconstructing the product source code to obtain the reconstructed target source code; After encapsulating the target source code according to a preset encapsulation format, deploying it on a display device for product demonstration.
[0007] The embodiments of this application also disclose a device for product deployment and display in a demonstration scenario, which is applied to a device deploying the Spring Boot framework. The Spring Boot framework includes at least one simulation component for simulating a third-party service. The device includes: An acquisition module, configured to receive a reconstruction request for product source code from a client and obtain the product source code; A first processing module, configured to reconstruct the product source code based on the simulation component to obtain the reconstructed target source code; A second processing module, configured to package the target source code according to a preset packaging format and then deploy it on a display device for product demonstration.
[0008] An embodiment of the present application also discloses an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, one or more of the methods in the embodiments of the present application are implemented.
[0009] An embodiment of the present application also discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, one or more of the methods in the embodiments of the present application are implemented.
[0010] An embodiment of the present application also discloses a computer program product, including a computer program. When the computer program is executed by a processor, one or more of the methods in the embodiments of the present application are implemented.
[0011] The beneficial effects brought by the technical solution provided by the embodiment of the present application are as follows: In the embodiment of the present application, by introducing a simulation component in the Spring Boot framework, rapid deployment and display of products in a demonstration scenario are achieved. Specifically, a device deploying the Spring Boot framework can, without relying on external services, reconstruct the product source code through the simulation component, and package and deploy the reconstructed target source code, thus greatly simplifying the deployment process, reducing the dependence on the network and external resources, and improving the deployment efficiency. The technical solution provided by the embodiment of the present application enables products to be rapidly and efficiently deployed in business scenarios such as exhibitions and demonstrations that require rapid and low-cost display, meets the needs of immediate display and promotion, and effectively solves the limitations of traditional deployment methods in a network-constrained environment.
[0012] Additional aspects and advantages of the embodiments of the present application will be given in part in the following description, which will become apparent from the following description, or can be understood through the practice of the present application. Description of the Drawings
[0013] The above and / or additional aspects and advantages of the present application will become apparent and be readily understood from the following description of the embodiments in conjunction with the drawings, where: Figure 1 is a flowchart of a method for product deployment and display in a demonstration scenario provided by an embodiment of the present application; Figure 2 is a schematic diagram of a first example provided by an embodiment of the present application; Figure 3 is a schematic diagram of a second example provided by an embodiment of the present application; Figure 4Schematic diagram of the third example provided by the embodiments of the present application; Figure 5 Schematic structural diagram of the product deployment and display device in the demonstration scenario provided by the embodiments of the present application; Figure 6 Schematic structural diagram of the electronic device provided by the embodiments of the present application. Detailed implementation manners
[0014] The embodiments of the present application will be described below with reference to the accompanying drawings in the present application. It should be understood that the implementation manners described below with reference to the accompanying drawings are exemplary descriptions for explaining the technical solutions of the embodiments of the present application, and do not constitute limitations on the technical solutions of the embodiments of the present application.
[0015] Those skilled in the art of the present technology can understand that unless specifically stated otherwise, the singular forms "a", "an", "the" and "said" used herein may also include the plural forms. It should be further understood that the terms "comprising" and "including" used in the embodiments of the present application mean that the corresponding features can be implemented as the presented features, information, data, steps, operations, elements and / or components, but do not exclude the implementation of other features, information, data, steps, operations, elements, components and / or their combinations supported by the art of the present technology. It should be understood that when we say an element is "connected" or "coupled" to another element, this element can be directly connected or coupled to the other element, or it can mean that this element and the other element establish a connection relationship through an intermediate element. In addition, the "connection" or "coupling" used here can include wireless connection or wireless coupling. The term "plurality" means two or more, and in view of this, in the embodiments of the present application, "plurality" can also be understood as "at least two". The term "and / or" describes the association relationship of the associated objects and indicates that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / ", unless otherwise specified, generally represents an "or" relationship between the front and rear associated objects.
[0016] To make the purpose, technical solutions and advantages of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.
[0017] The embodiments of the present application provide a method for product deployment and display in a demonstration scenario. Optionally, the embodiments of the present application can be applied to various display devices, such as laptop computers, tablet computers, smart projectors, touch screen terminals, etc. These devices can serve as execution entities to quickly complete product deployment and display, and are particularly suitable for scenarios such as exhibitions, product promotion, and technology demonstrations. Through this method, the application deployment process can be greatly simplified, the display efficiency can be improved, and the dependence on external resources can be reduced. However, this does not limit the embodiments of the present application, and the present application solution can also be implemented on other types of devices.
[0018] As Figure 1 shown in the figure, the embodiments of the present application provide a method for product deployment and display in a demonstration scenario, which is applied to a device deploying the Spring Boot framework. The Spring Boot framework includes at least one simulation component for simulating a third-party service. The method may include the following steps: Step 101, receive a reconstruction request for product source code from a client and obtain the product source code.
[0019] In product demonstration and promotion scenarios, quickly deploying and displaying products is the key to showcasing product highlights and promoting technologies. Traditional application deployment methods usually rely on the open-source application container engine Docker, aiming to simplify application packaging, distribution, and operation. Docker containerization technology has strong versatility and flexibility, enabling rapid packaging, migration, and deployment of applications. However, this technical solution also has certain limitations, especially in some business scenarios that require low-cost and high-efficiency deployment, such as product display, exhibitions, or technology demonstrations. Specifically, although the Docker containerization deployment solution has strong functional completeness and usability and is suitable for various conventional deployment environments, in specific demonstration scenarios, especially when resources are limited or network conditions are not ideal, there are many drawbacks. First, Docker deployment usually has high requirements for hardware resources and may require strong computing power and memory support, which is not applicable to some devices or low-configuration environments. Second, the deployment of Docker containers usually takes a long time, especially in the case of complex applications or applications that rely on external services, with high time-consuming and deployment costs. In addition, when the network environment is restricted, the Docker containerization solution cannot access a unified remote demonstration environment, making it difficult to reuse the environment. Therefore, in scenarios that require fast, low-cost deployment and display, especially when the network is restricted or there are many external dependencies, the complexity and time cost of the traditional Docker containerization deployment solution make it no longer suitable for business scenarios such as exhibitions and product promotion.
[0020] The embodiments of this application are applied to specific scenarios of exhibitions or product promotion demonstrations. Based on the Spring Boot framework, at least one simulation component for simulating third-party services is integrated into the framework. In this way, the Spring Boot framework can simulate the interaction with third-party services in actual applications without the support of real external services, thus avoiding the inconvenience caused by network limitations or excessive external dependencies. Specifically, through the embedded simulation components, the Spring Boot framework can quickly simulate external service interfaces, avoiding the dependence on real external services and ensuring that the application can still run normally during the demonstration even when the network is limited or external resources are inaccessible. Among them, Spring Boot is an open-source framework based on Java, built on top of the Spring Framework, aiming to simplify the creation, running, and deployment processes of Spring-based applications. By providing the principle of "convention over configuration", it reduces the amount of boilerplate code that needs to be written during development, enabling developers to focus more on the implementation of business logic without having to worry about complex configuration details. The core features of the Spring Boot framework include automatic configuration, embedded server support, and a simplified project structure, greatly improving development efficiency.
[0021] In the embodiments of this application, the Spring Boot framework can receive a request from a user or client to structurally modify or rearrange the source code of a certain product. This process is usually to meet specific requirements, such as improving performance, being compatible with different platforms, adding new functions, etc. After receiving the request, the system will extract the source code of the product from the storage or version control system for subsequent processing and modification. For example, a company launches an e-commerce application and hopes to demonstrate the functions of this application during an exhibition. Before the exhibition, the customer requests to integrate the payment function in the application with a simulated payment gateway to avoid being unable to connect to the real payment platform when the network is limited. At this time, the system will receive the customer's refactoring request, obtain the product source code, and make necessary modifications to the payment module so that it can perform simulated payment operations without a real payment gateway, ensuring the smooth progress of the demonstration.
[0022] In the application scenario of the embodiments of the present application, the Spring Boot framework serves as the core operating environment, integrating all the functions required for product demonstration, including but not limited to backend logic processing, data storage, and interaction with the front-end display. Through the simulation components, the Spring Boot framework can dynamically construct an environment for interacting with simulated third-party services without additional configuration and consuming additional resources, simplifying the application deployment process. The demonstrator only needs to reconstruct the target source code and perform a quick deployment according to the preset packaging format to display the complete application functions at exhibitions, product promotions, and other occasions. In addition, the solution of the present application is particularly suitable for use in some environments with poor network conditions and limited resources, solving the problem of the need for high-performance hardware and stable network connections in traditional application deployment methods. Through this method, the product can be deployed and demonstrated quickly and at low cost, improving the demonstration efficiency, while reducing the dependence on the external environment and meeting the requirements of business scenarios such as exhibitions or product promotions.
[0023] Step 102: Based on the simulation components, reconstruct the product source code to obtain the reconstructed target source code.
[0024] In the embodiments of the present application, based on the simulation components, the product source code is reconstructed to obtain the reconstructed target source code. Specifically, after receiving the reconstruction request, at least one simulation component integrated in the Spring Boot framework is used to make necessary modifications and adjustments to the source code of the product. These modifications are usually to replace real third-party services or external dependencies, generating a virtual environment for interacting with external services through the simulation components, so that the product can run independently without connecting to external systems. After reconstruction, the obtained target source code is the code version that has adapted to the new simulation environment and requirements. The reconstruction method provided by the embodiments of the present application can effectively reduce the dependence on external services, ensure that the application can run smoothly in the case of network restrictions or inaccessible external environments, and is particularly suitable for scenarios such as exhibitions and product promotions that require quick deployment and demonstration. In addition, the reconstructed target source code is more flexible, can meet specific demonstration requirements, reduces the deployment complexity and time, and improves the demonstration efficiency.
[0025] Step 103: After encapsulating the target source code according to the preset packaging format, deploy it on the display device for product demonstration.
[0026] In the embodiments of the present application, after encapsulating the target source code according to a preset encapsulation format, it is deployed on a display device for product demonstration. Specifically, after the reconstructed target source code is completed, the system packages it according to the predefined encapsulation format and deploys the packaged file to the display devices used in exhibitions or product promotions. This encapsulation format is to ensure that the code can run efficiently on the target device and is easy to manage and distribute. After encapsulation, the display device can quickly load and run the application to demonstrate the product functions. By packaging the target source code according to the preset encapsulation format in the embodiments of the present application, the deployment process can be greatly simplified, enabling the product to be quickly installed and demonstrated on different devices, avoiding the cumbersome configuration and installation processes. At the same time, the encapsulated application has strong portability and can adapt to a variety of display devices. Especially in an environment without a stable network connection or external dependencies, it can ensure the efficient operation of the application and the smooth progress of the demonstration. This method improves the efficiency of the demonstration, reduces the operation complexity and time cost, and enhances the overall effect of the exhibition or product promotion activity.
[0027] Thus, in the embodiments of the present application, by introducing a simulation component in the Spring Boot framework, the rapid deployment and display of the product in the demonstration scenario are realized. Specifically, the system can reconstruct the product source code through the simulation component without external service dependencies, and encapsulate and deploy the reconstructed target source code, thereby greatly simplifying the deployment process, reducing the dependence on the network and external resources, and improving the deployment efficiency. The technical solution provided by the embodiments of the present application enables the product to be quickly and efficiently deployed in business scenarios such as exhibitions and demonstrations that require quick and low-cost display, meeting the needs of instant display and promotion, and effectively solving the limitations of traditional deployment methods in a network-constrained environment.
[0028] In some embodiments, the simulation component includes one or more of the following: The first component includes an in-memory database for simulating the storage and / or query functions of a third-party database; The second component includes an internal interface for simulating a third-party interface; The third component includes an internal middleware for simulating the functions of a third-party middleware.
[0029] Among them, the first component, for example, uses an H2 embedded in-memory database instead of a traditional relational database, thus avoiding the dependence on an independent database process and simplifying the environment configuration. Among them, the H2 embedded in-memory database is a lightweight Java database that supports running in embedded mode and can be used as an in-memory database or a disk-based database. The H2 database does not require an independent database process and is directly integrated into the application. All data storage is in memory during runtime, which makes it very suitable for scenarios that require quick startup and high performance. Due to the characteristics of its in-memory mode, the H2 database does not depend on external database services and can greatly simplify the environment configuration, especially suitable for rapidly iterative application scenarios such as development, testing, and demonstration.
[0030] Among them, the second component, for example, is an external interface Mock component. By configuring fixed response data or data templates, it simulates the interaction with third-party services and avoids the actual dependence on external services. Among them, the Mock component is a tool used to simulate external interfaces or services. By presetting fixed response data or data templates, it simulates the interaction with third-party services. It can set the simulated interface return results according to business requirements, thus avoiding the application's dependence on real external services. In a development, testing, or demonstration environment, the Mock component can replace the actual third-party interface, enabling the application to run normally without network or external service support and ensuring the smooth progress of the development and demonstration processes. By using the Mock component, developers can simulate the complete business logic and data flow without relying on actual external services.
[0031] Among them, the third component, for example, is a self-developed middleware simulation component. For some irreplaceable middleware functions, it is implemented in a pure in-memory or H2 database-based manner and can simulate complex third-party middleware functions, such as on-chain and query transactions on a blockchain.
[0032] The above simulation components can significantly reduce the dependence on real external services and infrastructure, ensure that the application can still run independently in an environment with network restrictions or without external services, and are particularly suitable for demonstrations in scenarios such as exhibitions and product promotions. By using in-memory databases and simulation components, the deployment process becomes simpler, faster, while reducing costs and improving the display efficiency. The modular design of the simulation components also facilitates reuse and improves the flexibility and scalability of the system.
[0033] In some embodiments, based on the simulation components, refactoring the product source code includes at least one of the following cases 1 to 3: Case 1: Based on the first component, replace the access logic for the third-party database in the product source code with the access logic for the in-memory database.
[0034] Among them, based on the first component, the access logic in the product source code for the third-party database is replaced with the access logic for the in-memory database. Specifically, the developer replaces the code logic of the backend source code that interacts with the external database in the product source code with the code logic that interacts with the H2 embedded in-memory database. The in-memory database does not need to be connected to an external database system, and the data is stored in memory, enabling it to quickly respond to the query requests of the application.
[0035] Case 2: Based on the second component, the interface call logic in the product source code for the third-party interface is replaced with the interface call logic for the internal interface.
[0036] Among them, based on the second component, the interface call logic in the backend source code for the third-party interface is replaced with the interface call logic for the internal interface. Through the Mock component, the developer replaces the code that originally needed to interact with external services with the code that calls the local mock interface, and these mock interfaces return preset response data.
[0037] Case 3: Based on the third component, the call logic in the product source code for the third-party middleware is replaced with the call logic for the in-memory middleware.
[0038] Among them, based on the third component, the call logic in the backend source code for the third-party middleware is replaced with the call logic for the in-memory middleware. This means that if the application depends on some irreplaceable middleware functions (such as message queues, blockchains, etc.), the developer will use the in-memory mock middleware to replace the real middleware service. For example, using the in-memory mock blockchain's functions of uploading to the chain and querying to avoid the dependence on the external middleware system.
[0039] In some embodiments, the second component simulates the function of the third-party interface through preset fixed-text response data and / or dynamic response data generated based on a data template.
[0040] In the embodiments of the present application, the second component simulates the function of the third-party interface through preset fixed text response data and / or dynamic response data generated based on a data template. Specifically, the second component (such as a Mock component) can preset some fixed response texts or generate dynamic response data based on a template to simulate the interaction with the third-party interface. For example, if an application needs to call the interface of an external payment gateway for payment verification, the Mock component can simulate the response of the payment gateway and return a preset "Payment successful" or "Payment failed" message, or dynamically generate different response results according to business requirements, such as payment amount, order number, etc. In this way, the dependence on the real third-party interface can be avoided during the demonstration or testing phase, and the normal operation of the application can still be ensured especially when the network is restricted or the external interface is unavailable. By using fixed text or dynamic data templates, developers can flexibly simulate various interface responses, facilitating the simulation and testing of various business scenarios, and improving the development efficiency and system reliability.
[0041] In some embodiments, the third component simulates the function of the third-party middleware through a memory data structure and / or a memory database; wherein, the memory data structure is used to simulate the data processing logic of the third-party middleware.
[0042] In the embodiments of the present application, the third component simulates the function of the third-party middleware through a memory data structure and / or a memory database. In such an embodiment, a memory data structure (such as a list, queue, hash table, etc.) or a memory database (such as H2) is used to simulate the core functions and data processing logic of the third-party middleware. For example, if an application depends on a certain message queue middleware (such as Kafka) to handle message passing, the Mock component can use a queue in memory to simulate the production and consumption process of messages, avoiding actually connecting to an external message queue service. By this simulation method, the dependence on external middleware is reduced, enabling the application to run smoothly without the support of real middleware, which is especially suitable for testing, development, and demonstration scenarios. By using a memory data structure to simulate data processing logic, the deployment process can be greatly simplified, the complexity of environment configuration can be reduced, and at the same time, the response speed and stability of the system can be improved, enabling the application to be efficiently demonstrated and tested without external dependencies.
[0043] In some embodiments, after encapsulating the target source code according to a preset encapsulation format, deploying it on a display device for product deployment and display in a demonstration scenario includes: Packaging the target source code into an executable program package; Encapsulating the executable program package into a format suitable for running on the display device, and deploying the encapsulated executable program package on the display device for rapid product deployment and display in a demonstration scenario.
[0044] In the embodiments of the present application, the process of packaging the target source code according to a preset packaging format and then deploying it on a display device for rapid product deployment and display includes: First, the target source code is packaged into an executable program package, then the executable program package is encapsulated into a format suitable for running on the display device, and finally the encapsulated program package is deployed to the display device for product display. This process aims to simplify the deployment steps, enabling the product to run quickly and conveniently in the display environment and avoiding complex installation and configuration processes. For example, first, the refactored target source code is packaged into a JAR package of Spring Boot. Such a JAR package contains all the application logic and dependencies. Then, the Launch4j tool is used to encapsulate the JAR package into an.exe executable program. Such an.exe file can be directly run on the Windows operating system. Among them, Launch4j is a tool for packaging Java applications into Windows executable files. It can package the JAR file and the necessary JVM into an EXE file, simplifying the distribution and execution process of Java applications and being suitable for rapid deployment of Java applications. Subsequently, the built.exe executable program is copied to a personal computer. Users can start the Spring Boot service by double-clicking and enter the page address in the browser to access the display page and conduct a demonstration quickly. By packaging the target source code into an executable program and performing format encapsulation, the deployment process of the application can be greatly simplified without complex environment configuration or dependency installation. In this way, the display device can quickly start and run the product, which is especially suitable for efficient demonstrations in scenarios such as exhibitions or product promotions, improving the convenience and response speed of the display, and at the same time reducing the time cost of deployment and demonstration.
[0045] The following uses Embodiment 1 to illustrate the product deployment and display method provided by the embodiments of the present application in a demonstration scenario: Embodiment 1: The embodiments of the present application adopt at least one of the following technologies: Spring Boot: Spring Boot is an open-source framework based on Java. It is built on top of the Spring Framework and aims to simplify the creation, running, and deployment processes of Spring-based applications. Spring Boot reduces the amount of boilerplate code that needs to be written during the development process by providing a series of principles where convention is better than configuration, enabling developers to focus more on writing business logic.
[0046] Dynamic class loading technology: Dynamically load classes into the JVM (Java Virtual Machine) at runtime without the need to recompile or restart the application. This technology enhances the flexibility and scalability of Java applications, enabling Java programs to adapt to changing requirements.
[0047] Velocity template engine: Used to combine templates and data to generate dynamic content such as HTML web pages, text documents, etc. The design goal of Velocity is to be simple, flexible, and easy to integrate into existing Java applications.
[0048] launch4j: An open-source tool for packaging Java applications into Windows executable files. It can package JAR files and the necessary JVM into an EXE file, simplifying the distribution and execution process of Java applications and is suitable for quickly deploying Java applications.
[0049] The embodiments of this application are applicable to non-technical personnel to quickly and low-costly deploy applications in scenarios such as exhibitions and demonstrations. The existing docker containerization-based deployment solution has the advantages of strong versatility and no need to modify the application itself, but the disadvantages are high technical requirements, high resource requirements, and possible network limitations in some environments. When there are many external dependencies, the deployment of the application is complex and time-consuming, which is not suitable for business scenarios such as exhibitions or product promotion demonstrations that require quick and low-cost deployment and display. The embodiments of this application are targeted at specific scenarios of exhibitions or product promotion demonstrations. Based on the Spring Boot framework, it integrates front-end resources and the source code of the back-end business with mocked external interface dependencies in the base. It uses in-memory middleware such as embedded in-memory databases or self-developed components to replace independent middleware services, with extremely low requirements for the hardware resources of the deployment environment and no network requirements. By packaging the demonstration application into a Windows system executable file, non-technical business personnel can quickly complete the deployment and display the application on ordinary office computers.
[0050] The purpose of the embodiments of this application is to quickly deploy a demonstration application program, and the process is divided into three links: demonstration program construction, executable program construction, and demonstration.
[0051] Link 1: The structure of the constructed demonstration program is as Figure 2 shown. Build a monolithic application base based on Spring Boot and integrate the source code of business capabilities and related replacement components in the base: 1) In-memory database: Replace the traditional relational database to avoid dependence on an independent database process.
[0052] 2) Third-party service simulation component: Configure the response data of the third-party interface. It can be configured with fixed text or data templates. Calling this component in the business capability source code can avoid dependence on third-party services.
[0053] 3) Middleware simulation components: For components that the application must rely on and have no alternatives, sort out the dependent functional interfaces and implement them in a pure memory (or rely on H2 database) manner; componentize the simulation capabilities for easy reuse; for example, for common interface capabilities such as blockchain on-chain, block query, and transaction query, they are simulated and implemented based on the database to form a blockchain simulation component.
[0054] 4) Backend business capability source code: Based on the original application backend source code, the database access code is adapted to the H2 database. For calls to third-party interfaces, the interface-oriented programming concept is adopted to call external interface Mock components. The backend business capability source code can also be rewritten according to business conditions to no longer access specific middleware services. For example, the demonstration environment does not require redis distributed locks, and the redis distributed lock-related code can be directly deleted to avoid dependence on redis.
[0055] 5) Front-end capability source code: can remain unchanged.
[0056] Step 2: Executable program construction, such as Figure 3 As shown. Package the demonstration program in step 1 into a Spring Boot JAR package, and then use Launch4j to encapsulate the JAR package into an .exe executable program.
[0057] Session 3: Application Demonstration, such as Figure 4 As shown, copy the .exe executable program built in step 2 to your personal computer, double-click to start the Spring Boot service, open the browser and enter the page address to access the page.
[0058] It can be seen that the embodiment of the present application eliminates the application's dependence on the third-party environment by comprehensively using technical means such as in-memory database, mock remote interface, and development middleware core capability simulation components. After being encapsulated as an .exe executable file using launch4j, non-technical personnel can also quickly deploy and start the demonstration program. In the demonstration scenario of product promotion, the existing method of deploying complete applications based on docker has the advantages of complete functions and no need to change the source code, but it has disadvantages such as high resource requirements, long deployment time, high cost, network restrictions, and the environment cannot be reused (assuming that a unified demonstration environment cannot be accessed due to network restrictions). The embodiment of the present application uses the above-mentioned technical means in combination, and the demonstration application can be run on an ordinary laptop computer without technical requirements, which is more suitable for demonstration scenarios such as pre-sales product promotion.
[0059] Based on the same principle as the method provided in the embodiments of the present application, the embodiments of the present application also provide a product deployment and display device 500 in a demonstration scenario, which is applied to a device deploying the Spring Boot framework. The Spring Boot framework includes at least one simulation component for simulating a third-party service, such as Figure 5 As shown, the device includes: An acquisition module 501, configured to receive a reconstruction request for product source code from a client and acquire the product source code; A first processing module 502, configured to reconstruct the product source code based on the simulation component to obtain a reconstructed target source code; A second processing module 503, configured to package the target source code in a preset packaging format and then deploy it on a display device for product demonstration.
[0060] In some embodiments, the simulation component includes one or more of the following: A first component, including an in-memory database, for simulating the storage and / or query functions of a third-party database; A second component, including an internal interface for simulating a third-party interface; A third component, including an internal middleware for simulating the functions of a third-party middleware.
[0061] In some embodiments, the first processing module is specifically configured to: Based on the first component, replace the access logic for the third-party database in the product source code with the access logic for the in-memory database; and / or Based on the second component, replace the interface call logic for the third-party interface in the product source code with the interface call logic for the internal interface; and / or Based on the third component, replace the call logic for the third-party middleware in the product source code with the call logic for the in-memory middleware.
[0062] In some embodiments, the second component simulates the functions of the third-party interface through preset fixed-text response data and / or dynamic response data generated based on a data template.
[0063] In some embodiments, the third component simulates the functions of the third-party middleware through an in-memory data structure and / or an in-memory database; wherein, the in-memory data structure is used to simulate the data processing logic of the third-party middleware.
[0064] In some embodiments, the second processing module is specifically configured to: Package the target source code into an executable program package; Encapsulate the executable program package into a format suitable for running on the display device, and deploy the encapsulated executable program package on the display device for product deployment and display in a demonstration scenario.
[0065] The product deployment and display device in the demonstration scenario provided by the embodiments of the present application can implement Figures 1 to 4 each process implemented in the method embodiment. To avoid repetition, it will not be elaborated here.
[0066] The product deployment and display device in the demonstration scenario provided by the present application realizes the rapid deployment and display of products in the demonstration scenario by introducing a simulation component in the Spring Boot framework. Specifically, the system can reconstruct the product source code through the simulation component without relying on external services, and encapsulate and deploy the reconstructed target source code, thus greatly simplifying the deployment process, reducing the dependence on the network and external resources, and improving the deployment efficiency. The technical solution provided by the embodiments of the present application enables products to be rapidly and efficiently deployed in business scenarios such as exhibitions and demonstrations that require rapid and low-cost display, meets the needs of immediate display and promotion, and effectively solves the limitations of traditional deployment methods in network-constrained environments.
[0067] The product deployment and display device in the demonstration scenario of the embodiments of the present application can execute the product deployment and display method provided by the embodiments of the present application, and its implementation principle is similar. The actions performed by each module and unit in the product rapid deployment and display device in the demonstration scenario of each embodiment of the present application correspond to the steps in the product rapid deployment and display method in the embodiments of the present application. For the detailed function description of each module of the product rapid deployment and display device in the demonstration scenario, reference can specifically be made to the description in the corresponding product rapid deployment and display method shown in the foregoing text, and it will not be elaborated here.
[0068] Based on the same principle as the method shown in the embodiments of the present application, the embodiments of the present application also provide an electronic device, which may include but is not limited to: a processor and a memory; the memory is used to store a computer program; the processor is used to execute the product deployment and display method shown in any optional embodiment of the present application by calling the computer program. Compared with the prior art, the product deployment and display method provided by the present application realizes the rapid deployment and display of products in a demonstration scenario by introducing a simulation component in the Spring Boot framework. Specifically, the system can reconstruct the product source code through the simulation component without relying on external services, and package and deploy the reconstructed target source code, thereby greatly simplifying the deployment process, reducing the dependence on the network and external resources, and improving the deployment efficiency. The technical solution provided by the embodiments of the present application enables products to be rapidly and efficiently deployed in business scenarios such as exhibitions and demonstrations that require rapid and low-cost display, meets the needs of immediate display and promotion, and effectively solves the limitations of traditional deployment methods in network-constrained environments.
[0069] In an optional embodiment, an electronic device is also provided, as Figure 6 shown Figure 6 The electronic device 6000 shown includes: a processor 6001 and a memory 6003. Among them, the processor 6001 and the memory 6003 are connected, such as connected through a bus 6002. Optionally, the electronic device 6000 may further include a transceiver 6004, and the transceiver 6004 may be used for data interaction between the electronic device and other electronic devices, such as sending and / or receiving data, etc. It should be noted that in actual applications, the transceiver 6004 is not limited to one, and the structure of the electronic device 6000 does not constitute a limitation on the embodiments of the present application.
[0070] The processor 6001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute various exemplary logical blocks, modules, and circuits described in connection with the disclosure of the present application. The processor 6001 may also be a combination that implements a computing function, such as a combination including one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0071] The bus 6002 may include a path for transmitting information between the above components. The bus 6002 can be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus 6002 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 only a thick line is used in Figure 6 , but it does not mean that there is only one bus or one type of bus.
[0072] The memory 6003 can be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or it can also be an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory), or other optical disc storage, optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium that can be used to carry or store computer programs and can be read by a computer, which is not limited here.
[0073] The memory 6003 is used to store the computer program for implementing the embodiments of the present application and is controlled by the processor 6001 to execute. The processor 6001 is used to execute the computer program stored in the memory 6003 to implement the steps shown in the foregoing method embodiments.
[0074] Among them, the electronic device includes but is not limited to: mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Tablet Computers), PMPs (Portable Multimedia Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The shown electronic device is only an example and should not bring any limitation to the functions and usage scope of the embodiments of the present application.
[0075] The embodiments of the present application provide a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps and corresponding contents shown in the foregoing method embodiments can be implemented.
[0076] The embodiment of the present application also provides a computer program product, including a computer program, which can implement the steps and corresponding content of the foregoing method embodiment when executed by a processor.
[0077] The terms "first", "second", "third", "fourth", "1", "2", etc. (if any) in the specification, claims and the above-mentioned drawings of the present application are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present application described herein can be implemented in an order other than that shown or described in words.
[0078] It should be understood that although the flowchart of the embodiment of the present application indicates each operation step by an arrow, the execution order of these steps is not limited to the order indicated by the arrow. Unless there is a clear description in this article, in some implementation scenarios of the embodiment of the present application, the implementation steps in each flowchart can be executed in other orders according to requirements. In addition, some or all of the steps in each flowchart may include multiple sub-steps or multiple stages based on the actual implementation scenario. Some or all of these sub-steps or stages can be executed at the same time, and each sub-step or stage among these sub-steps or stages can also be executed at different times respectively. In the scenario where the execution times are different, the execution order of these sub-steps or stages can be flexibly configured according to requirements, and the embodiment of the present application does not limit this.
[0079] The above are only optional implementation manners of some implementation scenarios of the present application. It should be noted that for those of ordinary skill in the art, without departing from the technical concept of the solution of the present application, using other similar implementation means based on the technical idea of the present application also belongs to the protection scope of the embodiments of the present application.
Claims
1. A method for product deployment and display in a demonstration scenario, applied to a device that deploys a Spring Boot framework, characterized in that: The Spring Boot framework includes at least one simulation component for simulating third-party services. The method comprises: Receiving a reconstruction request from a client for a product source code, and obtaining the product source code; Based on the simulation component, reconstructing the product source code to obtain a reconstructed target source code; After the target source code is packaged according to a preset packaging format, it is deployed on a display device for product demonstration.
2. The method for product deployment and display in a demonstration scenario according to claim 1, characterized in that: The simulation components include one or more of the following: A first component includes an in-memory database for simulating storage and / or query functions of a third-party database; a second component including an internal interface for emulating a third-party interface; The third component includes internal middleware for simulating the functions of third-party middleware.
3. The method for product deployment and display in a demonstration scenario according to claim 2, characterized in that: The reconstructing the product source code based on the simulation component includes: Based on the first component, replacing the access logic for the third-party database in the product source code with the access logic for the in-memory database; and / or, Based on the second component, replacing the interface call logic for the third-party interface in the product source code with the interface call logic for the internal interface; and / or, Based on the third component, the calling logic for the third-party middleware in the product source code is replaced with the calling logic for the memory middleware.
4. The method for product deployment and display in a demonstration scenario according to claim 2 or 3, characterized in that: The second component simulates the function of the third-party interface through preset fixed text response data and / or dynamic response data generated based on a data template.
5. The method for product deployment and display in a demonstration scenario according to claim 2 or 3, characterized in that: The third component simulates the third-party middleware function through a memory data structure and / or a memory database; wherein the memory data structure is used to simulate the data processing logic of the third-party middleware.
6. The method for product deployment and display in a demonstration scenario according to claim 1, characterized in that: After packaging the target source code according to a preset packaging format, the target source code is deployed on a display device to quickly deploy and display the product in a demonstration scenario, including: Packing the target source code into an executable program package; The executable program package is packaged into a format suitable for running on the display device, and the packaged executable program package is deployed on the display device to perform rapid deployment and display of the product in a demonstration scenario.
7. A product deployment and display device in a demonstration scenario, applied to a device for deploying a Spring Boot framework, characterized in that: The Spring Boot framework includes at least one simulation component for simulating a third-party service, and the device includes: An acquisition module, used to receive a reconstruction request from a client for a product source code, and acquire the product source code; A first processing module, configured to reconstruct the product source code based on the simulation component to obtain a reconstructed target source code; The second processing module is used to package the target source code according to a preset packaging format and deploy it on a display device for product demonstration.
8. An electronic device, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the method according to any one of claims 1 to 6 is implemented when the processor executes the program.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Product display method, device and equipment and computer readable storage medium
CN110515906A