Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present invention are shown in the drawings.
Example 1
Fig. 1 is a flowchart of a method for publishing an electronic product according to an embodiment of the present invention, where the method is applicable to a case where an enterprise publishes and manages product data, and the method may be performed by a publishing device of the electronic product, where the device may be implemented by software and/or hardware and may be generally integrated in a computer device, and specifically includes the following steps:
Step 110, displaying a visualized electronic product construction page, wherein the electronic product construction page comprises at least one hierarchy of product information setting items and/or input items.
In this step, the electronic product build page defines a page of product data for the product developer. Optionally, displaying the electronic product building page may include: and responding to a page loading request of the electronic product construction page, and acquiring the electronic product construction page from the server.
The page loading request may be an access request to a website, or a service function starting request triggered by a functional control such as a hyperlink, etc. The method comprises the steps that a product developer can trigger a page loading request through manually operating an entity key or a virtual button provided by client equipment, the client equipment sends the page loading request to a server, and the server acquires an electronic product construction page matched with the page loading request from cached page data according to page information specified in the page loading request.
In this embodiment, the electronic product building page divides a plurality of product levels in advance according to the product attribute range, and corresponding product information setting items and input items are deployed under each product level.
The electronic product construction page is divided into three levels of province, city and county in advance according to the range of the sales area, and corresponding sub-areas, namely product information setting items, such as Guangdong province, shenzhen city and the like are deployed under each level. In addition, the electronic product construction page also deploys an input item under each hierarchy, so that product developers can input sales areas in the input item in a customized manner.
And 120, generating target product data in response to product information input and/or selected by a user in the electronic product construction page.
In this embodiment, the user may be a product developer. Optionally, the user may select a pre-deployed product information setting item in the electronic product building page, or input product information in the input item in a user-defined manner, and then generate corresponding product data, that is, target product data, according to the product information confirmed by the user.
And 130, publishing the target product data to an application local cache matched with an application component to instruct the application component to use the target product data by accessing the application local cache.
In this embodiment, the application component is an application program that uses the target product data. After generating the target product data, the target product data is released to the memory of the application end bearing the application component, wherein the memory of the application end bearing the application component is the application local cache matched with the application component.
Optionally, the target product data may be sent to the application local cache through a short-distance wireless communication mechanism (such as a bluetooth module), or may be sent to the application local cache through a long-distance wireless communication mechanism (such as WIFI and mobile data).
Therefore, the separation of the target product data and the application component can be realized by generating the target product data in the electronic product construction page and releasing the target product data to an application local cache matched with the application component, and the application component can provide uninterrupted business service even if the target product data is in the updating process; and secondly, the application component can use the target product data by accessing the local cache without accessing the database, so that the problem that the efficiency of reading the product data by the application component is low due to the low response speed of the database when the application component accesses the database is avoided.
In this embodiment, optionally, the target product data is published to an application local cache matched with the application component, and a unified product data query interface is provided for the application component, so that the application component obtains and uses the target product data from the matched application local cache through the product data query interface.
Therefore, the application components are provided with the product data query interfaces, so that the application components can unify the use modes of the application components on the product data, and the use difficulty of the application components on the product data is reduced.
In one implementation manner of the embodiment of the present invention, publishing the target product data to an application local cache matched with an application component includes: transmitting the target product data to an application local cache matched with an application component in real time; and/or sending the target product data to an application local cache matched with the application component in a file transmission mode.
The target product data can be transmitted to an application local cache matched with the application component in real time in a network communication mode, so that timeliness of the application component for acquiring the target product data is guaranteed; or the target product data is sent to an application local cache matched with the application component in a file transmission mode, so that the transmission efficiency of the target product data and the reliability of the transmission process can be improved, and the problem of losing the target product data in the transmission process is avoided.
According to the technical scheme, the visualized electronic product construction page is displayed, the target product data is generated in response to product information input and/or selected by a user in the electronic product construction page, and the target product data is issued to an application local cache matched with an application component so as to instruct the application component to use the target product data by accessing the application local cache. The technical scheme of the embodiment of the invention can avoid the problem that the application component needs to suspend service when the product data is released or updated; the problem that the response speed of the database is low when the application component accesses the database can be avoided by using the local cache to replace the database, and the reading efficiency of the application component to the product data is improved.
Example two
The present embodiment is a further refinement of the foregoing embodiments, and the same or corresponding terms as those of the foregoing embodiments are explained, which are not repeated herein. Fig. 2 is a flowchart of a method for publishing an electronic product according to a second embodiment, in this embodiment, a technical solution of the present embodiment may be combined with one or more methods in the solutions of the foregoing embodiments, as shown in fig. 2, where the method provided in this embodiment may further include:
Step 210, displaying a visualized electronic product construction page, wherein the electronic product construction page comprises at least one level of product information setting items and/or input items.
And 220, responding to a product type setting request of a user, and displaying at least one product type in the electronic product construction page.
In this step, the product type is used to reflect the broader and obvious characteristics of the product, e.g., the product type may be used to describe the lifetime of the product, including both short-term use and long-term use.
And 230, responding to the target product type selected by the user, and displaying a product model matched with the target product type, wherein the product model comprises at least one product attribute.
In this step, the product attributes are descriptive names of specific features included in the product, and the plurality of product attributes together form the product model. For example, when the user selected target product type is a short-term use product, the matched product model may be a short-term product model.
The short-term product model may include at least one product attribute, such as a value attribute, a validity attribute, a sales attribute, and the like, and each product attribute may include at least one product sub-attribute.
For example, when a product attribute is a value attribute, the product attribute may include a product price and a product discount; when the product attribute is a validity attribute, the product attribute may include a product start sales date and a product expiration sales date; when the product attribute is a sales attribute, the product attribute may include a sales channel, a sales area, and the like.
Step 240, generating target product data in response to product information input and/or selected by the user for each of the product attributes.
In this step, the electronic product construction page deploys corresponding product information setting items in each product attribute and the included sub-attributes in advance. The user can select a pre-deployed product information setting item in the electronic product construction page, or assign a value to the product attribute in the input item in a self-defined manner to obtain product information, and then generate corresponding product data, namely target product data, according to the product information confirmed by the user. For example, when the product attribute is a product start sales date, it is used to customize the input date in the input item, such as 1 month and 1 day 2020.
Therefore, by establishing a relatively stable product model, a user can conveniently define product data according to the product model, and further development time of a product is shortened.
Step 250, storing the target product data in a product database according to the belonging product model, so that the product database maintains and manages the generated product data under the product model.
In this embodiment, after generating the target product data, the target product data is stored in a product database according to the belonging product model. Optionally, the product database obtains other product data stored under the product model according to the product model, takes the other product data as product data associated with the target product data, and then constructs a relation between the target product data and the associated product data, so that the product database uniformly maintains and manages the target product data and the associated product data according to the relation between the target product data and the associated product data.
Therefore, the target product data is stored in the product database according to the belonged product model, unified maintenance and management of the target product data and the associated product data by the product database can be realized, the management difficulty of the product data is reduced, and the management efficiency of the product data is improved.
Step 260, publishing the target product data to an application local cache matched with an application component, so as to instruct the application component to use the target product data by accessing the application local cache.
In one implementation manner of the embodiment of the present invention, after publishing the target product data to an application local cache matched with an application component, the method further includes: when the updating of the target product data in the product database is detected, the updated target product data is read; and publishing the updated target product data to an application local cache matched with the application component so as to instruct the application component to use the updated target product data by accessing the application local cache.
Therefore, by detecting whether the target product data in the product database is updated or not and when the target product data is updated, the updated target product data is issued to the application local cache, the application component can be prevented from using wrong product data, and the reliability of the product data used by the application component can be improved.
According to the technical scheme, the visualized electronic product construction page is displayed, at least one product type is displayed in the electronic product construction page in response to a product type setting request of a user, then a product model matched with the target product type is displayed in response to a target product type selected by the user, product information which is input and/or selected by each product attribute included in the product model is responded to the user, target product data are generated, finally the target product data are stored in a product database according to the product model to which the target product data belong, and the target product data are issued to an application local cache matched with an application component so as to instruct the application component to use the target product data by accessing the application local cache. The technical scheme of the embodiment of the invention can avoid the problem that the application component needs to suspend service when the product data is released or updated, improves the reading efficiency of the application component on the product data, shortens the development time of the product, and reduces the management difficulty of the product data.
Example III
The present embodiment is a further refinement of the foregoing embodiments, and the same or corresponding terms as those of the foregoing embodiments are explained, which are not repeated herein. Fig. 3 is a flowchart of a method for publishing an electronic product according to the third embodiment, in this embodiment, the technical solution of the present embodiment may be combined with one or more methods in the solutions of the foregoing embodiments, as shown in fig. 3, where the method provided in this embodiment may further include:
step 310, displaying a visualized electronic product construction page, wherein the electronic product construction page comprises at least one hierarchy of product information setting items and/or input items.
And 320, responding to a product type setting request of a user, and displaying at least one product type in the electronic product construction page.
And 330, responding to the target product type selected by the user, and displaying a product model matched with the target product type, wherein the product model comprises at least one product attribute.
Step 340, generating target product data in response to product information input and/or selected by the user for each of the product attributes.
And 350, storing the target product data in a product database according to the product model to enable the product database to maintain and manage the generated product data under the product model.
And step 360, returning each product data under the product model stored in the product database to the electronic product construction page so that the electronic product construction page displays each product data.
In this step, optionally, a data acquisition control for connecting to a product database may be set in the electronic product building page, and each product data under the product model may be acquired from the product database through the data acquisition control, where each product data under the product model includes the target product data and the associated product data.
Therefore, the electronic product construction page displays the product data under the product model, so that a user can clearly see the relation among the product data under the product model, and the user can manage the product data conveniently.
In one implementation manner of the embodiment of the present invention, returning each product data under the product model stored in the product database to the electronic product building page, so that the electronic product building page displays each product data, including: and returning each product data under the product model stored in the product database to the electronic product construction page so that the electronic product construction page generates and displays a product view corresponding to the product model according to each product data and the product model.
In this embodiment, the electronic product construction page generates a matched product view according to each product data and a corresponding product model, and responds to a view viewing request of a user to display the product view to the user. The product view comprises all products under the product model and the association relation among the products.
Therefore, the electronic product is constructed to generate the product view, so that accurate page data support can be provided for a user when the user develops the product, repeated work in the product development process is reduced, and the product development efficiency of the user is improved.
And step 370, publishing the target product data to an application local cache matched with an application component to instruct the application component to use the target product data by accessing the application local cache.
According to the technical scheme, the visualized electronic product construction page is displayed, at least one product type is displayed in the electronic product construction page in response to a product type setting request of a user, then a product model matched with the target product type is displayed in response to a target product type selected by the user, target product data is generated in response to product information input and/or selected by the user on each product attribute included in the product model, then the target product data is stored in a product database according to the corresponding product model, each product data stored in the product database under the product model is returned to the electronic product construction page, so that each product data is displayed by the electronic product construction page, and finally the target product data is released to an application local cache matched with an application component to instruct the application component to use the target product data by accessing the application local cache. The technical scheme of the embodiment of the invention can provide accurate page data support for users when developing products, reduce repeated work in the product development process, avoid the problem that an application component needs to suspend service when the product data is released or updated, improve the reading efficiency of the application component on the product data, shorten the development time of the products and reduce the management difficulty of the product data.
Example IV
Fig. 4 is a flowchart of a method for using an electronic product according to a fourth embodiment of the present invention, where the method may be applied to a case where an application component uses product data, and the method may be performed by a device for using an electronic product, where the device may be implemented by software and/or hardware, and may be generally integrated in a computer device, and specifically includes the following steps:
in step 410, the application component sends a product data query request to the matched application local cache through the product data query interface.
The application local cache stores product data generated and released by a user through a visualized electronic product construction page.
In this embodiment, when the application local cache obtains product data generated and released by the user through the visual electronic product building page, the application component also obtains a unified product data query interface, and the application component can send a product data query request to the matched application local cache through the product data query interface.
Therefore, the coupling degree between the product data and the application component can be reduced by storing the product data generated and released by the user through the visualized electronic product construction page in the application local cache, separation of the product data and the application component is realized, and the application component does not need to pause service even if the product data is in the updating process, so that the operation efficiency of the application component is improved.
And step 420, an application component receives the target product data fed back by the application local cache aiming at the product data query request and provides product service matched with the target product data.
In this step, optionally, after the local cache obtains the product data query request, according to the product attribute specified in the product data query request, the target product data matched with the product attribute is obtained, and the target product data is fed back to the application component, so that the application component uses the target product data.
Therefore, the application component can use the target product data by accessing the local cache without accessing the database, and the problem that the efficiency of reading the product data by the application component is low due to the fact that the response speed of the database is low when the application component accesses the database is avoided.
In one implementation manner of the embodiment of the present invention, optionally, the receiving, by the application component, the target product data fed back by the application local cache for the product data query request includes: and the application component receives updated target product data determined by the application local cache aiming at the product data query request.
When the application local cache detects that the target product data is updated, the application local cache can set the old target product data as invalid data, and then feeds the updated target product data back to the application component so as to prompt the application component to use the updated target product data.
Therefore, by setting the old target product data as invalid data and feeding back the updated target product data to the application component, the application component can be prevented from using wrong product data, and the reliability of the product data used by the application component is improved.
According to the technical scheme, the product data query interface is used for sending a product data query request to the matched application local cache, receiving target product data fed back by the application local cache aiming at the product data query request, and providing product service matched with the target product data. The technical scheme of the embodiment of the invention can reduce the coupling degree between the product data and the application component, improve the operation efficiency of the application component, and can avoid the problem of slower response speed of the database when the application component accesses the database by utilizing the local cache to replace the database, thereby improving the reading efficiency of the application component to the product data.
Example five
Fig. 5 is a block diagram of a publishing device for electronic products according to a fifth embodiment of the present invention, where the device includes: a page presentation module 510, a product data generation module 520, and a product data publication module 530.
The page display module 510 is configured to display a visualized electronic product construction page, where the electronic product construction page includes at least one level of product information setting items and/or input items; a product data generating module 520, configured to generate target product data in response to product information input and/or selected by a user in the electronic product construction page; and a product data publishing module 530 configured to publish the target product data to an application local cache matched with an application component, so as to instruct the application component to use the target product data by accessing the application local cache.
According to the technical scheme, the visualized electronic product construction page is displayed, the target product data is generated in response to product information input and/or selected by a user in the electronic product construction page, and the target product data is issued to an application local cache matched with an application component so as to instruct the application component to use the target product data by accessing the application local cache. The technical scheme of the embodiment of the invention can avoid the problem that the application component needs to suspend service when the product data is released or updated; the problem that the response speed of the database is low when the application component accesses the database can be avoided by using the local cache to replace the database, and the reading efficiency of the application component to the product data is improved.
Based on the above embodiments, the product data generating module 520 may include:
the product type display unit is used for responding to a product type setting request of a user and displaying at least one product type in the electronic product construction page;
the product model display unit is used for responding to a target product type selected by a user and displaying a product model matched with the target product type, wherein the product model comprises at least one product attribute;
the product information response unit is used for responding to the product information which is input and/or selected by the user on each product attribute and generating target product data;
the product data storage unit is used for storing the target product data in a product database according to the product model to which the target product data belong, so that the product database maintains and manages the generated product data under the product model;
the product data display unit is used for returning each product data under the product model stored in the product database to the electronic product construction page so that the electronic product construction page displays each product data;
And the product view display unit is used for returning all the product data under the product model stored in the product database to the electronic product construction page so that the electronic product construction page generates and displays a product view corresponding to the product model according to all the product data and the product model.
The product data distribution module 530 may include:
the product data detection unit is used for reading the updated target product data when detecting that the target product data in the product database is updated;
the updated data sending unit is used for publishing the updated target product data to an application local cache matched with the application component so as to instruct the application component to use the updated target product data by accessing the application local cache;
the real-time transmission unit is used for transmitting the target product data to an application local cache matched with the application component in real time;
and the file transmission unit is used for transmitting the target product data to an application local cache matched with the application component in a file transmission mode.
The publishing device of the electronic product provided by the embodiment of the invention can execute the publishing method of the electronic product provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the executing method.
Example six
Fig. 6 is a block diagram of a device for using an electronic product according to a sixth embodiment of the present invention, where the device includes: a query request sending module 610 and a target product data receiving module 620.
The query request sending module 610 is configured to send, through the product data query interface, a product data query request to the matched application local cache; the application local cache stores product data generated and released by a user through a visualized electronic product construction page; and the target product data receiving module 620 is configured to receive target product data fed back by the application local cache for the product data query request, and provide a product service matched with the target product data.
According to the technical scheme, the product data query interface is used for sending a product data query request to the matched application local cache, receiving target product data fed back by the application local cache aiming at the product data query request, and providing product service matched with the target product data. The technical scheme of the embodiment of the invention can reduce the coupling degree between the product data and the application component, improve the operation efficiency of the application component, and can avoid the problem of slower response speed of the database when the application component accesses the database by utilizing the local cache to replace the database, thereby improving the reading efficiency of the application component to the product data.
Based on the above embodiments, the target product data receiving module 620 may include:
and the updated data receiving unit is used for receiving updated target product data determined by the application local cache aiming at the product data query request.
The device for using the electronic product provided by the embodiment of the invention can execute the method for using the electronic product provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example seven
Fig. 7 is a schematic structural diagram of a computer device according to a seventh embodiment of the present invention, where, as shown in fig. 7, the computer device includes a processor 710, a memory 720, an input device 730, and an output device 740; the number of processors 710 in the computer device may be one or more, one processor 710 being illustrated in fig. 7; the processor 710, memory 720, input means 730, and output means 740 in the computer device may be connected by a bus or other means, for example in fig. 7.
The memory 720 is a computer-readable storage medium, and may be used to store a software program, a computer-executable program, and modules, such as program instructions/modules corresponding to a method for issuing an electronic product in an embodiment of the present invention (e.g., the page display module 510, the product data generation module 520, and the product data issuing module 530 in an electronic product issuing apparatus). The processor 710 executes various functional applications of the computer device and data processing by executing software programs, instructions and modules stored in the memory 720, i.e., implements a method of distributing an electronic product as described above. That is, the program, when executed by the processor, implements:
Displaying a visualized electronic product construction page, wherein the electronic product construction page comprises at least one level of product information setting items and/or input items;
generating target product data in response to product information input and/or selected by a user in the electronic product construction page;
and publishing the target product data to an application local cache matched with an application component so as to instruct the application component to use the target product data by accessing the application local cache.
The memory 720 is a computer readable storage medium, and may be further used to store program instructions/modules corresponding to a method of using an electronic product according to an embodiment of the present invention (for example, the query request sending module 610 and the target product data receiving module 620 in a device for using an electronic product). The processor 710 executes various functional applications of the computer device and data processing by running software programs, instructions and modules stored in the memory 720, i.e., implements a method of using an electronic product as described above. That is, the program, when executed by the processor, implements:
the application component sends a product data query request to the matched application local cache through the product data query interface;
The application local cache stores product data generated and released by a user through a visualized electronic product construction page;
and the application component receives the target product data fed back by the application local cache aiming at the product data query request and provides product service matched with the target product data.
Memory 720 may include primarily a program storage area and a data storage area, wherein the program storage area may store an operating system, at least one application program required for functionality; the storage data area may store data created according to the use of the terminal, etc. In addition, memory 720 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 non-volatile solid-state storage device. In some examples, memory 720 may further include memory located remotely from processor 710, which may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 730 may be used to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the computer device, which may include a keyboard, mouse, and the like. The output device 740 may include a display device such as a display screen.
Example eight
An eighth embodiment of the present invention further provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method according to any embodiment of the present invention. Of course, the computer readable storage medium provided by the embodiment of the present invention may perform the related operations in the method for publishing an electronic product provided by any embodiment of the present invention. That is, the program, when executed by the processor, implements:
displaying a visualized electronic product construction page, wherein the electronic product construction page comprises at least one level of product information setting items and/or input items;
generating target product data in response to product information input and/or selected by a user in the electronic product construction page;
and publishing the target product data to an application local cache matched with an application component so as to instruct the application component to use the target product data by accessing the application local cache.
The embodiment of the invention provides a computer readable storage medium, which can also execute related operations in the use method of the electronic product provided by any embodiment of the invention. That is, the program, when executed by the processor, implements:
The application component sends a product data query request to the matched application local cache through the product data query interface;
the application local cache stores product data generated and released by a user through a visualized electronic product construction page;
and the application component receives the target product data fed back by the application local cache aiming at the product data query request and provides product service matched with the target product data.
From the above description of embodiments, it will be clear to a person skilled in the art that the present invention may be implemented by means of software and necessary general purpose hardware, but of course also by means of hardware, although in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, etc., and include several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments of the present invention.
It should be noted that, in the embodiment of the issuing device of the electronic product and the using device of the electronic product, each unit and module included are only divided according to the functional logic, but are not limited to the above-mentioned division, so long as the corresponding functions can be realized; in addition, the specific names of the functional units are also only for distinguishing from each other, and are not used to limit the protection scope of the present invention.
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.