Order message generation method and device, equipment and storage medium

Ordering messages are assembled and encapsulated through process rules factory and template methods to generate virtual product IDs, solving the problems of bloat and complexity of the tool class, and realizing the general order message generation method and the relationship between products and sales.

CN120219022APending Publication Date: 2025-06-27GUANGDONG ESHORE TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311812450.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-26
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

In the business acceptance system, as the number of products and sales increases, the order submission logic becomes complicated, and the tool-type encapsulation method leads to inconsistent message format and fields, resulting in bloated tool-type and complex judgment, and intermediate parameters cannot be delivered in context, affecting the generation of order messages.

Method used

Through the process rules factory, the ordering message is assembled and processed, and the virtual product ID is generated, and the packaging process is carried out through the preset product template method and the abstract factory to generate product order message and sales product message, avoiding the static packaging method of setting different tool classes based on different products and sales products.

Benefits of technology

It realizes a general method of generating product order messages and sales product messages, simplifies the transmission of the relationship between products and sales products, reduces the complexity and packaging logic of tool classes, and improves the efficiency and scalability of order messages generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120219022A_ABST
    Figure CN120219022A_ABST
Patent Text Reader

Abstract

The invention provides an order message generation method and device, equipment and a storage medium, and the method comprises the steps: obtaining an order message, the order message comprises product information and sales product information, carrying out the information assembly processing of the order message through a flow rule factory, obtaining an information assembly processing result, and transmitting the information assembly processing result to a server; according to the embodiment of the invention, the first packaging processing is performed through the preset product template method, the virtual product ID and the product ordering parameter to obtain the product order message, and the second packaging processing is performed through the abstract factory, the virtual product ID and the sales product ordering parameter to obtain the sales product message, so that a static packaging method of different tool classes does not need to be set based on different products and sales products; a universal product order message and sales product message generation method is provided; the virtual product ID is generated to associate the product information and the sales product information, so that the association relationship between the product and the sales product can be known through the product order message and the sales product message, and the method is simple and convenient.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of messages, and in particular, to a method, apparatus, device, and storage medium for generating order messages. Background Art

[0002] In a service acceptance system, as the number of sold products and sales items gradually increases, the business logic for encapsulating product order submissions becomes increasingly complex, and the number of message data blocks that need to be encapsulated in the order also increases. There are dependencies between some business products, and there are ordering relationships between products and sales items. In the order submission logic, some products need to perform preliminary calculation logic to express and generate virtual dependencies. To facilitate the unified assembly of messages for the order submission model, a utility class is usually encapsulated for assembling module data. However, since the message formats and fields of different products and sales items are different, if the business order uses the utility class encapsulation method to process order message data, there will be multiple static encapsulation methods for order formats in the order submission logic, resulting in a bloated utility class, complex judgment, and the inability to pass intermediate parameters of the calculation logic contextually, ultimately affecting the generation of order messages. Summary of the Invention

[0003] Embodiments of this application provide a method, apparatus, device, and storage medium for generating order messages to solve at least one problem existing in the related art. The technical solutions are as follows:

[0004] In a first aspect, an embodiment of this application provides a method for generating an order message, including:

[0005] Obtain an order message; the order message includes product information and sales item information;

[0006] Perform information assembly processing on the order message through a process rule factory to obtain an information assembly processing result; the information assembly processing result includes product order parameters, sales item order parameters, and a virtual product ID that associates the product information and the sales item information;

[0007] Perform a first encapsulation process through a preset product template method, the virtual product ID, and the product order parameters to obtain a product order message, and perform a second encapsulation process through an abstract factory, the virtual product ID, and the sales item order parameters to obtain a sales item message.

[0008] In an implementation, the performing information assembly processing on the order message through a process rule factory to obtain an information assembly processing result includes:

[0009] Perform information processing on the order message through an information processing class of the process rule factory to obtain an information processing result;

[0010] The middle - desk order - throwing information assembly processing class of the process rule factory assembles and processes the information processing result to obtain an information assembly processing result.

[0011] In one implementation, the order message further includes basic information, scenario information, commodity information, business information, public information, and extended information. The information processing class of the process rule factory processes the order message, and the obtained information processing result includes:

[0012] The basic information processing class processes the basic information to obtain a first processing result;

[0013] The scenario processing class processes the scenario information to obtain a second processing result;

[0014] The extended information processing class processes the extended information to obtain a third processing result;

[0015] The commodity processing class processes the commodity information to obtain a fourth processing result;

[0016] The sales product processing class processes the sales product information to obtain a fifth processing result;

[0017] The business information processing class processes the business information to obtain a sixth processing result;

[0018] The product information processing class processes the product information to obtain a seventh processing result;

[0019] The public information processing class processes the public information to obtain an eighth processing result;

[0020] Among them, each type of processing class in the information processing class has a preset processing step.

[0021] In one implementation, the middle - desk order - throwing information assembly processing class of the process rule factory assembles and processes the information processing result, and the obtained information assembly processing result includes:

[0022] Through the middle - desk order - throwing information assembly processing class, the first processing result, the second processing result, the third processing result, the fourth processing result, the fifth processing result, the sixth processing result, the seventh processing result, and the eighth processing result are assembled by constructing key - value pairs with the product information and the sales product information as keywords and the virtual product ID as the value, so as to obtain an information assembly processing result.

[0023] In one embodiment, the first encapsulation process is performed on the virtual product ID and the product ordering parameters through the preset product template method, and the obtained product order message includes:

[0024] Determine the product type according to the virtual product ID or the product ordering parameters;

[0025] When the product type is a fixed network product, the first encapsulation process is performed on the virtual product ID and the product ordering parameters through the preset fixed network product template method to obtain a product order message;

[0026] When the product type is a mobile product, the first encapsulation process is performed on the virtual product ID and the product ordering parameters through the preset mobile product template method to obtain a product order message.

[0027] In one embodiment, the second encapsulation process is performed on the virtual product ID and the sales product ordering parameters through the abstract factory, and the obtained sales product message includes:

[0028] Determine the sales product type according to the virtual product ID;

[0029] When the sales product type is a newly ordered sales product, the second encapsulation process is performed on the virtual product ID and the sales product ordering parameters through the first preset factory in the abstract factory to obtain a sales product message;

[0030] When the sales product type is an existing sales product, the second encapsulation process is performed on the virtual product ID and the sales product ordering parameters through the second preset factory in the abstract factory to obtain a sales product message.

[0031] In one embodiment, the obtaining of the order message includes:

[0032] Obtain an order acceptance message;

[0033] The order acceptance message is formatted through the process rule service class to obtain an order message.

[0034] In a second aspect, an embodiment of the present application provides an order message generation device, including:

[0035] An obtaining module, configured to obtain an order message; the order message includes product information and sales product information;

[0036] An assembling module, configured to perform information assembling processing on the order message through a process rule factory to obtain an information assembling processing result; the information assembling processing result includes product ordering parameters, sales product ordering parameters, and a virtual product ID associated with the product information and the sales product information;

[0037] An encapsulation module is used to perform a first encapsulation process through a preset product template method, the virtual product ID, and the product order parameters to obtain a product order message, and perform a second encapsulation process through an abstract factory, the virtual product ID, and the sales product order parameters to obtain a sales product message.

[0038] In a third aspect, an embodiment of the present application provides an electronic device, including: a processor and a memory. Instructions are stored in the memory, and the instructions are loaded and executed by the processor to implement the method in any one of the above aspects.

[0039] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed, the method in any one of the above aspects is implemented.

[0040] The beneficial effects in the above technical solutions at least include:

[0041] By obtaining an order message, which includes product information and sales product information, performing information assembly processing on the order message through a process rule factory to obtain an information assembly processing result, and the information assembly processing result includes product order parameters, sales product order parameters, and a virtual product ID that associates the product information and sales product information. Through a preset product template method, the virtual product ID, and the product order parameters, a first encapsulation process is performed to obtain a product order message. Through an abstract factory, the virtual product ID, and the sales product order parameters, a second encapsulation process is performed to obtain a sales product message. There is no need to set different static encapsulation methods for different products and sales products, providing a general method for generating product order messages and sales product messages. At the same time, by generating a virtual product ID to associate product information and sales product information, the product order message and the sales product message can understand the association relationship between the product and the sales product, which is more simple and convenient.

[0042] The above summary is only for the purpose of the specification and is not intended to be limiting in any way. In addition to the above-described illustrative aspects, embodiments, and features, further aspects, embodiments, and features of the present application will be readily apparent by reference to the drawings and the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In the drawings, unless otherwise specified, the same reference numerals throughout the several views denote the same or similar components or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings only depict some embodiments disclosed in the present application and should not be regarded as limiting the scope of the present application.

[0044] Figure 1Schematic diagram of the steps of the order message generation method according to an embodiment of the present application;

[0045] Figure 2 Schematic diagram of the overall architecture according to an embodiment of the present application;

[0046] Figure 3 Schematic diagram of the process of the order message generation method according to an embodiment of the present application;

[0047] Figure 4 Block diagram of the structure of the order message generation device according to an embodiment of the present application;

[0048] Figure 5 Block diagram of the structure of the electronic device according to an embodiment of the present application. Detailed implementation manners

[0049] In the following, only some exemplary embodiments are briefly described. As those skilled in the art can recognize, the described embodiments can be modified in various different ways without departing from the spirit or scope of the present application. Therefore, the drawings and descriptions are considered to be exemplary in nature rather than restrictive.

[0050] Glossary:

[0051] FRF (Flow Regular Factory): A factory class that encapsulates the basic information, scenario information, products, sales products, services, products, public information, and extended information of product ordering and controls the execution order of processes.

[0052] POF (Package Offer Factory): An abstract factory class for assembling information of the sales product order message.

[0053] PM (Prod Model - Template Method): A template method for assembling the product order message. Standard products have a default set of execution template methods (i.e., preset product template methods), and mobile products and fixed network products can generate corresponding product order messages according to different template methods defined by the service.

[0054] In the related art, for example, in a telecommunications service acceptance system, as the number of sold products and sales items gradually increases, the business logic for submitting product orders to be encapsulated becomes increasingly complex, and the number of message data blocks to be encapsulated in the order also increases. There are dependencies between some business products, and there are ordering relationships between products and sales items. In the order submission logic, some products require preliminary calculation logic to express and generate virtual dependencies. To facilitate the unified assembly of messages in the order submission model, a tool class is usually encapsulated for assembling module data. However, currently, for professional business requirements, the ordinary order form architecture method service cannot be satisfied:

[0055] Functionally: Since the message formats and fields of different products and different business orders are different, if the order uses the tool class encapsulation method to process order message data, there will be problems such as multiple sets of static methods for order formats in the order submission logic, resulting in a bloated tool class, complex judgment, and inability to pass intermediate parameters of the calculation logic contextually.

[0056] Usability: The fault tolerance mechanism is poor, and there is no compensation mechanism for null values in some data blocks of the order or data blocks that do not need to be submitted. In the scenario of order rejection (the installation address is allowed to be empty), if the address information is incorrect or not accurate enough when selected, the order will be abnormal and the effect of order rejection cannot be achieved.

[0057] Scalability: When calling the CRM system interface, it is necessary to encapsulate another layer of data processing for the messages of products with different businesses, resulting in technical problems such as complex logic encapsulation, poor code readability, and difficulty in expansion.

[0058] Facing these problems, the existing order service processing methods are difficult to meet the real-time order and order rejection requirements under the large business volume of the company. Therefore, the embodiments of the present application provide an order message generation method to solve the above related problems.

[0059] Referring to Figure 1 , a flowchart of the order message generation method according to an embodiment of the present application is shown. The order message generation method may at least include steps S100 - S400:

[0060] S100. Obtain an order message.

[0061] Optionally, the order message includes, but is not limited to, basic information, gift package information, customer information, one-time fee information, associated account information, contact information, address information, extended information, and scenario information.

[0062] For example, the format of a certain order message is as follows:

[0063] Basic information: Includes information such as local network identifier, customer identifier, employee identifier, position identifier, organization identifier, and channel code.

[0064]

[0065]

[0066] Gift package information: including gift package identifier and gift package type information.

[0067]

[0068] Customer information: including customer identifier, customer name, document type, document number, document address, contact phone number and other information.

[0069]

[0070] One-time fee information: including payment type, bank identifier, bank account type, bank account, contracted customer and other information.

[0071]

[0072]

[0073] Associated account information: including account identifier, invoice type, invoice identifier and other information.

[0074]

[0075] Contact person information: including contact person name, contact person phone number, SMS type information.

[0076]

[0077]

[0078] Address information: including address identifier, bureau direction identifier, address details, operation type information

[0079]

[0080] Extended information: including associated sales product identifier, risk level and other information.

[0081]

[0082] Scenario information: including scenario identifier, scenario name, scenario code, applicable scenario type and other information.

[0083]

[0084] S200. Perform information assembly processing on the order message through the process rule factory to obtain the information assembly processing result.

[0085] Optionally, the information assembly processing result includes product ordering parameters, sales product ordering parameters, associated product information, and a virtual product ID that associates product information and sales product information.

[0086] S300. Perform a first encapsulation process through a preset product template method, a virtual product ID, and product ordering parameters to obtain a product order message. Perform a second encapsulation process through an abstract factory, a virtual product ID, and sales product ordering parameters to obtain a sales product message.

[0087] The order message generation method according to the embodiments of the present application can be executed by an electronic control unit, a controller, a processor, etc. of terminals such as a computer, a mobile phone, a tablet, a vehicle-mounted terminal, etc., or can also be executed by a cloud server.

[0088] In the technical solution of the embodiments of the present application, by obtaining an order message, where the order message includes product information and sales product information, perform an information assembly process on the order message through a process rule factory to obtain an information assembly processing result. The information assembly processing result includes product ordering parameters, sales product ordering parameters, associated product information, and a virtual product ID that associates product information and sales product information. Perform a first encapsulation process through a preset product template method, a virtual product ID, and product ordering parameters to obtain a product order message. Perform a second encapsulation process through an abstract factory, a virtual product ID, and sales product ordering parameters to obtain a sales product message. There is no need to set different static encapsulation methods for different products and sales products, providing a general method for generating product order messages and sales product messages. At the same time, by generating a virtual product ID to associate product information and sales product information, the product order message and the sales product message can understand the association relationship between the product and the sales product, which is simpler and more convenient.

[0089] In one implementation manner, for example, in the order transfer function of the operator's middle platform of the server in the Zhongyi order transfer project, there is an ordering function for multiple products and multiple sales products. Users can place orders through this function, thereby generating an order acceptance message.

[0090] Refer to Figure 2 , in one implementation manner, the overall architecture of the operator's middle platform of the server may include a front end (vue, js), a service layer (resful, spring), a business layer (process rule factory, product template method), and a bottom layer (dubbo service, redis, MySQL database).

[0091] In one implementation manner, the process rule service class instantiates the process rule factory and provides it as a unified entry for the ordering function to use. At the same time, after obtaining the order acceptance message, the process rule service class formats the order acceptance message, formatting the order acceptance message in json format into an order message in xml format for the process rule factory to process.

[0092] As Figure 3 shown, in one embodiment, the process rule factory includes an information processing class and a Taishuai order information assembly and processing class. The information processing class includes various types of processing classes, such as, but not limited to, a basic information processing class, a scenario processing class, an extended information processing class, a commodity processing class, a sales product processing class, a business information processing class, a business information processing class, and a public information processing class. The data format processed by each type of information processing class in the process rule factory can be pre-agreed with the process rule service class. The process rule service class performs the conversion of the order message according to the agreed content, and facilitates the setting of the value mapping of the fields of the order message into the cache objects of each class for subsequent processing.

[0093] In one embodiment, step S200 includes steps S210 - S220:

[0094] S210. Perform information processing on the order message through the information processing class of the process rule factory to obtain an information processing result.

[0095] Optionally, S210 includes steps S2101 - S2108:

[0096] S2101. Process the basic information through the basic information processing class to obtain a first processing result.

[0097] S2102. Process the scenario information through the scenario processing class to obtain a second processing result.

[0098] S2103. Process the extended information through the extended information processing class to obtain a third processing result.

[0099] S2104. Process the commodity information through the commodity processing class to obtain a fourth processing result.

[0100] S2105. Process the sales product information through the sales product processing class to obtain a fifth processing result.

[0101] S2106. Process the business information through the business information processing class to obtain a sixth processing result.

[0102] S2107. Process the product information through the product information processing class to obtain a seventh processing result.

[0103] S2108. Process the public information through the public information processing class to obtain an eighth processing result.

[0104] Optionally, S210 includes steps S2101 - S2108:

[0105] S2101. Process the basic information through the basic information processing class to obtain the first processing result.

[0106] Among them, the processing logic of the basic information processing class includes:

[0107] ①. Obtain the basic information data from the input parameter message;

[0108] ②. Perform data verification on the basic information data: non-empty verification of the local network identifier cityId, non-empty verification of the employee identifier staffId, and non-empty verification of the position identifier sysPostId;

[0109] ③. Basic information data processing: If the organization identifier orgId is missing in the basic information data, take the organization identifier appOrgId in the input parameter message to complete it.

[0110] S2102. Process the scenario information through the scenario processing class to obtain the second processing result.

[0111] Among them, the processing logic of the scenario information processing class includes:

[0112] ①. Obtain the scenario information data from the input parameter message;

[0113] ②. Perform data verification on the scenario information data: non-empty verification of the scenario identifier sceneId and non-empty verification of the scenario name sceneName.

[0114] S2103. Process the extended information through the extended information processing class to obtain the third processing result.

[0115] Among them, the processing logic of the extended information processing class includes:

[0116] ①. Obtain the extended information data from the input parameter message;

[0117] ②. Perform data verification on the extended information data: non-empty verification of the associated sales product identifier allOfferIds.

[0118] S2104. Process the product information through the product processing class to obtain the fourth processing result.

[0119] Among them, the processing logic of the product information processing class includes:

[0120] ①. Obtain the product information data from the input parameter message;

[0121] ②. Perform data verification on the product information data: non-empty verification of the product identifier goodsId and non-empty verification of the product name goodsName.

[0122] S2105. Process the sales product information through the sales product processing class to obtain the fifth processing result.

[0123] Among them, the processing logic of the sales product processing class includes:

[0124] ①. Obtain the sales product information data from the input parameter message;

[0125] ②. Perform data verification on the sales product information data: non-empty verification of the sales product identifier offerId, non-empty verification of the operation type operType.

[0126] S2106. Process the business information through the business information processing class to obtain the sixth processing result.

[0127] Among them, the processing logic of the business information processing class includes:

[0128] ①. Obtain the business information data from the input parameter message;

[0129] ②. Perform data verification on the business information data: non-empty verification of the business identifier actionId, non-empty verification of the business name actionName.

[0130] S2107. Process the product information through the product information processing class to obtain the seventh processing result.

[0131] Among them, the processing logic of the product information processing class includes:

[0132] ①. Obtain the product information data from the input parameter message;

[0133] ②. Perform data verification on the product information data: non-empty verification of the product identifier prodId, non-empty verification of the product name prodName, non-empty verification of the product type prodType.

[0134] S2108. Process the public information through the public information processing class to obtain the eighth processing result.

[0135] The processing logic of the public information processing class includes:

[0136] Obtain the public information data from the input parameter message: including customer information, order-derived information, order attribute information, one-time fee information, associated account information, contact information, order label information, order details information, handler information, associated user information, order reservation information, etc.

[0137] It should be noted that each type of processing class in the information processing category has a preset processing step, which can be set according to actual needs and implements the IThrowOrderRegular interface. When instantiating, a rule set variable List is defined in the process rule factory OrderAutoFlowRegularFactory <ithroworderregular>regularSet, and then place each processing step in this variable list to complete the loading of different processing rules.

[0138]

[0139] In some embodiments, the order message may not contain all of the above information. During the actual processing, at least one of S2101 - S2108 above may be executed according to the specific information type in the order message.

[0140] In the embodiments of the present application, the processing class in the information processing class may also have the following functions:

[0141] 1. Implement the orderPreSubmit method of the IThrowOrderRegular interface: The methods of the processing class can control whether the logic is interrupted immediately or continues to execute. For example, in the orderPreSubmit method of the ProdXXXRegular class, directly returning true interrupts the logic and does not continue to execute the steps. Returning false continues to execute the next step;

[0142] 2. Skip steps: For example, to skip the assembly data block of the resource selection address module, the prodId can be set through the configuration switch of the database; to skip the address assembly of the YMH_PROD_NOFORCE_ADDR product, the resource address configuration is not forcibly restricted, and the parsing and assembly of the address information data block can be skipped.

[0143] 2. Skip steps: For some situations that do not meet the conditions, the corresponding processing logic can be directly skipped. For example, if the product is a mobile product (the product identifier prodId is 3204 or 3205), since this type of product has no installed address information in the business, when assembling the product information, the program first reads the control parameter YMH_PROD_NOFORCE_ADDR (parameter values are 500001740, 500001741, 500002720, 500002420, 3204, 3205) pre - configured in the database. Since 3204 and 3205 have been configured in this parameter, it means that these two mobile products do not need to assemble the address information block. Therefore, the program can directly skip the parsing and assembly of the address module data.

[0144] 3. Interruption Step: By controlling the execution object of the rule set regularSet in the process rule factory OrderAutoFlowRegularFactory, it is possible to control whether a certain product step can be immediately interrupted and not proceed further. For example, when assembling product information, if the product is a mobile product and it is determined during the assembly process that the mobile product lacks required information such as a number and a card number, an empty pointer exception can be thrown to interrupt the logic and prevent it from proceeding further.

[0145] 4. Address Completion Step: When only a general address description information is entered on the interface, and both the address ID and the office direction ID are default values of -1, the logic will use the entered address as a keyword to attempt to call the address resource system to query resource addresses at levels 6 to 10 for matching. If a match is found, the address ID and office direction ID corresponding to the first record in the 10-level address list are taken as the address information to be assembled in the order submission message for completion.

[0146] S220. Through the mid-office order forwarding information assembly processing class in the process rule factory, the information processing results are assembled to obtain the information assembly processing results.

[0147] Optionally, the information assembly processing results include, but are not limited to, product ordering parameters, sales product ordering parameters, associated product information, and the virtual product ID of the sales product information.

[0148] Optionally, step S220 can specifically be:

[0149] Through the mid-office order forwarding information assembly processing class, the first processing result, the second processing result, the third processing result, the fourth processing result, the fifth processing result, the sixth processing result, the seventh processing result, and the eighth processing result are assembled by constructing key-value pairs with the product information and the sales product information as keywords and the virtual product ID as the value to obtain the information assembly processing results.

[0150] In the embodiment of the present application, the first processing result, the second processing result, the third processing result, the fourth processing result, the fifth processing result, the sixth processing result, the seventh processing result, and the eighth processing result generated in the previous steps are cached in the requestContext global parameter, and then a key-value pair is constructed with the product information such as product ID (prodId), product instance ID (prodInstId), and the sales product information such as sales product ID (offerId), sales product instance ID (offerInstId) as the keyword key and the virtual product instance ID (virtual product ID) as the value. The format is as follows: offer-ProdInstId-virtual product Id, thereby obtaining the information assembly processing results.

[0151] It should be noted that with this virtual product ID, the sales product order form assembled later can find out which products have ordered which sales products through the relationship for association. For example, the mobile product is associated with the 199 integrated main package and the platinum member package, and the fixed network product broadband is only associated with the 199 integrated main package and not with the platinum member package. The association is determined by the sales product role and the applicable products of the roleCd role.

[0152] In one implementation, in step S300, the first encapsulation process is performed through a preset product template method, a virtual product ID, and product order parameters to obtain a product order message, including steps S310 - S330:

[0153] S310. Determine the product type according to the virtual product ID or the product order parameters.

[0154] Specifically, since the virtual product ID in the information assembly processing result constructs key - value pairs, the product type can be determined through the virtual product ID; or, because there are significant differences in the product order parameters of fixed network products and mobile products. For example, the fixed network product has a data block for the installation address, while the mobile product does not have an address data block and other differences. Therefore, two templates for fixed network products and mobile products are designed during the encapsulation process. The data blocks ordered by fixed network products, broadband, and IPTV products are similar, so they can share a template to generate a product order object. Therefore, the product type can be determined through the product order parameters.

[0155] S320. When the product type is a fixed network product, perform the first encapsulation process on the virtual product ID and the product order parameters through the preset fixed network product template method to obtain a product order message.

[0156] S330. When the product type is a mobile product, perform the first encapsulation process on the virtual product ID and the product order parameters through the preset mobile product template method to obtain a product order message.

[0157] Optionally, in the embodiments of the present application, a ProdModel product template method is set in advance. In this method, the preset fixed network product template method corresponding to the fixed network product template and the preset fixed network product template method corresponding to the mobile product template are defined. Therefore, when the product type is a fixed network product, perform the first encapsulation process on the virtual product ID and the product order parameters through the preset fixed network product template method to obtain a product order message; when the product type is a mobile product, perform the first encapsulation process on the virtual product ID and the product order parameters through the preset mobile product template method to obtain a product order message.

[0158] In one embodiment, in step S400, through an abstract factory, a virtual product ID, and sales product ordering parameters, a second encapsulation process is performed to obtain a sales product message, including steps S340 - S360:

[0159] S340. Determine the sales product type according to the virtual product ID.

[0160] Similarly, based on the key - value pair of the virtual product ID, the sales product type can be determined.

[0161] S350. When the sales product type is a newly ordered sales product, perform a second encapsulation process on the virtual product ID and the sales product ordering parameters through the first preset factory in the abstract factory to obtain a sales product message.

[0162] S360. When the sales product type is an existing sales product, perform a second encapsulation process on the virtual product ID and the sales product ordering parameters through the second preset factory in the abstract factory to obtain a sales product message.

[0163] In the embodiment of the present application, a sales product abstract factory is provided. The sales product abstract factory includes, but is not limited to, a general sales product factory (the first preset factory) and an existing sales product instance factory (the second preset factory), corresponding to the newly ordered sales product service and the modified sales product service respectively. Among them, the sales product instance id of the newly ordered sales product is a virtual Id (negative number). The existing sales product instance Id is a positive - integer Id, and its id is the existing sales product instance Id in the database obtained based on the virtual product ID.

[0164] Therefore, when the sales product type is a newly ordered sales product, perform a second encapsulation process on the virtual product ID and the sales product ordering parameters through the first preset factory in the abstract factory to obtain a sales product message; when the sales product type is an existing sales product, perform a second encapsulation process on the virtual product ID and the sales product ordering parameters through the second preset factory in the abstract factory to obtain a sales product message.

[0165] Through the method of the embodiment of the present application, at least the following effects can be achieved:

[0166] 1). Solve the related problems of the existing order form architecture, such as bloated tool classes, complex judgment, inability to pass intermediate parameters of calculation logic contextually, poor fault - tolerance mechanism, complex logic encapsulation logic, poor code readability, and difficult expansion. A packaging process framework based on the ThrowOrderAutoFlowRegularService process rule service class, the OrderAutoFlowRegularFactory process rule factory, the product template method, and the sales product abstract factory is proposed;

[0167] 2) Using one service portal, the order acceptance message of 45 telecom products such as broadband, fixed-line, and mobile can be encapsulated, the control capability and fault tolerance mechanism of logical steps can be increased, and the context parameter transmission of dependent product information can be adapted to related sales products;

[0168] 3) It can support three acceptance modes: wing order transfer, wing acceptance, and government and enterprise order transfer, including speed increase, integration, fixed-line, single broadband, single mobile, single mobile call supplement, 5G enjoyment, single mobile contract, 4G enjoyment, Tianyi home security, whole house wifi, traffic package, 4 to 5, broadband renewal, replacement of cards, installation of secondary cards and other services, and unified processing and packaging logic of acceptance order messages.

[0169] 4) The four complex message assembly logics of pre-submission of middle-end orders, packaging verification of gift package sales and product quantity, order submission verification, and derived verification are simplified into one. An order submission packaging service realizes the verification of various orders and the logical assembly of order submission, greatly reducing the packaging of service and tool classes.

[0170] Reference Figure 4 , shows a structural block diagram of an order message generating device according to an embodiment of the present application, the device may include:

[0171] The acquisition module is used to acquire the order message; the order message includes product information and sales product information;

[0172] An assembly module is used to perform information assembly processing on the order message through the process rule factory to obtain an information assembly processing result; the information assembly processing result includes product ordering parameters, sales item ordering parameters, and associated product information and a virtual product ID of the sales item information;

[0173] The encapsulation module is used to perform the first encapsulation processing through the preset product template method, virtual product ID and product ordering parameters to obtain the product order message, and perform the second encapsulation processing through the abstract factory, virtual product ID and sales product ordering parameters to obtain the sales product message.

[0174] The functions of each module in each device in the embodiments of the present application can be found in the corresponding description in the above method, and will not be repeated here.

[0175] Reference Figure 5 , shows a structural block diagram of an electronic device according to an embodiment of the present application, the electronic device includes: a memory 310 and a processor 320, the memory 310 stores instructions that can be run on the processor 320, and the processor 320 loads and executes the instructions to implement the order message generation method in the above embodiment. The number of the memory 310 and the processor 320 can be one or more.

[0176] In one embodiment, the electronic device further includes a communication interface 330 for communicating with external devices and performing data interaction and transmission. If the memory 310, the processor 320, and the communication interface 330 are implemented independently, the memory 310, the processor 320, and the communication interface 330 can be interconnected through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 only a thick line is used to represent it in the figure, but it does not mean that there is only one bus or one type of bus.

[0177] Optionally, in specific implementation, if the memory 310, the processor 320, and the communication interface 330 are integrated on a single chip, the memory 310, the processor 320, and the communication interface 330 can communicate with each other through an internal interface.

[0178] The embodiment of the present application provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the order message generation method provided in the above embodiment is implemented.

[0179] The embodiment of the present application further provides a chip, which includes a processor for calling and running instructions stored in a memory, so that a communication device installed with the chip executes the method provided in the embodiment of the present application.

[0180] The embodiment of the present application further provides a chip, including: an input interface, an output interface, a processor, and a memory. The input interface, the output interface, the processor, and the memory are connected through an internal connection path. The processor is used to execute the code in the memory, and when the code is executed, the processor is used to execute the method provided in the embodiment of the application.

[0181] It should be understood that the above-mentioned processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc. It is worth noting that the processor can be a processor that supports the advanced RISC machines (ARM) architecture.

[0182] Further, optionally, the above-mentioned memory can include a read-only memory and a random access memory, and can also include a non-volatile random access memory. The memory can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can include a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can include a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available. For example, static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchlink dynamic random access memory (SLDRAM), and direct rambus random access memory (DR RAM).

[0183] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions according to the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another.

[0184] In the description of this specification, the descriptions with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples", etc. mean that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. Moreover, the specific features, structures, materials, or characteristics described can be combined in a suitable manner in any one or more embodiments or examples. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.

[0185] In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" can explicitly or implicitly include at least one of the features. In the description of the present application, "a plurality" means two or more, unless otherwise specifically defined.

[0186] Any process or method description represented in the flowchart or described in other ways herein can be understood as representing a module, segment, or part of code including one or more executable instructions for implementing a specific logical function or process. And the scope of the preferred embodiments of the present application includes additional implementations, where the functions can be executed in a substantially simultaneous manner or in the reverse order according to the involved functions, rather than in the order shown or discussed.

[0187] The logic and / or steps represented in the flowchart or described in other ways herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other systems that can fetch and execute instructions from the instruction execution system, apparatus, or device), or in combination with these instruction execution systems, apparatus, or devices.

[0188] It should be understood that each part of the present application can be implemented by hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. All or part of the steps of the method in the above embodiments can be completed by a program instructing relevant hardware. The program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiment.

[0189] In addition, in each embodiment of the present application, each functional unit can be integrated into a processing module, or each unit can exist physically alone, or two or more units can be integrated into one module. The above integrated module can be implemented in the form of hardware or in the form of a software functional module. When the above integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. The storage medium can be a read-only memory, a disk, an optical disc, etc.

[0190] The above is only the specific embodiment of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present application can easily think of various changes or substitutions, and these should all be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.< / ithroworderregular>

Claims

1. A method for generating an order message, characterized in that, Including: Obtain an order message; the order message includes product information and sales product information; Perform information assembly processing on the order message through a process rule factory to obtain an information assembly processing result; the information assembly processing result includes product order parameters, sales product order parameters, and a virtual product ID associated with the product information and the sales product information; Perform a first encapsulation process through a preset product template method, the virtual product ID, and the product order parameters to obtain a product order message, and perform a second encapsulation process through an abstract factory, the virtual product ID, and the sales product order parameters to obtain a sales product message.

2. The order message generation method according to claim 1, wherein: The performing information assembly processing on the order message through the process rule factory to obtain an information assembly processing result includes: Perform information processing on the order message through an information processing class of the process rule factory to obtain an information processing result; Perform assembly processing on the information processing result through a mid-office order transfer information assembly processing class of the process rule factory to obtain an information assembly processing result.

3. The order message generation method according to claim 2, wherein: The order message further includes basic information, scenario information, commodity information, business information, public information, and extended information. Performing information processing on the order message through an information processing class of the process rule factory to obtain an information processing result includes: Perform processing on the basic information through a basic information processing class to obtain a first processing result; Perform processing on the scenario information through a scenario processing class to obtain a second processing result; Perform processing on the extended information through an extended information processing class to obtain a third processing result; Perform processing on the commodity information through a commodity processing class to obtain a fourth processing result; Perform processing on the sales product information through a sales product processing class to obtain a fifth processing result; Perform processing on the business information through a business information processing class to obtain a sixth processing result; Perform processing on the product information through a product information processing class to obtain a seventh processing result; Perform processing on the public information through a public information processing class to obtain an eighth processing result; Among them, each type of processing class in the information processing class has a preset processing step.

4. The order message generation method according to claim 3, wherein: The performing assembly processing on the information processing result through a mid-office order transfer information assembly processing class of the process rule factory to obtain an information assembly processing result includes: Through the mid-office order transfer information assembly processing class, assemble the first processing result, the second processing result, the third processing result, the fourth processing result, the fifth processing result, the sixth processing result, the seventh processing result, and the eighth processing result by constructing key-value pairs with the product information and the sales product information as keywords and the virtual product ID as the value to obtain an information assembly processing result.

5. The order message generation method according to any one of claims 1-4, characterized in that: The performing a first encapsulation process through a preset product template method, the virtual product ID, and the product order parameters to obtain a product order message includes: Determine the product type according to the virtual product ID or the product order parameters; When the product type is a fixed network product, perform a first encapsulation process on the virtual product ID and the product subscription parameters through a preset fixed network product template method to obtain a product order message; When the product type is a mobile product, perform a first encapsulation process on the virtual product ID and the product subscription parameters through a preset mobile product template method to obtain a product order message.

6. The order message generation method according to any one of claims 1-4, characterized in that: The second encapsulation process through the abstract factory, the virtual product ID, and the sales item subscription parameters to obtain the sales item message includes: Determine the sales item type according to the virtual product ID; When the sales item type is a newly subscribed sales item, perform a second encapsulation process on the virtual product ID and the sales item subscription parameters through the first preset factory in the abstract factory to obtain the sales item message; When the sales item type is an existing sales item, perform a second encapsulation process on the virtual product ID and the sales item subscription parameters through the second preset factory in the abstract factory to obtain the sales item message.

7. The order message generation method according to claim 1, wherein: The obtaining of the subscription message includes: Obtain a subscription acceptance message; Perform a formatting process on the subscription acceptance message through a process rule service class to obtain a subscription message.

8. An order message generation device, characterized in that, Includes: An obtaining module for obtaining a subscription message; The subscription message includes product information and sales item information; An assembling module for performing an information assembling process on the subscription message through a process rule factory to obtain an information assembling process result; the information assembling process result includes product subscription parameters, sales item subscription parameters, and a virtual product ID that associates the product information and the sales item information; An encapsulation module for performing a first encapsulation process on the virtual product ID and the product subscription parameters through a preset product template method to obtain a product order message, and performing a second encapsulation process on the virtual product ID and the sales item subscription parameters through the abstract factory to obtain a sales item message.

9. An electronic device, characterized in that, Includes: A processor and a memory, wherein instructions are stored in the memory, and the instructions are loaded and executed by the processor to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed, the method according to any one of claims 1 - 7 is implemented.